improve t2stats performance, tweak heading comments througout
This commit is contained in:
parent
fa5f28ca3f
commit
c762b10e61
11 changed files with 80 additions and 53 deletions
|
@ -50,7 +50,7 @@ common keybinding operations with notifications
|
|||
|
||||
tint2 system load/memory, battery, and network info
|
||||
|
||||
### dynaclock
|
||||
### dynacal
|
||||
|
||||
displays either regular or arvelie clock in a tint2 executor, with an action to switch them as well
|
||||
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
# Just a background script to tell you when your battery's low if you don't
|
||||
# have a panel.
|
||||
# Lisenced under the MIT license -- do what you want
|
||||
# Copyleft 2021 Derek Stevens <drkste@zoho.com>
|
||||
# Derek Stevens <nilix@nilfm.cc>
|
||||
# MIT License
|
||||
|
||||
flag1=0
|
||||
flag2=0
|
||||
|
|
4
desks.sh
4
desks.sh
|
@ -3,8 +3,8 @@
|
|||
# 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
|
||||
# Derek Stevens <nilix@nilfm.cc>
|
||||
# MIT License
|
||||
|
||||
# if we're feeling spartan, just print a simple string for the executor
|
||||
if [ -z $1 ]; then
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
# display arvelie/neralie or gregorian time depending on toggle
|
||||
# Derek Stevens <nilix@nilfm.cc>
|
||||
# MIT License
|
||||
|
||||
if [ "$1" = "-t" ]; then
|
||||
current=$(cat ~/.time_mode)
|
||||
case ${current} in
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
# extdisplay:
|
||||
# this is a wrapper around xrandr to handle one external monitor on a laptop
|
||||
# copyleft 2020 Derek Stevens <drkste@zoho.com>
|
||||
# MIT License -- do whatever you want
|
||||
# Derek Stevens <nilix@nilfm.cc>
|
||||
# MIT License
|
||||
|
||||
helpme()
|
||||
{
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
# no arguments prints the power icon with siji font
|
||||
# -p runs the prompt in dmenu
|
||||
# use a sudoers rule with NOPASSWD or a session manager
|
||||
# copyleft 2020 Derek Stevens <drkste@zoho.com>
|
||||
# MIT License -- do whatever you want
|
||||
# Derek Stevens <nilix@nilfm.cc>
|
||||
# MIT License
|
||||
|
||||
menu() {
|
||||
dmenu "$@" -p "action >>>" -fn saucecodepronerdfont-9 -l 6 -nb black -nf grey50 -sb "#1f9b92" -sf black
|
||||
|
|
4
rio.sh
4
rio.sh
|
@ -1,5 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
# use slop and wmctrl to emulate rio behavior in an EWMH compliant WM
|
||||
# Derek Stevens <nilix@nilfm.cc>
|
||||
# MIT License
|
||||
|
||||
termcmd="alacritty --option geometry="
|
||||
movebind="super+v"
|
||||
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
# fetch your mail at regular intervals
|
||||
# Derek Stevens <nilix@nilfm.cc>
|
||||
# MIT License
|
||||
|
||||
while true; do
|
||||
mbsync -a
|
||||
sleep 5m
|
||||
|
|
21
t2stats.sh
21
t2stats.sh
|
@ -2,15 +2,22 @@
|
|||
|
||||
# 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
|
||||
# Derek Stevens <nilix@nilfm.cc>
|
||||
# MIT License
|
||||
|
||||
if [ "$1" = "-l" ]; then
|
||||
load=$(cat /proc/loadavg | awk '{print $1}')
|
||||
load=$(cat /proc/loadavg)
|
||||
set -- ${load}
|
||||
load=$3
|
||||
|
||||
memdata=$(free -h --si | grep Mem)
|
||||
swapdata=$(free -h --si | grep Swap)
|
||||
memused=$(echo ${memdata} | awk '{print $3}' )
|
||||
swapused=$(echo ${swapdata} | awk '{print $3}')
|
||||
|
||||
set -- ${memdata}
|
||||
memused=$3
|
||||
|
||||
set -- ${swapdata}
|
||||
swapused=$3
|
||||
|
||||
echo " ${load} | ${memused} | ${swapused}"
|
||||
fi
|
||||
|
@ -35,6 +42,8 @@ if [ "$1" = "-r" ]; then
|
|||
echo -n "${output}"
|
||||
|
||||
# battery
|
||||
if ! grep Full /sys/class/power_supply/BAT*/status > /dev/null \
|
||||
&& [ -d /sys/class/power_supply/BAT* ]; then
|
||||
powerlevel=$(cat /sys/class/power_supply/BAT*/capacity)
|
||||
case $powerlevel in
|
||||
0)
|
||||
|
@ -72,8 +81,6 @@ if [ "$1" = "-r" ]; then
|
|||
;;
|
||||
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
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
# wrapper for common keybinds across environments
|
||||
# by Derek Stevens <nilix@nilfm.cc>
|
||||
# MIT License
|
||||
|
||||
helpme(){
|
||||
echo "$0 < v | b > < args >"
|
||||
echo " args for v (volume) command:"
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
# make a timesheet from a month's data from the Zeit db
|
||||
# Derek Stevens <nilix@nilfm.cc>
|
||||
# MIT License
|
||||
|
||||
if [ -z $2 ]; then
|
||||
echo "usage:"
|
||||
echo " $0 MONTH YEAR"
|
||||
|
|
Loading…
Reference in a new issue