From 52994557bd314d8277878e921cb10384b1b42a40 Mon Sep 17 00:00:00 2001 From: Emmet Date: Sat, 30 Sep 2023 22:48:48 -0500 Subject: [PATCH] Fixes sct script --- user/wm/hyprland/hyprland.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/user/wm/hyprland/hyprland.nix b/user/wm/hyprland/hyprland.nix index 1e1394c..d3e3f4c 100644 --- a/user/wm/hyprland/hyprland.nix +++ b/user/wm/hyprland/hyprland.nix @@ -283,10 +283,14 @@ pamixer (pkgs.writeScriptBin "sct" '' #!/bin/sh - killall wlsunset - temphigh=$(( $1 + 1 )) - templow=$1 - wlsunset -t $templow -T $temphigh &> /dev/null & + killall wlsunset &> /dev/null; + if [ $# -eq 1 ]; then + temphigh=$(( $1 + 1 )) + templow=$1 + wlsunset -t $templow -T $temphigh &> /dev/null & + else + killall wlsunset &> /dev/null; + fi '') (pkgs.writeScriptBin "hyprworkspace" '' #!/bin/sh