summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Jamison <jackqjamison@gmail.com>2026-05-22 20:51:22 -0400
committerJack Jamison <jackqjamison@gmail.com>2026-05-22 20:51:22 -0400
commit8d71a22569315b56144799b96f7d2dec7cc0f1c9 (patch)
tree102e0575499c9e4c825af4463da9a129189b6e1d
parent825e81343502ae9ad15a70c7f52634617d865b6d (diff)
better scripts and sleep toggle
-rw-r--r--.bashrc14
-rw-r--r--.config/dunst/dunstrc2
-rw-r--r--.config/mango/config.conf11
-rwxr-xr-xscripts/system/graphical-startup2
-rwxr-xr-xscripts/system/idle-sleep20
-rwxr-xr-xscripts/system/lock-computer2
-rwxr-xr-xscripts/system/sysinfo31
7 files changed, 64 insertions, 18 deletions
diff --git a/.bashrc b/.bashrc
index 9bbdbd2..fdf628b 100644
--- a/.bashrc
+++ b/.bashrc
@@ -19,9 +19,19 @@ shopt -s autocd # Equivalent to setopt autocd
# Disable Beep
bind 'set bell-style none'
-# Aliases
-alias ls='ls --color=auto'
+# Aliases that significantly change function
+alias cp="cp -iv"
+alias mv="mv -iv"
+alias rm="rm -Iv"
+alias mkdir="mkdir -pv"
+
+
+# Juice Aliases
+alias ls='ls -hN --color=auto --group-directories-first'
alias grep='grep --color=auto'
+alias diff='diff --color=auto'
+alias ip='ip -color=auto'
+alias tree='tree --gitignore -I .git'
# Flow control
stty -ixon
diff --git a/.config/dunst/dunstrc b/.config/dunst/dunstrc
index 10cd563..6d8b5ab 100644
--- a/.config/dunst/dunstrc
+++ b/.config/dunst/dunstrc
@@ -120,7 +120,7 @@
### Text ###
- font = DejaVu Sans Mono 10.6
+ font = DejaVu Sans Mono 13
# The spacing between lines. If the height is smaller than the
# font height, it will get raised to the font height.
diff --git a/.config/mango/config.conf b/.config/mango/config.conf
index 730b113..38646ce 100644
--- a/.config/mango/config.conf
+++ b/.config/mango/config.conf
@@ -156,6 +156,7 @@ bind=SUPER+SHIFT+CTRL,l,spawn,sleep-computer
bind=SUPER,i,spawn,sysinfo
bind=SUPER,s,spawn,screenshot -save
bind=SUPER+SHIFT,s,spawn,screenshot
+bind=SUPER+SHIFT,I,spawn,idle-sleep -t
# volume binds
bind=NONE,XF86AudioRaiseVolume,spawn,wpctl set-volume @DEFAULT_SINK@ 5%+
@@ -195,10 +196,11 @@ bind=SUPER,v,togglefloating,
bind=ALT,a,togglemaximizescreen,
bind=SUPER,f,togglefullscreen,
bind=ALT+SHIFT,f,togglefakefullscreen,
-#bind=SUPER,i,minimized,
bind=SUPER,o,toggleoverlay,
-bind=SUPER+SHIFT,I,restore_minimized
-bind=ALT,z,toggle_scratchpad
+
+# scratchpad
+binds=SUPER+SHIFT,code:20,minimized,
+bind=SUPER,minus,toggle_scratchpad
# scroller layout
bind=ALT,e,set_proportion,1.0
@@ -271,3 +273,6 @@ axisbind=SUPER,DOWN,viewtoright_have_client
# layer rule
layerrule=animation_type_open:zoom,layer_name:rofi
layerrule=animation_type_close:zoom,layer_name:rofi
+
+# lid switchbind
+switchbind=fold,spawn,lock-computer
diff --git a/scripts/system/graphical-startup b/scripts/system/graphical-startup
index b78de30..2b46050 100755
--- a/scripts/system/graphical-startup
+++ b/scripts/system/graphical-startup
@@ -4,7 +4,7 @@
pipewire &
dunst &
swaybg -i $HOME/dotfiles/files/wallpapers/mill.png &
-swayidle timeout 300 sleep-computer &
+idle-sleep &
monitor-battery &
# restartemacs >/dev/null &
diff --git a/scripts/system/idle-sleep b/scripts/system/idle-sleep
new file mode 100755
index 0000000..3d1dbd9
--- /dev/null
+++ b/scripts/system/idle-sleep
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+sway_idle() {
+ swayidle timeout 300 sleep-computer
+}
+
+if [ -n "$1" ] && [ $1 = "-t" ]; then
+ # toggle
+ if pgrep --quiet swayidle; then
+ notify-send "Idle Disabled" "Computer will not sleep when idle"
+ pkill swayidle
+ else
+ notify-send "Idle Enabled" "Computer will sleep when idle"
+ sway_idle
+ fi
+else
+ # start
+ sway_idle
+fi
+
diff --git a/scripts/system/lock-computer b/scripts/system/lock-computer
index 0abb3a2..c09d034 100755
--- a/scripts/system/lock-computer
+++ b/scripts/system/lock-computer
@@ -1,4 +1,4 @@
#!/bin/sh
-if not pgrep swaylock; then
+if ! pgrep swaylock; then
swaylock
fi
diff --git a/scripts/system/sysinfo b/scripts/system/sysinfo
index 5cb2d07..34f23b4 100755
--- a/scripts/system/sysinfo
+++ b/scripts/system/sysinfo
@@ -17,21 +17,32 @@ get_message() {
# Network Info
net_device=$(ip a | grep "state UP" | awk -F': ' '{ printf($2) }')
- case "${net_device}" in
- wlan*)
- connected_network=$(iwctl station ${net_device} show | grep 'Connected network' \
- | awk -F' ' '{ printf($3) }')
- ;;
- eth*)
- ;;
- esac
- echo "${net_device}: ${connected_network}"
+ if ! [ -z $net_device ]; then
+ case "${net_device}" in
+ wlan*)
+ connected_network=$(iwctl station ${net_device} show | grep 'Connected network' \
+ | awk -F' ' '{ printf($3) }')
+ ;;
+ eth*)
+ ;;
+ esac
+ echo "${net_device}: ${connected_network}"
+ else
+ echo "Network: DOWN"
+ fi
+
+ echo ""
+
+ # Idle monitor status
+ pgrep --quiet swayidle && echo "Idle Sleep: Enabled" || echo "Idle Sleep: Disabled"
}
message=$(get_message)
if [ "$TERM" = "linux" ]; then
- notify-send "System Info" "$message"
+ replace_id=$(cat $XDG_RUNTIME_DIR/sysinfoid)
+ [ ! -z $replace_id ] && replace_arg="-r $replace_id"
+ notify-send $replace_arg -p "System Info" "$message" > $XDG_RUNTIME_DIR/sysinfoid
else
echo "$message"
fi