bash -x -c for simpler command echoing
Some checks failed
/ check (push) Failing after 3m2s

This commit is contained in:
Daniel Flanagan 2024-09-30 09:16:54 -05:00
parent 556c58f0fb
commit ce00bd6fed

View file

@ -425,16 +425,16 @@
# we use command -v $cmd here because we only want to invoke these calls _if_ the related package is installed on the system
# otherwise, they will likely have no effect anyways
text = ''
command -v powerprofilesctl &>/dev/null && set -x && powerprofilesctl set performance && set +x
command -v swaymsg &>/dev/null && set -x && swaymsg output eDP-1 mode 2880x1920@60Hz && set +x
command -v powerprofilesctl &>/dev/null && bash -x -c 'powerprofilesctl set performance'
command -v swaymsg &>/dev/null && bash -x -c 'swaymsg output eDP-1 mode 2880x1920@60Hz'
'';
})
(writeShellApplication
{
name = "battmode";
text = ''
command -v powerprofilesctl &>/dev/null && set -x && powerprofilesctl set power-saver && set +x
command -v swaymsg &>/dev/null && set -x && swaymsg output eDP-1 mode 2880x1920@120Hz && set +x
command -v powerprofilesctl &>/dev/null && bash -x -c 'powerprofilesctl set power-saver'
command -v swaymsg &>/dev/null && bash -x -c 'swaymsg output eDP-1 mode 2880x1920@120Hz'
'';
})
];