Gen 444: Consolidated desktop/laptop configs into one, differing options are declared in hosts folder

This commit is contained in:
pagedMov
2024-10-13 01:31:11 -04:00
parent 07cb5136ee
commit 1379e5a8ef
145 changed files with 21 additions and 4215 deletions

View 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
'')

View 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
'')

View 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;}'
'')

View 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
'')

View 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')
'')

View 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
'')

View 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
'')

View 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
'')

View 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
'')