aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Stevens <nilix@nilfm.cc>2021-11-26 22:50:27 -0700
committerDerek Stevens <nilix@nilfm.cc>2021-11-26 22:50:27 -0700
commit6668809aff0eff01aa65f901c0c62e29c25c125c (patch)
tree337a4df2b6f5a6777cfbf18a50943fba273ac1ec
parentb44cc9e96896c28a5aa5abebdb8de47791991445 (diff)
update/cleanup
-rw-r--r--README.md39
-rwxr-xr-xdesks.sh40
-rwxr-xr-xlogout.sh8
-rwxr-xr-xmuttwrapper.sh2
-rwxr-xr-xplasma-autostart.sh22
-rwxr-xr-xsirius.sh6
-rwxr-xr-xt2stats.sh79
-rwxr-xr-xtranssetter.sh51
8 files changed, 13 insertions, 234 deletions
diff --git a/README.md b/README.md
index d3414c2..f601adf 100644
--- a/README.md
+++ b/README.md
@@ -1,28 +1,13 @@
# [[ zenUtils ]]
### --refined UI helper scripts--
-#### Derek Stevens <drkste@zoho.com>
+#### Derek Stevens <nilix@nilfm.cc>
## About
This is a simple collection of helper scripts to round out my two common desktop sessions:
-
-Plasma 'lite':
-* kwin
-* alacritty
-* plasmashell
-* tint2
-* dunst
-* xbindkeys
-
-Ryudo:
* ryudo
-* alacritty
-* nitrogen
-* xosview
-* xclock
-* dunst
-* xbindkeys
+* fluxbox
### extdisplay
@@ -32,19 +17,6 @@ Wrapper script around `xrandr` to handle a second monitor on a laptop.
Wrapper script around `nmtui` to aid in network configuration in the absence of nm-applet. An alacritty config file hardcodes the colors for the `ncurses` interface.
-### t2stats
-
-Status script to run in an Executor of `tint2` which gives network and battery status.
-
-* __network__ is given as any of `offline`, `wired`, or `wifi/<network SSID>`.
-* __battery__ is given as a progress/HP bar like so ` ` where each block character (``) represents approximately 20% of charge.
-
-Battery alert notifications are handled by `tint2` natively, even when the native battery applet is hidden, so that functionality is not present in the script. Network connection/disconnection notifications are planned.
-
-### desks
-
-Helper script to run in an Executor of `tint2` which allows scrolling of desktops on the executor.
-
### logout
Dmenu script to provide session/power management menu.
@@ -53,13 +25,10 @@ Dmenu script to provide session/power management menu.
Simple script to tell you when your battery's running out when you don't have a panel.
-### sleepy
-
-Lightweight ACPI handler to put a laptop to sleep when you close the lid and it's not plugged in.
+### sirius
-### transsetter
+Background worker to sync an imap mailbox.
-Background script to apply translucency to terminal and editor windows with `transset`, `xshove`, and `xcompmgr`
### ztabelle
Generate a timesheet for a given month by manipulating the output from `zeit`
diff --git a/desks.sh b/desks.sh
deleted file mode 100755
index 8df6abd..0000000
--- a/desks.sh
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/bin/sh
-
-# this is a simple script to both give some semblance of eye-candy for a tint2 executor
-# and to switch virtual desktops programmatically, to be invoked by button click/scroll
-# on said executor.
-# copyleft 2020 Derek Stevens <drkste@zoho.com>
-# MIT License - do whatever you want
-
-# if we're feeling spartan, just print a simple string for the executor
-if [ -z $1 ]; then
- echo ""
-
-# if we pass '-x', spit a few hexadecimal bytes into the executor for eye-candy
-elif [ "$1" = "-x" ]; then
- od -vAn -N2 -x < /dev/urandom
-
-# otherwise switch desks
-else
- currentDeskNum=$(wmctrl -d | grep -n [*] | awk '{print $1}' | awk -F : '{print $1}')
- numDesks=$(wmctrl -d | wc -l)
-
- case $1 in
- "-n")
- if [ ${currentDeskNum} -eq ${numDesks} ]; then
- newDesk=$(wmctrl -d | head -n 1 | awk '{print $1}')
- else
- newDesk=$(wmctrl -d | head -n $((currentDeskNum + 1)) | tail -n 1 | awk '{print $1}')
- fi
- ;;
- "-p")
- if [ ${currentDeskNum} -eq 1 ]; then
- newDesk=$(wmctrl -d | tail -n 1 | awk '{print $1}')
- else
- newDesk=$(wmctrl -d | head -n $((currentDeskNum - 1)) | tail -n 1 | awk '{print $1}')
- fi
- ;;
- esac
-
- wmctrl -s ${newDesk}
-fi
diff --git a/logout.sh b/logout.sh
index 05a5dde..86c202d 100755
--- a/logout.sh
+++ b/logout.sh
@@ -14,7 +14,7 @@ menu() {
printopts() {
- printf "shutdown\nreboot\nsuspend\nhibernate\nlogout"
+ printf "shutdown\nreboot\nsuspend\nlogout"
}
handler() {
@@ -31,12 +31,10 @@ handler() {
logout)
if pgrep sddm-helper; then
killall sddm-helper
- elif pgrep plasmashell; then
- killall plasmashell
elif pgrep ryudo; then
- pkill -9 -P $(pgrep startx)
+ killall ryudo
else
- killall -0 Xorg
+ killall -0 Xorg
fi
;;
hibernate)
diff --git a/muttwrapper.sh b/muttwrapper.sh
deleted file mode 100755
index 557966b..0000000
--- a/muttwrapper.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-alacritty -e neomutt "$@"
diff --git a/plasma-autostart.sh b/plasma-autostart.sh
deleted file mode 100755
index 5ee2159..0000000
--- a/plasma-autostart.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-
-xset -b
-sudo powertop -auto-tune &
-redshit -x; redshift -O 6000K &
-xbacklight -set 50 &
-
-if ! pgrep offlineimap; then
- offlineimap &
-fi
-
-if ! pgrep pipewire; then
- pipewire & sleep 0.3
- pipewire-pulse &
-fi
-
-export WINIT_X11_SCALE_FACTOR=1
-export GTK_THEME=steppenwolf-dark
-rm ~/.config/gtkrc*
-export WINIT_X11_SCALE_FACTOR=1
-xbindkeys -f ~/.xbindkeysrc.kwin
-tint2&
diff --git a/sirius.sh b/sirius.sh
new file mode 100755
index 0000000..96ec89c
--- /dev/null
+++ b/sirius.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+while true; do
+ mbsync -a
+ sleep 5m
+done
diff --git a/t2stats.sh b/t2stats.sh
deleted file mode 100755
index b1c790c..0000000
--- a/t2stats.sh
+++ /dev/null
@@ -1,79 +0,0 @@
-#!/bin/sh
-
-# t2stats:
-# this is a simple network/battery status indicator to be used with tint2
-# copyleft 2020 Derek Stevens <drkste@zoho.com>
-# MIT License -- do whatever you want
-
-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)
- ORS=" "
-
- if [ ! -z "${possiblyeth}" ]; then
- output=wired
- elif [ ! -z "${possiblywifi}" ]; then
- output="wifi/$(echo ${possiblywifi} |\
- awk 'BEGIN { ORS=" " }; {for (i=1; i<=(NF-3);i++) print $i}')"
- else
- output=offline
- fi
-
- echo -n "${output}"
-
- # battery
- powerlevel=$(cat /sys/class/power_supply/BAT*/capacity)
- case $powerlevel in
- 0)
- meter=" "
- ;;
- 1|2|3|4|5|6|7|8|9)
- meter=" "
- ;;
- 10|11|12|13|14|15|16|17|18|19)
- meter=" "
- ;;
- 20|21|22|23|24|25|26|27|28|29)
- meter=" "
- ;;
- 30|31|32|33|34|35|36|37|38|39)
- meter=" "
- ;;
- 40|41|42|43|44|45|46|47|48|49)
- meter=" "
- ;;
- 50|51|52|53|54|55|56|57|58|59)
- meter=" "
- ;;
- 60|61|62|63|64|65|66|67|68|69)
- meter=" "
- ;;
- 70|71|72|73|74|75|76|77|78|79)
- meter=" "
- ;;
- 80|81|82|83|84|85|86|87|88|89)
- meter=""
- ;;
- *)
- meter=""
- ;;
- esac
-
- if ! grep Full /sys/class/power_supply/BAT*/status > /dev/null \
- && file /sys/class/power_supply/BAT* > /dev/null; then
- echo " ${meter}"
- fi
-fi
diff --git a/transsetter.sh b/transsetter.sh
deleted file mode 100755
index ce50051..0000000
--- a/transsetter.sh
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/bin/sh
-
-# A background script to provide terminal/editor compositing in a Ryudo
-# session.
-# Licensed under the MIT License -- do what you want with it.
-# Copyleft 2021 Derek Stevens <drkste@zoho.com>
-
-termprog=Alacritty
-geditor=acme
-opacity=0.85
-
-setter=$(which transset)
-if [ -z "$setter" ]; then
- setter=$(which transset-df)
-fi
-
-if [ -z "$setter" ]; then
- echo "we need transset or transset-df in PATH!"
- exit 1
-fi
-
-#if which xcompmgr > /dev/null; then
-# xcompmgr -n&
-#else
-# ehco "we need xcompmgr in PATH!"
-# exit 1
-#fi
-
-if ! which xshove > /dev/null; then
- echo "we need xshove in PATH!"
- exit 1
-fi
-
-wlist=$(mktemp)
-oldwlist=$(mktemp)
-while true; do
- xshove > $wlist
- while read wprop; do
- wid=$(echo ${wprop} | awk '{print $1}')
- if ! grep $wid $oldwlist > /dev/null; then
- wclass=$(echo ${wprop} | awk '{print $3}')
- if [ "$wclass" = "${geditor}" ]; then
- $setter -i 0x$wid ${opacity} > /dev/null
- elif [ "${wclass}" = "${termprog}" ]; then
- $setter -i 0x$wid ${opacity} > /dev/null
- fi
- fi
- done < $wlist
- cat $wlist > $oldwlist;
- sleep 0.2
-done