feat(hyprland): fix xdph and misc changes

This commit is contained in:
jacekpoz 2023-12-21 13:41:17 +01:00
parent a04e1ae0d2
commit 79b9f60512
No known key found for this signature in database
GPG key ID: 94E812A8B12AAE3C
2 changed files with 11 additions and 7 deletions

View file

@ -17,8 +17,6 @@
hyprland.url = "github:hyprwm/Hyprland"; hyprland.url = "github:hyprwm/Hyprland";
xdg-desktop-portal-hyprland.url = "github:hyprwm/xdg-desktop-portal-hyprland";
hyprcontrib.url = "github:hyprwm/contrib"; hyprcontrib.url = "github:hyprwm/contrib";
hyprland-plugins = { hyprland-plugins = {

View file

@ -8,8 +8,7 @@
}: with lib; let }: with lib; let
cfg = config.myOptions.programs.hyprland; cfg = config.myOptions.programs.hyprland;
inherit (inputs.nixpkgs-wayland.packages.${pkgs.system}) foot wl-clipboard swww wlsunset; inherit (inputs.nixpkgs-wayland.packages.${pkgs.system}) foot wl-clipboard swww wlsunset swaylock;
swaylock = config.home-manager.users.${config'.username}.programs.swaylock.package;
inherit (inputs.anyrun.packages.${pkgs.system}) anyrun; inherit (inputs.anyrun.packages.${pkgs.system}) anyrun;
hyprcontrib = inputs.hyprcontrib.packages.${pkgs.system}; hyprcontrib = inputs.hyprcontrib.packages.${pkgs.system};
inherit (inputs.shadower.packages.${pkgs.system}) shadower; inherit (inputs.shadower.packages.${pkgs.system}) shadower;
@ -40,7 +39,7 @@ in {
enable = true; enable = true;
extraPortals = [ extraPortals = [
pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-gtk
inputs.xdg-desktop-portal-hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland
]; ];
# TODO look into and make use of this # TODO look into and make use of this
config.common.default = "*"; config.common.default = "*";
@ -66,8 +65,7 @@ in {
extraConfig = '' extraConfig = ''
bind=$mainMod, W, exec, ${removeSuffix " %U" config.home-manager.users.${config'.username}.xdg.desktopEntries.firefox-schizo.exec} bind=$mainMod, W, exec, ${removeSuffix " %U" config.home-manager.users.${config'.username}.xdg.desktopEntries.firefox-schizo.exec}
bind=$mainMod SHIFT, W, exec, ${removeSuffix " %U" config.home-manager.users.${config'.username}.xdg.desktopEntries.firefox-unschizo.exec} bind=$mainMod SHIFT, W, exec, ${removeSuffix " %U" config.home-manager.users.${config'.username}.xdg.desktopEntries.firefox-unschizo.exec}
bind=$mainMod, C, exec, ${swaylock}/bin/swaylock ${if (cfg.startupSound != "") then "exec-once=${pkgs.mpv}/bin/mpv --no-video --volume=100 ${config.home-manager.users.${config'.username}.xdg.dataHome}/hypr/startup_sound" else ""}
${if (cfg.startupSound != "") then "exec-once=${pkgs.mpv}/bin/mpv --no-video --volume=100 ~/${config.home-manager.users.${config'.username}.xdg.dataHome}/hypr/startup_sound" else ""}
''; '';
settings = { settings = {
"$mainMod" = "SUPER"; "$mainMod" = "SUPER";
@ -283,8 +281,15 @@ in {
", XF86Launch1, togglespecialworkspace, rog" ", XF86Launch1, togglespecialworkspace, rog"
"$mainMod, R, togglespecialworkspace, rog" "$mainMod, R, togglespecialworkspace, rog"
"$mainMod, X, togglespecialworkspace, keepassxc" "$mainMod, X, togglespecialworkspace, keepassxc"
"$mainMod, C, exec, ${swaylock}/bin/swaylock"
# toggle waybar # toggle waybar
"$mainMod CONTROL, B, exec, ${pkgs.systemd}/bin/systemctl is-active --user waybar && ${pkgs.systemd}/bin/systemctl stop --user waybar || ${pkgs.systemd}/bin/systemctl start --user waybar" "$mainMod CONTROL, B, exec, ${pkgs.systemd}/bin/systemctl is-active --user waybar && ${pkgs.systemd}/bin/systemctl stop --user waybar || ${pkgs.systemd}/bin/systemctl start --user waybar"
#"$mainMod, mouse_up, exec, ${hyprland}/bin/hyprctl keyword misc:cursor_zoom_factor $(echo \"$(${hyprland}/bin/hyprctl getoption misc:cursor_zoom_factor -j | ${pkgs.jq}/bin/jq '.float') + 0.01\" | ${pkgs.bc}/bin/bc)"
#"$mainMod, mouse_down, exec, ${hyprland}/bin/hyprctl keyword misc:cursor_zoom_factor $(echo \"$(${hyprland}/bin/hyprctl getoption misc:cursor_zoom_factor -j | ${pkgs.jq}/bin/jq '.float') - 0.01\" | ${pkgs.bc}/bin/bc)"
#"$mainMod, mouse_up, exec, ${pkgs.libnotify}/bin/notify-send 'mouse_up'"
#"$mainMod, mouse_down, exec, ${pkgs.libnotify}/bin/notify-send 'mouse_down'"
]; ];
# repeat # repeat
@ -331,6 +336,7 @@ in {
binds = { binds = {
pass_mouse_when_bound = false; pass_mouse_when_bound = false;
movefocus_cycles_fullscreen = false;
}; };
exec-once = [ exec-once = [