Compare commits
4 Commits
95d4cf5e8e
...
edd58a9a30
Author | SHA1 | Date | |
---|---|---|---|
edd58a9a30 | |||
3acfc2e9d9 | |||
f7b7bef245 | |||
74b5793ab3 |
@ -1,6 +1,6 @@
|
||||
{...}:
|
||||
{
|
||||
imports = [
|
||||
./hyprland.nix
|
||||
./hyprland
|
||||
];
|
||||
}
|
||||
|
@ -2,6 +2,8 @@
|
||||
let
|
||||
cfg = config.nixfiles.sessions.hyprland;
|
||||
mkd = lib.mkDefault;
|
||||
hyprland-pkg = config.wayland.windowManager.hyprland.finalPackage;
|
||||
|
||||
terminal = "${pkgs.kitty}/bin/kitty";
|
||||
files = "${pkgs.dolphin}/bin/dolphin";
|
||||
rofi = "${pkgs.rofi-wayland}/bin/rofi";
|
||||
@ -10,6 +12,9 @@ let
|
||||
polkit-agent = "${pkgs.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1";
|
||||
grimblast = "${inputs.hyprwm-contrib.packages.${pkgs.system}.grimblast}/bin/grimblast";
|
||||
|
||||
hypr-dispatcher-package = pkgs.callPackage ./dispatcher { hyprland = hyprland-pkg; };
|
||||
hypr-dispatcher = "${hypr-dispatcher-package}/bin/hypr-dispatcher";
|
||||
|
||||
# https://github.com/flatpak/xdg-desktop-portal-gtk/issues/440#issuecomment-1900520919
|
||||
xdpg-workaround = pkgs.writeShellScript "xdg-desktop-portal-gtk-workaround"
|
||||
''
|
||||
@ -56,6 +61,7 @@ in
|
||||
wev
|
||||
dunst
|
||||
pkgs.brightnessctl
|
||||
hypr-dispatcher-package
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
19
home/sessions/hyprland/dispatcher/default.nix
Normal file
19
home/sessions/hyprland/dispatcher/default.nix
Normal file
@ -0,0 +1,19 @@
|
||||
{ lib,
|
||||
stdenvNoCC,
|
||||
socat,
|
||||
coreutils,
|
||||
hyprland,
|
||||
makeShellWrapper }:
|
||||
let
|
||||
wrappedPath = lib.makeBinPath [ coreutils socat hyprland ];
|
||||
in
|
||||
stdenvNoCC.mkDerivation {
|
||||
name = "hyprland-dispatcher";
|
||||
phases = [ "installPhase" ];
|
||||
nativeBuildInputs = [ makeShellWrapper ];
|
||||
src = ./.;
|
||||
installPhase = ''
|
||||
install -Dm555 $src/dispatcher.sh $out/bin/hypr-dispatcher
|
||||
wrapProgramShell $out/bin/hypr-dispatcher --prefix PATH : "${wrappedPath}"
|
||||
'';
|
||||
}
|
23
home/sessions/hyprland/dispatcher/dispatcher.sh
Executable file
23
home/sessions/hyprland/dispatcher/dispatcher.sh
Executable file
@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
state_gd_rebind=0
|
||||
|
||||
log() {
|
||||
echo "$@" >&2
|
||||
}
|
||||
|
||||
handle_active_window() {
|
||||
case "$1" in
|
||||
# geometry dash
|
||||
*'>>'steam_app_322170,*) log matched Geometry Dash ;;
|
||||
esac
|
||||
}
|
||||
|
||||
handle() {
|
||||
case "$1" in
|
||||
activewindow*) handle_active_window "$1" ;;
|
||||
esac
|
||||
};
|
||||
|
||||
socat - "UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock" | \
|
||||
while read -r line ; do handle "$line"; done
|
@ -23,7 +23,10 @@ in
|
||||
};
|
||||
nixfiles.meta.wayland = true;
|
||||
|
||||
services.xserver.displayManager.sddm.enable = true;
|
||||
services.xserver.displayManager.sddm = {
|
||||
enable = true;
|
||||
wayland.enable = true;
|
||||
};
|
||||
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user