diff options
author | Ryan Schanzenbacher <ryan@rschanz.org> | 2024-10-21 14:48:05 -0400 |
---|---|---|
committer | Ryan Schanzenbacher <ryan@rschanz.org> | 2024-10-21 14:48:05 -0400 |
commit | a0ac11339d7f380a63041da46b6f2917a80eed29 (patch) | |
tree | f10faa1b4f0e79438068d775503320290ffac602 | |
parent | f4b1d571ae0d6527fd933baadc64e9d67cd56456 (diff) |
Some updates to get locking working again, also added performance mode
script
-rwxr-xr-x | home-config/hypr/autostart.sh | 4 | ||||
-rw-r--r-- | home-config/hypr/hypridle.conf | 16 | ||||
-rw-r--r-- | home-config/hypr/hyprland.conf | 7 | ||||
-rwxr-xr-x | home-config/hypr/perf_mode.sh | 14 | ||||
-rw-r--r-- | home-config/nix-home-manager/home.nix | 9 | ||||
-rw-r--r-- | modules/ryan-config/base-system.scm | 21 |
6 files changed, 61 insertions, 10 deletions
diff --git a/home-config/hypr/autostart.sh b/home-config/hypr/autostart.sh index 8c7c502..b531c5b 100755 --- a/home-config/hypr/autostart.sh +++ b/home-config/hypr/autostart.sh | |||
@@ -11,7 +11,9 @@ nice -n13 swww init & | |||
11 | #~/.config/hypr/wallpaper-daemon.sh & | 11 | #~/.config/hypr/wallpaper-daemon.sh & |
12 | wpaperd -d & | 12 | wpaperd -d & |
13 | 13 | ||
14 | swayidle -w timeout 300 'swaylock --screenshots --clock --indicator --grace 3 --fade-in 1 --effect-blur 7x5 --effect-greyscale' timeout 600 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' before-sleep 'swaylock -f -c 000000' & | 14 | #swayidle -w timeout 300 'swaylock --screenshots --clock --indicator --grace 3 --fade-in 1 --effect-blur 7x5 --effect-greyscale' timeout 600 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' before-sleep 'swaylock -f -c 000000' & |
15 | |||
16 | hypridle & | ||
15 | 17 | ||
16 | syncthing serve --no-browser & | 18 | syncthing serve --no-browser & |
17 | 19 | ||
diff --git a/home-config/hypr/hypridle.conf b/home-config/hypr/hypridle.conf new file mode 100644 index 0000000..72688da --- /dev/null +++ b/home-config/hypr/hypridle.conf | |||
@@ -0,0 +1,16 @@ | |||
1 | general { | ||
2 | lock_cmd = pidof hyprlock || hyprlock | ||
3 | before_sleep_cmd = loginctl lock-session | ||
4 | after_sleep_cmd = hyprctl dispatch dpms on | ||
5 | } | ||
6 | |||
7 | listener { | ||
8 | timeout = 300 | ||
9 | on-timeout = loginctl lock-session | ||
10 | } | ||
11 | |||
12 | listener { | ||
13 | timeout = 600 | ||
14 | on-timeout = hyprctl dispatch dpms off | ||
15 | on-resume = hyprctl dispatch dpms on | ||
16 | } | ||
diff --git a/home-config/hypr/hyprland.conf b/home-config/hypr/hyprland.conf index 5fab592..b896c5a 100644 --- a/home-config/hypr/hyprland.conf +++ b/home-config/hypr/hyprland.conf | |||
@@ -203,8 +203,11 @@ bindm = $mainMod, mouse:272, movewindow | |||
203 | bindm = $mainMod, mouse:273, resizewindow | 203 | bindm = $mainMod, mouse:273, resizewindow |
204 | 204 | ||
205 | # Bind mainMod + L to screenlocker | 205 | # Bind mainMod + L to screenlocker |
206 | bind = $mainMod, L, exec, swaylock --screenshots --clock --indicator --fade-in 0.3 --effect-blur 7x5 --effect-greyscale | 206 | bind = $mainMod, L, exec, hyprlock |
207 | bind = $mainMod SHIFT, L, exec, swaylock --screenshots --clock --indicator --effect-blur 7x5 --effect-greyscale & sleep 0.5; loginctl suspend | 207 | bind = $mainMod SHIFT, L, exec, loginctl suspend |
208 | |||
209 | # Keybind to toggle "performance mode" (toggles GPU intensive things) | ||
210 | bind = $mainMod, F1, exec, ~/.config/hypr/perf_mode.sh | ||
208 | 211 | ||
209 | # Keybind for screenshot | 212 | # Keybind for screenshot |
210 | bind = $mainMod SHIFT, S, exec, grimblast copy area | 213 | bind = $mainMod SHIFT, S, exec, grimblast copy area |
diff --git a/home-config/hypr/perf_mode.sh b/home-config/hypr/perf_mode.sh new file mode 100755 index 0000000..c195688 --- /dev/null +++ b/home-config/hypr/perf_mode.sh | |||
@@ -0,0 +1,14 @@ | |||
1 | #!/usr/bin/env bash | ||
2 | HYPRGAMEMODE=$(hyprctl getoption animations:enabled | awk 'NR==1{print $2}') | ||
3 | if [ "$HYPRGAMEMODE" = 1 ] ; then | ||
4 | hyprctl --batch "\ | ||
5 | keyword animations:enabled 0;\ | ||
6 | keyword decoration:drop_shadow 0;\ | ||
7 | keyword decoration:blur:enabled 0;\ | ||
8 | keyword general:gaps_in 0;\ | ||
9 | keyword general:gaps_out 0;\ | ||
10 | keyword general:border_size 1;\ | ||
11 | keyword decoration:rounding 0" | ||
12 | exit | ||
13 | fi | ||
14 | hyprctl reload | ||
diff --git a/home-config/nix-home-manager/home.nix b/home-config/nix-home-manager/home.nix index 72ddf3a..1e0046d 100644 --- a/home-config/nix-home-manager/home.nix +++ b/home-config/nix-home-manager/home.nix | |||
@@ -45,7 +45,6 @@ | |||
45 | gdu | 45 | gdu |
46 | spotify-player | 46 | spotify-player |
47 | hyprpicker | 47 | hyprpicker |
48 | hyprlock | ||
49 | xwayland | 48 | xwayland |
50 | xdg-desktop-portal | 49 | xdg-desktop-portal |
51 | xdg-desktop-portal-gtk | 50 | xdg-desktop-portal-gtk |
@@ -54,6 +53,14 @@ | |||
54 | libva | 53 | libva |
55 | libvdpau | 54 | libvdpau |
56 | wpaperd | 55 | wpaperd |
56 | hypridle | ||
57 | |||
58 | # Wrapped programs for some env variables | ||
59 | (pkgs.writeScriptBin "hyprlock" '' | ||
60 | #! ${pkgs.bash}/bin/bash | ||
61 | export LD_PRELOAD="/run/current-system/profile/lib/libpam.so.0:$LD_PRELOAD" | ||
62 | exec ${pkgs.hyprlock}/bin/hyprlock "$@" | ||
63 | '') | ||
57 | 64 | ||
58 | # Flakes specific things defined in flake.nix | 65 | # Flakes specific things defined in flake.nix |
59 | hyprland.packages.${pkgs.system}.default | 66 | hyprland.packages.${pkgs.system}.default |
diff --git a/modules/ryan-config/base-system.scm b/modules/ryan-config/base-system.scm index ca13e77..01c5836 100644 --- a/modules/ryan-config/base-system.scm +++ b/modules/ryan-config/base-system.scm | |||
@@ -130,6 +130,7 @@ | |||
130 | ;"swaylock-effects" | 130 | ;"swaylock-effects" |
131 | "fuzzel" | 131 | "fuzzel" |
132 | "foot" | 132 | "foot" |
133 | "linux-pam" ; installed directly to get libs in profile directly | ||
133 | "pinentry-qt" | 134 | "pinentry-qt" |
134 | "adwaita-icon-theme" | 135 | "adwaita-icon-theme" |
135 | "hicolor-icon-theme" | 136 | "hicolor-icon-theme" |
@@ -162,7 +163,7 @@ | |||
162 | "wireshark" | 163 | "wireshark" |
163 | "webkitgtk-with-libsoup2" ; Needed for Go wails development | 164 | "webkitgtk-with-libsoup2" ; Needed for Go wails development |
164 | "zsh")) | 165 | "zsh")) |
165 | (list my-ca-certs virt-manager-ovmf bluez-ryan blueman-ryan swayidle-new) | 166 | (list my-ca-certs virt-manager-ovmf bluez-ryan blueman-ryan) |
166 | %my-base-packages )) | 167 | %my-base-packages )) |
167 | 168 | ||
168 | ;; Below is the list of system services. To search for available | 169 | ;; Below is the list of system services. To search for available |
@@ -189,16 +190,24 @@ | |||
189 | (socket "/var/run/tailscale/tailscaled.sock"))) | 190 | (socket "/var/run/tailscale/tailscaled.sock"))) |
190 | (service containerd-service-type) | 191 | (service containerd-service-type) |
191 | (service nix-service-type) | 192 | (service nix-service-type) |
193 | (simple-service 'hyprlock-pam pam-root-service-type | ||
194 | (list | ||
195 | (pam-service | ||
196 | (name "hyprlock") | ||
197 | (auth | ||
198 | (list | ||
199 | (pam-entry (control "include") | ||
200 | (module "login"))))))) | ||
192 | (service libvirt-service-type | 201 | (service libvirt-service-type |
193 | (libvirt-configuration | 202 | (libvirt-configuration |
194 | (libvirt libvirt-ovmf) | 203 | (libvirt libvirt-ovmf) |
195 | (unix-sock-group "libvirt"))) | 204 | (unix-sock-group "libvirt"))) |
196 | (service virtlog-service-type) | 205 | (service virtlog-service-type) |
197 | (service screen-locker-service-type | 206 | ;(service screen-locker-service-type |
198 | (screen-locker-configuration | 207 | ; (screen-locker-configuration |
199 | (name "hyprlock") | 208 | ; (name "hyprlock") |
200 | (program (file-append swaylock "/bin/swaylock")) | 209 | ; (program (file-append swaylock "/bin/swaylock")) |
201 | (using-pam? #t))) | 210 | ; (using-pam? #t))) |
202 | (simple-service 'spice-polkit polkit-service-type (list spice-gtk)) | 211 | (simple-service 'spice-polkit polkit-service-type (list spice-gtk)) |
203 | (simple-service 'hwdb-creation etc-service-type (list `("udev-here-oneoneone" ,(plain-file "issue" "test\n")))) | 212 | (simple-service 'hwdb-creation etc-service-type (list `("udev-here-oneoneone" ,(plain-file "issue" "test\n")))) |
204 | (service bluetooth-service-type | 213 | (service bluetooth-service-type |