Gen 423: Converted shell scripts into nix files
This commit is contained in:
16
glasshouse-laptop/home/scripts/toggle_waybar.nix
Normal file
16
glasshouse-laptop/home/scripts/toggle_waybar.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{ pkgs }:
|
||||
|
||||
{
|
||||
toggle_waybar = pkgs.writeShellScriptBin "toggle_waybar" (''
|
||||
#!/usr/bin/env bash
|
||||
|
||||
SERVICE=".waybar-wrapped"
|
||||
|
||||
if pgrep -x "$SERVICE" >/dev/null
|
||||
then
|
||||
pkill -9 waybar
|
||||
else
|
||||
runbg waybar
|
||||
fi
|
||||
'');
|
||||
}
|
||||
Reference in New Issue
Block a user