diff options
| -rw-r--r-- | .bash_profile | 2 | ||||
| -rw-r--r-- | .config/mango/config.conf | 12 | ||||
| -rwxr-xr-x | scripts/get-brightness-percentage | 5 | ||||
| -rwxr-xr-x | scripts/launchemacs | 5 | ||||
| -rwxr-xr-x | scripts/newemacs | 14 | ||||
| -rwxr-xr-x | scripts/pause-idle | 2 | ||||
| -rwxr-xr-x | scripts/system/git-ps1 (renamed from scripts/git-ps1) | 0 | ||||
| -rwxr-xr-x | scripts/system/graphical-startup (renamed from scripts/graphical-startup) | 3 | ||||
| -rwxr-xr-x | scripts/system/lock-computer (renamed from scripts/lock_computer) | 0 | ||||
| -rwxr-xr-x | scripts/system/monitor-battery | 30 | ||||
| -rwxr-xr-x | scripts/system/screenshot (renamed from scripts/screenshot) | 0 | ||||
| -rwxr-xr-x | scripts/system/sleep-computer (renamed from scripts/sleep_computer) | 2 | ||||
| -rwxr-xr-x | scripts/system/sysinfo (renamed from scripts/sysinfo) | 0 | ||||
| -rwxr-xr-x | scripts/util/checkgit (renamed from scripts/checkgit) | 0 | ||||
| -rwxr-xr-x | scripts/util/dafny (renamed from scripts/dafny) | 0 | ||||
| -rwxr-xr-x | scripts/util/focus-sway (renamed from scripts/focus-sway) | 0 | ||||
| -rwxr-xr-x | scripts/util/getprojects (renamed from scripts/getprojects) | 0 | ||||
| -rwxr-xr-x | scripts/util/killemacs (renamed from scripts/killemacs) | 0 | ||||
| -rwxr-xr-x | scripts/util/open-emacs (renamed from scripts/open-emacs) | 0 | ||||
| -rwxr-xr-x | scripts/util/open-emacs-project (renamed from scripts/open-emacs-project) | 0 | ||||
| -rwxr-xr-x | scripts/util/record (renamed from scripts/record) | 0 | ||||
| -rwxr-xr-x | scripts/util/restartemacs (renamed from scripts/restartemacs) | 0 | ||||
| -rwxr-xr-x | scripts/util/start-idle (renamed from scripts/start-idle) | 0 | ||||
| -rwxr-xr-x | scripts/util/start-xdg-portal-hyprland (renamed from scripts/start-xdg-portal-hyprland) | 0 | ||||
| -rwxr-xr-x | scripts/util/view-portage (renamed from scripts/view-portage) | 0 | ||||
| -rwxr-xr-x | scripts/util/yt-dla (renamed from scripts/yt-dla) | 0 | ||||
| -rwxr-xr-x | scripts/util/yt-dlv (renamed from scripts/yt-dlv) | 0 |
27 files changed, 40 insertions, 35 deletions
diff --git a/.bash_profile b/.bash_profile index ba43ca0..62995cf 100644 --- a/.bash_profile +++ b/.bash_profile @@ -3,7 +3,7 @@ if [ -f "$HOME/.bashrc" ]; then fi # Environment Variables -export PATH="$HOME/dotfiles/scripts/:$PATH" +export PATH="$HOME/dotfiles/scripts/util:$HOME/dotfiles/scripts/system:$PATH" export EDITOR="/bin/emacs" # Create XDG Runtime Dir diff --git a/.config/mango/config.conf b/.config/mango/config.conf index 64cd298..8eb275b 100644 --- a/.config/mango/config.conf +++ b/.config/mango/config.conf @@ -151,8 +151,8 @@ bind=SUPER,r,reload_config bind=SUPER,Return,spawn,swenu-run bind=SUPER,w,spawn,librewolf bind=SUPER,a,spawn,foot -bind=SUPER+CTRL,l,spawn,lock_computer -bind=SUPER+SHIFT+CTRL,l,spawn,sleep_computer +bind=SUPER+CTRL,l,spawn,lock-computer +bind=SUPER+SHIFT+CTRL,l,spawn,sleep-computer bind=SUPER,i,spawn,sysinfo # volume binds @@ -246,10 +246,10 @@ bind=ALT+SHIFT,Z,incgaps,-1 bind=ALT+SHIFT,R,togglegaps # movewin -bind=CTRL+SHIFT,Up,movewin,+0,-50 -bind=CTRL+SHIFT,Down,movewin,+0,+50 -bind=CTRL+SHIFT,Left,movewin,-50,+0 -bind=CTRL+SHIFT,Right,movewin,+50,+0 +# bind=CTRL+SHIFT,Up,movewin,+0,-50 +# bind=CTRL+SHIFT,Down,movewin,+0,+50 +# bind=CTRL+SHIFT,Left,movewin,-50,+0 +# bind=CTRL+SHIFT,Right,movewin,+50,+0 # resizewin bind=CTRL+ALT,Up,resizewin,+0,-50 diff --git a/scripts/get-brightness-percentage b/scripts/get-brightness-percentage deleted file mode 100755 index 1cb19ca..0000000 --- a/scripts/get-brightness-percentage +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -brightness=$(brightnessctl g) -max_brightness=$(brightnessctl m) -brightness_percentage=$(( ($brightness - 1) * 100 / ($max_brightness - 1) )) -echo "$brightness_percentage%" diff --git a/scripts/launchemacs b/scripts/launchemacs deleted file mode 100755 index 8b95242..0000000 --- a/scripts/launchemacs +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -name=$(ls -1 $XDG_RUNTIME_DIR/emacs/ | swenu -ceoil 10 -p "Workspace:") -if [ $? -eq 0 ]; then - emacsclient -c -s "$name" -fi diff --git a/scripts/newemacs b/scripts/newemacs deleted file mode 100755 index 6b7052c..0000000 --- a/scripts/newemacs +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -project_name=$(swenu -coil 10 -p "New Workspace:") -if [ $? -ne 0 ]; then - exit 1 -fi - -project_path=$(getprojects | swenu -coil 10 -p "Directory:" -s "$project_name") - -emacs --daemon="$project_name" -if [ -z "$project_path" ]; then - emacsclient -c -s "$project_name" -else - emacsclient -c -s "$project_name" -e "(dired \"$project_path\")" -fi diff --git a/scripts/pause-idle b/scripts/pause-idle deleted file mode 100755 index fa7e317..0000000 --- a/scripts/pause-idle +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -pkill -x hypridle diff --git a/scripts/git-ps1 b/scripts/system/git-ps1 index 0b860cd..0b860cd 100755 --- a/scripts/git-ps1 +++ b/scripts/system/git-ps1 diff --git a/scripts/graphical-startup b/scripts/system/graphical-startup index 877ca59..52bbb8b 100755 --- a/scripts/graphical-startup +++ b/scripts/system/graphical-startup @@ -2,5 +2,6 @@ # pipewire & dunst & swaybg -i $HOME/dotfiles/files/wallpapers/mill.png & -swayidle timeout 300 sleep_computer & +swayidle timeout 300 sleep-computer & +monitor-battery & # restartemacs >/dev/null & diff --git a/scripts/lock_computer b/scripts/system/lock-computer index 0abb3a2..0abb3a2 100755 --- a/scripts/lock_computer +++ b/scripts/system/lock-computer diff --git a/scripts/system/monitor-battery b/scripts/system/monitor-battery new file mode 100755 index 0000000..94b7365 --- /dev/null +++ b/scripts/system/monitor-battery @@ -0,0 +1,30 @@ +#!/bin/sh + +threshold=20 +very_low_threshold=10 + +amount="low" +prev_cap=100 + +while true; do + cap=$(cat /sys/class/power_supply/BAT0/capacity) + status=$(cat /sys/class/power_supply/BAT0/status) + + # when capacity changes + if [ $cap -ne $prev_cap ]; then + + # notify when drop under threshold + if [ $cap -lt $threshold ] && [ $prev_cap -ge $threshold ]; then + notify-send "Plug In" "Battery has fallen under $threshold%" + fi + + # notify every percent if very low + if [ $cap -le $very_low_threshold ] && [ $status -ne "Charging" ]; then + notify-send "BATTERY LOW" "Battery is at $bat%" + fi + + fi + + prev_cap=$cap + sleep 10 +done diff --git a/scripts/screenshot b/scripts/system/screenshot index b599be2..b599be2 100755 --- a/scripts/screenshot +++ b/scripts/system/screenshot diff --git a/scripts/sleep_computer b/scripts/system/sleep-computer index 5a62465..e7768d8 100755 --- a/scripts/sleep_computer +++ b/scripts/system/sleep-computer @@ -1,3 +1,3 @@ #!/bin/sh echo "mem" | doas tee /sys/power/state -lock_computer +lock-computer diff --git a/scripts/sysinfo b/scripts/system/sysinfo index 5cb2d07..5cb2d07 100755 --- a/scripts/sysinfo +++ b/scripts/system/sysinfo diff --git a/scripts/checkgit b/scripts/util/checkgit index 985433a..985433a 100755 --- a/scripts/checkgit +++ b/scripts/util/checkgit diff --git a/scripts/dafny b/scripts/util/dafny index 93b26a7..93b26a7 100755 --- a/scripts/dafny +++ b/scripts/util/dafny diff --git a/scripts/focus-sway b/scripts/util/focus-sway index e3c63fb..e3c63fb 100755 --- a/scripts/focus-sway +++ b/scripts/util/focus-sway diff --git a/scripts/getprojects b/scripts/util/getprojects index 3f0bd31..3f0bd31 100755 --- a/scripts/getprojects +++ b/scripts/util/getprojects diff --git a/scripts/killemacs b/scripts/util/killemacs index 1228018..1228018 100755 --- a/scripts/killemacs +++ b/scripts/util/killemacs diff --git a/scripts/open-emacs b/scripts/util/open-emacs index 2f63efd..2f63efd 100755 --- a/scripts/open-emacs +++ b/scripts/util/open-emacs diff --git a/scripts/open-emacs-project b/scripts/util/open-emacs-project index 48360b1..48360b1 100755 --- a/scripts/open-emacs-project +++ b/scripts/util/open-emacs-project diff --git a/scripts/record b/scripts/util/record index c061b5e..c061b5e 100755 --- a/scripts/record +++ b/scripts/util/record diff --git a/scripts/restartemacs b/scripts/util/restartemacs index 7f2cee4..7f2cee4 100755 --- a/scripts/restartemacs +++ b/scripts/util/restartemacs diff --git a/scripts/start-idle b/scripts/util/start-idle index f16b66a..f16b66a 100755 --- a/scripts/start-idle +++ b/scripts/util/start-idle diff --git a/scripts/start-xdg-portal-hyprland b/scripts/util/start-xdg-portal-hyprland index 80a17dd..80a17dd 100755 --- a/scripts/start-xdg-portal-hyprland +++ b/scripts/util/start-xdg-portal-hyprland diff --git a/scripts/view-portage b/scripts/util/view-portage index f2fcb00..f2fcb00 100755 --- a/scripts/view-portage +++ b/scripts/util/view-portage diff --git a/scripts/yt-dla b/scripts/util/yt-dla index f87f145..f87f145 100755 --- a/scripts/yt-dla +++ b/scripts/util/yt-dla diff --git a/scripts/yt-dlv b/scripts/util/yt-dlv index 6b96b4e..6b96b4e 100755 --- a/scripts/yt-dlv +++ b/scripts/util/yt-dlv |
