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 /home-config/hypr | |
| parent | f4b1d571ae0d6527fd933baadc64e9d67cd56456 (diff) | |
Some updates to get locking working again, also added performance mode
script
Diffstat (limited to 'home-config/hypr')
| -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 | 
4 files changed, 38 insertions, 3 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 | ||
