diff --git a/home/rachel.nix b/home/rachel.nix index 0fc6bad..70d838d 100644 --- a/home/rachel.nix +++ b/home/rachel.nix @@ -157,6 +157,29 @@ in rec { initExtra = '' source ~/.profile set -o vi + + norm_name() { + ret="$1" + [ "$ret" = "''${ret#*\#}" ] && ret="nixpkgs#$ret" + printf '%s\n' "$ret" + } + + run() { + prog="$1" + shift + nix run "$(norm_name $prog)" "$@" + } + + shell() { + i=0 + while [ $i -lt $# ]; do + prog="$1" + shift + set -- "$@" "$(norm_name $prog)" + : $(( i++ )) + done + nix shell "$@" + } ''; }; @@ -527,6 +550,16 @@ in rec { }; }; }; + + autorandr = { + enable = true; + hooks.postswitch = { + wall = "xwallpaper --zoom \"$HOME\"/img/wallpaper"; + bar = "systemctl restart --user polybar"; + }; + profiles = { + }; + }; }; services = { @@ -600,6 +633,7 @@ in rec { blueman-applet.enable = true; betterlockscreen.enable = true; gnome-keyring.enable = true; + autorandr.enable = true; }; diff --git a/lambda/configuration.nix b/lambda/configuration.nix index d5e23d6..501c6e8 100644 --- a/lambda/configuration.nix +++ b/lambda/configuration.nix @@ -36,7 +36,7 @@ DISK_IDLE_SECS_ON_BAT = 5; MAX_LOST_WORK_SECS_ON_AC = 15; MAX_LOST_WORK_SECS_ON_BAT = 120; - CPU_SCALING_GOVERNOR_ON_AC = "performance"; + CPU_SCALING_GOVERNOR_ON_AC = "auto"; CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; CPU_SCALING_MIN_FREQ_ON_AC = 400000; CPU_SCALING_MAX_FREQ_ON_AC = 4700000;