summaryrefslogtreecommitdiff
path: root/home-config
diff options
context:
space:
mode:
authorRyan Schanzenbacher <ryan@rschanz.org>2024-10-21 14:48:05 -0400
committerRyan Schanzenbacher <ryan@rschanz.org>2024-10-21 14:48:05 -0400
commita0ac11339d7f380a63041da46b6f2917a80eed29 (patch)
treef10faa1b4f0e79438068d775503320290ffac602 /home-config
parentf4b1d571ae0d6527fd933baadc64e9d67cd56456 (diff)
Some updates to get locking working again, also added performance mode
script
Diffstat (limited to 'home-config')
-rwxr-xr-xhome-config/hypr/autostart.sh4
-rw-r--r--home-config/hypr/hypridle.conf16
-rw-r--r--home-config/hypr/hyprland.conf7
-rwxr-xr-xhome-config/hypr/perf_mode.sh14
-rw-r--r--home-config/nix-home-manager/home.nix9
5 files changed, 46 insertions, 4 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 &
12wpaperd -d & 12wpaperd -d &
13 13
14swayidle -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
16hypridle &
15 17
16syncthing serve --no-browser & 18syncthing 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 @@
1general {
2 lock_cmd = pidof hyprlock || hyprlock
3 before_sleep_cmd = loginctl lock-session
4 after_sleep_cmd = hyprctl dispatch dpms on
5}
6
7listener {
8 timeout = 300
9 on-timeout = loginctl lock-session
10}
11
12listener {
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
203bindm = $mainMod, mouse:273, resizewindow 203bindm = $mainMod, mouse:273, resizewindow
204 204
205# Bind mainMod + L to screenlocker 205# Bind mainMod + L to screenlocker
206bind = $mainMod, L, exec, swaylock --screenshots --clock --indicator --fade-in 0.3 --effect-blur 7x5 --effect-greyscale 206bind = $mainMod, L, exec, hyprlock
207bind = $mainMod SHIFT, L, exec, swaylock --screenshots --clock --indicator --effect-blur 7x5 --effect-greyscale & sleep 0.5; loginctl suspend 207bind = $mainMod SHIFT, L, exec, loginctl suspend
208
209# Keybind to toggle "performance mode" (toggles GPU intensive things)
210bind = $mainMod, F1, exec, ~/.config/hypr/perf_mode.sh
208 211
209# Keybind for screenshot 212# Keybind for screenshot
210bind = $mainMod SHIFT, S, exec, grimblast copy area 213bind = $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
2HYPRGAMEMODE=$(hyprctl getoption animations:enabled | awk 'NR==1{print $2}')
3if [ "$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
13fi
14hyprctl 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