aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Stevens <nilix@nilfm.cc>2021-03-27 19:47:51 -0400
committerDerek Stevens <nilix@nilfm.cc>2021-03-27 19:47:51 -0400
commit9b49fd553731418b49b542de822392d61f9fe4ff (patch)
treef7023b273193247949cd054aebcf8bf6420b1630
parent571d2b0d95ccc03a2c63a27a2e3b3222979ed752 (diff)
update zenUtils
-rwxr-xr-xextdisplay.sh5
-rwxr-xr-xlogout.sh14
-rwxr-xr-xmuttwrapper.sh2
-rwxr-xr-xnmtuiWin.sh2
-rw-r--r--nmtui_alacritty.yml8
-rwxr-xr-xplasma-autostart.sh24
-rwxr-xr-xt2stats.sh28
7 files changed, 61 insertions, 22 deletions
diff --git a/extdisplay.sh b/extdisplay.sh
index 8f304a9..c70e290 100755
--- a/extdisplay.sh
+++ b/extdisplay.sh
@@ -19,10 +19,11 @@ helpme()
if [ -z $1 ]; then
helpme
+ exit 0
fi
-native=xrandr | grep LVDS | awk '{print $1}'
-plugged=xrandr | grep connected | grep -v ${native} | awk '{print $1}'
+native=$(xrandr | grep LVDS | awk '{print $1}')
+plugged=$(xrandr | grep connected | grep -v disconnected | grep -v ${native} | awk '{print $1}')
if [ "$1" = solo ]; then
xrandr --output ${plugged} --primary
diff --git a/logout.sh b/logout.sh
index 569b9bc..46aeb99 100755
--- a/logout.sh
+++ b/logout.sh
@@ -29,11 +29,15 @@ handler() {
zzz
;;
logout)
- if pgrep kwin; then
- pkill -9 -P $(pgrep .kwin-session)
- elif pgrep ryudo; then
- kill $(pgrep ryudo)
- else killall Xorg; fi
+ if pgrep sddm-helper; then
+ killall sddm-helper
+ elif [ "$SESH" = "kwin" ]; then
+ killall plasmashell
+ elif [ "$SESH" = "ryudo" ]; then
+ pkill -9 -P $(pgrep ryudo)
+ else
+ killall -0 Xorg
+ fi
;;
hibernate)
ZZZ
diff --git a/muttwrapper.sh b/muttwrapper.sh
new file mode 100755
index 0000000..557966b
--- /dev/null
+++ b/muttwrapper.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+alacritty -e neomutt "$@"
diff --git a/nmtuiWin.sh b/nmtuiWin.sh
index f60c286..2f08d5a 100755
--- a/nmtuiWin.sh
+++ b/nmtuiWin.sh
@@ -7,7 +7,7 @@
# MIT License -- do whatever you want
if [ $(pgrep nmtui) -gt 0 ]; then
- exec alacritty -d 80 30 --position 9999 0 -t "Network Configuration" \
+ exec alacritty -t "Network Configuration" \
--config-file ~/src/zenUtils/nmtui_alacritty.yml -e nmtui &
else
killall nmtui
diff --git a/nmtui_alacritty.yml b/nmtui_alacritty.yml
index ecedbbb..d7a49f9 100644
--- a/nmtui_alacritty.yml
+++ b/nmtui_alacritty.yml
@@ -28,15 +28,15 @@ window:
# fall back to the window manager's recommended size.
dimensions:
columns: 80
- lines: 24
+ lines: 30
# Window position (changes require restart)
#
# Specified in number of pixels.
# If the position is not set, the window manager will handle the placement.
#position:
- # x: 0
- # y: 0
+ x: 9999
+ y: 0
# Window padding (changes require restart)
#
@@ -147,7 +147,7 @@ font:
#style: Bold Italic
# Point size
- size: 6
+ size: 9
# Offset is the extra space around each character. `offset.y` can be thought of
# as modifying the line spacing, and `offset.x` as modifying the letter spacing.
diff --git a/plasma-autostart.sh b/plasma-autostart.sh
new file mode 100755
index 0000000..3606975
--- /dev/null
+++ b/plasma-autostart.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+xset -b
+sudo powertop -auto-tune &
+redshit -x; redshift -O 6000K &
+xbacklight -set 50 &
+
+if ! pgrep pulseaudio; then
+ pulseaudio -k
+ pulseaudio --start --exit-idle-time=-1 &
+fi
+if ! pgrep hamster-service; then
+ hamster-service &
+fi
+if ! pgrep offlineimap; then
+ offlineimap &
+fi
+
+
+export GTK_THEME=steppenwolf-dark
+rm ~/.config/gtkrc*
+export WINIT_X11_SCALE_FACTOR=1
+xbindkeys -f ~/.xbindkeysrc.kwin
+tint2&
diff --git a/t2stats.sh b/t2stats.sh
index c4916a2..3e96bd4 100755
--- a/t2stats.sh
+++ b/t2stats.sh
@@ -5,8 +5,19 @@
# copyleft 2020 Derek Stevens <drkste@zoho.com>
# MIT License -- do whatever you want
-while true; do
-# network
+if [ "$1" = "-l" ]; then
+ load=$(cat /proc/loadavg | awk '{print $1}')
+ memdata=$(free -h --si | grep Mem)
+ swapdata=$(free -h --si | grep Swap)
+ memused=$(echo ${memdata} | awk '{print $3}' )
+ swapused=$(echo ${swapdata} | awk '{print $3}')
+
+ echo " ${load} | ${memused} | ${swapused}"
+fi
+
+if [ "$1" = "-r" ]; then
+
+ # network
actives=$(nmcli connection show --active)
possiblywifi=$(echo "${actives}" | grep wifi)
possiblyeth=$(echo "${actives}" | grep Wired)
@@ -23,15 +34,14 @@ while true; do
echo -n "${output} "
-# battery
-
+ # battery
powerlevel=$(cat /sys/class/power_supply/BAT*/capacity)
case $powerlevel in
0)
meter=" "
;;
1|2|3|4|5|6|7|8|9)
- meter=" "
+ meter="[ "
;;
10|11|12|13|14|15|16|17|18|19)
meter=" "
@@ -60,9 +70,7 @@ while true; do
*)
meter=""
;;
- esac
-
- echo "${meter}"
+ esac
- sleep 10
-done
+ echo "${meter}"
+fi