diff options
| -rw-r--r-- | .bashrc | 14 | ||||
| -rw-r--r-- | .config/dunst/dunstrc | 2 | ||||
| -rw-r--r-- | .config/mango/config.conf | 11 | ||||
| -rwxr-xr-x | scripts/system/graphical-startup | 2 | ||||
| -rwxr-xr-x | scripts/system/idle-sleep | 20 | ||||
| -rwxr-xr-x | scripts/system/lock-computer | 2 | ||||
| -rwxr-xr-x | scripts/system/sysinfo | 31 |
7 files changed, 64 insertions, 18 deletions
@@ -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 |
