Gen 444: Consolidated desktop/laptop configs into one, differing options are declared in hosts folder
This commit is contained in:
12
modules/home/scripts/wm-controls/lofi.nix
Normal file
12
modules/home/scripts/wm-controls/lofi.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{ self, pkgs }:
|
||||
|
||||
|
||||
pkgs.writeShellScriptBin "lofi" (''
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if (ps aux | grep mpv | grep -v grep > /dev/null) then
|
||||
pkill mpv
|
||||
else
|
||||
runbg mpv --no-video https://www.youtube.com/live/jfKfPfyJRdk?si=OF0HKrYFFj33BzMo
|
||||
fi
|
||||
'')
|
||||
15
modules/home/scripts/wm-controls/music.nix
Normal file
15
modules/home/scripts/wm-controls/music.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{ self, pkgs }:
|
||||
|
||||
|
||||
pkgs.writeShellScriptBin "music" (''
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if (ps aux | grep audacious | grep -v grep > /dev/null) then
|
||||
pkill audacious
|
||||
else
|
||||
hyprctl dispatch exec "[workspace 5 silent] audacious -t ~/Music/playlist"
|
||||
sleep 0.5
|
||||
audtool playlist-repeat-status |grep "on" || audtool playlist-repeat-toggle
|
||||
audtool playlist-shuffle-status|grep "on" || audtool playlist-shuffle-toggle
|
||||
fi
|
||||
'')
|
||||
8
modules/home/scripts/wm-controls/power-menu.nix
Normal file
8
modules/home/scripts/wm-controls/power-menu.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{ self, pkgs }:
|
||||
|
||||
|
||||
pkgs.writeShellScriptBin "power-menu" (''
|
||||
#!/usr/bin/env bash
|
||||
|
||||
rofi -show p -modi p:'rofi-power-menu' -theme-str 'window {width: 10em; height: 15em;} listview {lines: 5;}'
|
||||
'')
|
||||
20
modules/home/scripts/wm-controls/shutdown-script.nix
Normal file
20
modules/home/scripts/wm-controls/shutdown-script.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{ self, pkgs }:
|
||||
|
||||
|
||||
pkgs.writeShellScriptBin "shutdown-script" (''
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
respond="$(echo " Shutdown\n Restart\n Cancel" | rofi -dmenu)"
|
||||
|
||||
if [ $respond = ' Shutdown' ]
|
||||
then
|
||||
echo "shutdown"
|
||||
shutdown now
|
||||
elif [ $respond = ' Restart' ]
|
||||
then
|
||||
echo "restart"
|
||||
reboot
|
||||
else
|
||||
notify-send "cancel shutdown"
|
||||
fi
|
||||
'')
|
||||
8
modules/home/scripts/wm-controls/switchmon.nix
Normal file
8
modules/home/scripts/wm-controls/switchmon.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{ self, pkgs }:
|
||||
|
||||
|
||||
pkgs.writeShellScriptBin "switchmon" (''
|
||||
#!/bin/zsh
|
||||
|
||||
hyprctl dispatch focusmonitor $(echo "$(hyprctl -j monitors)" | jq -r '.[] | select(.focused == false) | .name')
|
||||
'')
|
||||
12
modules/home/scripts/wm-controls/toggle_blur.nix
Normal file
12
modules/home/scripts/wm-controls/toggle_blur.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{ self, pkgs }:
|
||||
|
||||
|
||||
pkgs.writeShellScriptBin "toggle_blur" (''
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if hyprctl getoption decoration:blur:enabled | grep "int: 1" >/dev/null ; then
|
||||
hyprctl keyword decoration:blur:enabled false >/dev/null
|
||||
else
|
||||
hyprctl keyword decoration:blur:enabled true >/dev/null
|
||||
fi
|
||||
'')
|
||||
10
modules/home/scripts/wm-controls/toggle_float.nix
Normal file
10
modules/home/scripts/wm-controls/toggle_float.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{ self, pkgs }:
|
||||
|
||||
|
||||
pkgs.writeShellScriptBin "toggle_float" (''
|
||||
#!/usr/bin/env bash
|
||||
|
||||
hyprctl dispatch togglefloating
|
||||
hyprctl dispatch resizeactive exact 950 600
|
||||
hyprctl dispatch centerwindow
|
||||
'')
|
||||
14
modules/home/scripts/wm-controls/toggle_oppacity.nix
Normal file
14
modules/home/scripts/wm-controls/toggle_oppacity.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{ self, pkgs }:
|
||||
|
||||
|
||||
pkgs.writeShellScriptBin "toggle_oppacity" (''
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if hyprctl getoption decoration:active_opacity | grep "float: 1" >/dev/null ; then
|
||||
hyprctl keyword decoration:active_opacity 0.90 >/dev/null
|
||||
hyprctl keyword decoration:inactive_opacity 0.90 >/dev/null
|
||||
else
|
||||
hyprctl keyword decoration:active_opacity 1 >/dev/null
|
||||
hyprctl keyword decoration:inactive_opacity 1 >/dev/null
|
||||
fi
|
||||
'')
|
||||
15
modules/home/scripts/wm-controls/toggle_waybar.nix
Normal file
15
modules/home/scripts/wm-controls/toggle_waybar.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{ self, pkgs }:
|
||||
|
||||
|
||||
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