Skip to content

Commit

Permalink
update outdated function
Browse files Browse the repository at this point in the history
  • Loading branch information
ocfox committed Sep 12, 2023
1 parent 7fac5ff commit 93a2db9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 21 deletions.
2 changes: 1 addition & 1 deletion home-desktop/_pkgs/macshot.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
with pkgs;
pkgs.writeShellScriptBin "macshot" ''
file=/tmp/xxx.png
${lib.getExe sway-contrib.grimshot} --notify save area /tmp/src.png >> /dev/null 2>&1
${lib.getExe' sway-contrib.grimshot "grimshot"} --notify save area /tmp/src.png >> /dev/null 2>&1
${imagemagick}/bin/convert /tmp/src.png \
\( +clone -alpha extract \
Expand Down
27 changes: 8 additions & 19 deletions home-desktop/_pkgs/powermenu.nix
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
{ lib
, pkgs
}:
{ lib, pkgs }:
pkgs.writeShellScriptBin "powermenu" ''
options="shutdown\nreboot\nsuspend"
selection="$(${pkgs.coreutils}/bin/echo -e $options | \
${lib.getExe pkgs.bemenu} -i -l 4 -c -W 0.3)"
case $selection in
shutdown) ${pkgs.systemd}/bin/systemctl poweroff
exit 0
;;
reboot) ${pkgs.systemd}/bin/systemctl reboot
exit 0
;;
suspend) ${pkgs.systemd}/bin/systemctl suspend
exit 0
;;
esac
echo '
reboot = systemctl reboot
poweroff = systemctl poweroff
suspend = systemctl suspend
sleep = systemctl hybrid-sleep
' | \
${lib.getExe' pkgs.kickoff "kickoff"} --from-stdin
''
2 changes: 1 addition & 1 deletion home-desktop/_pkgs/recorder-toggle.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pkgs.writeShellScriptBin "screen-recorder-toggle" ''
if [ $status != 0 ]
then
${lib.getExe pkgs.wf-recorder} -g "$(${lib.getExe pkgs.slurp})" -f $HOME/Videos/record/$(date +'recording_%Y-%m-%d-%H%M%S.mp4');
${lib.getExe' pkgs.wf-recorder "wf-recorder"} -g "$(${lib.getExe pkgs.slurp})" -f $HOME/Videos/record/$(date +'recording_%Y-%m-%d-%H%M%S.mp4');
else
${pkgs.procps}/bin/pkill --signal SIGINT wf-recorder
fi;
Expand Down

0 comments on commit 93a2db9

Please sign in to comment.