update zenUtils

This commit is contained in:
Iris Lightshard 2021-03-27 19:47:51 -04:00
parent 571d2b0d95
commit 9b49fd5537
Signed by: Iris Lightshard
GPG key ID: 3B7FBC22144E6398
7 changed files with 61 additions and 22 deletions

View file

@ -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

View file

@ -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

2
muttwrapper.sh Executable file
View file

@ -0,0 +1,2 @@
#!/bin/sh
alacritty -e neomutt "$@"

View file

@ -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

View file

@ -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.

24
plasma-autostart.sh Executable file
View file

@ -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&

View file

@ -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
esac
echo "${meter}"
sleep 10
done
echo "${meter}"
fi