Remove obkey

This commit is contained in:
natemaia 2022-10-06 17:59:40 -07:00
parent 2bdabb3b84
commit 00ce6f6d6c
3 changed files with 39 additions and 17 deletions

View File

@ -20,6 +20,22 @@ if hash lemonbar bar >/dev/null 2>&1; then
bar 2>/dev/null &
fi
px=$(xrandr | grep ' connected' | tail -n1 | grep -o '[0-9]\+x[0-9]\+' | cut -d'x' -f2)
mm=$(xrandr | grep ' connected' | tail -n1 | grep -o '[0-9]\+mm' | tail -n1 | sed 's/mm//')
dpi=$(( (px / mm) * 25 ))
if (( dpi >= 140 )); then
:
elif (( dpi >= 120 )); then
:
elif (( dpi >= 100 )); then
:
else
:
fi
{ # compound command to redirect all output
# workspace settings

View File

@ -25,6 +25,7 @@ elif (( dpi >= 100 )); then
else
font0="-xos4-terminus-medium-r-normal--12-240-72-72-c-120-iso10646-1"
fi
font1=""
font2=""
font3=""
@ -53,12 +54,12 @@ clock()
if [[ $1 ]]; then
while :; do
date +"T%%{A1:$1:} %a %H:%M %%{A}"
sleep 10
sleep 60
done
else
while :; do
date +"T %a %H:%M "
sleep 10
sleep 60
done
fi
}
@ -67,13 +68,23 @@ battery()
{
if [[ $1 ]]; then
while :; do
printf 'B%s\n' "%{A1:$1:} Bat: $(acpi --battery 2>/dev/null | grep -v 'Unknown\| 0%' | cut -d, -f2 | tr -d '[:space:]') %{A}${separator}"
sleep 10
lvl=$(acpi --battery 2>/dev/null | grep -v 'Unknown\| 0%' | cut -d, -f2 | tr -d '[:space:]')
if [[ $lvl ]]; then
printf 'B%s\n' "%{A1:$1:} Bat: $(acpi --battery 2>/dev/null | grep -v 'Unknown\| 0%' | cut -d, -f2 | tr -d '[:space:]') %{A}${separator}"
sleep 60
else
return # no battery so we don't need to continue
fi
done
else
while :; do
printf 'B%s\n' " Bat: $(acpi --battery 2>/dev/null | grep -v 'Unknown\| 0%' | cut -d, -f2 | tr -d '[:space:]') ${separator}"
sleep 10
lvl=$(acpi --battery 2>/dev/null | grep -v 'Unknown\| 0%' | cut -d, -f2 | tr -d '[:space:]')
if [[ $lvl ]]; then
printf 'B%s\n' " Bat: $(acpi --battery 2>/dev/null | grep -v 'Unknown\| 0%' | cut -d, -f2 | tr -d '[:space:]') ${separator}"
sleep 60
else
return # no battery so we don't need to continue
fi
done
fi
}
@ -83,12 +94,12 @@ volume()
if [[ $1 ]]; then
while :; do
printf 'V%s\n' "%{A1:$1:} Vol: $(pamixer --get-volume-human) %{A}${separator}"
sleep 0.2
sleep 1
done
else
while :; do
printf 'V%s\n' " Vol: $(pamixer --get-volume-human) ${separator}"
sleep 0.2
sleep 1
done
fi
}
@ -107,20 +118,20 @@ network()
if [[ $1 ]]; then
until check; do
printf 'N%s\n' "%{A1:$1:} disconnected %{A}${separator}"
sleep 5
sleep 30
done
while :; do
printf 'N%s\n' "%{A1:$1:} connected %{A}${separator}"
sleep 100
sleep 240
done
else
until check; do
printf 'N%s\n' " disconnected %{A}${separator}"
sleep 5
sleep 30
done
while :; do
printf 'N%s\n' " connected %{A}${separator}"
sleep 100
sleep 240
done
fi
}

View File

@ -45,11 +45,6 @@
<command>kickshaw</command>
</action>
</item>
<item label="obkey">
<action name="Execute">
<command>obkey</command>
</action>
</item>
<separator/>
<item label="Edit menu.xml">
<action name="Execute">