Add DWM config

This commit is contained in:
Smirnov Olexandr 2021-01-06 17:54:15 +02:00
parent 13c6216796
commit f7c0cef79f
13 changed files with 407 additions and 131 deletions

25
script/dwmbar.sh Executable file
View file

@ -0,0 +1,25 @@
#!/bin/sh
getDate() {
local date="$(date +%d.%m.%Y)"
echo "${date}"
}
getTime() {
local time="$(date +%H:%M)"
echo "${time}"
}
getVolume() {
local volume="$(amixer get Master | tail -n1 | sed -r 's/.*\[(.*)%\].*/\1/')"
echo "${volume}"
}
getKeyLayout() {
case "$(xkblayout)" in
"Eng") echo " us" ;;
"Rus") echo " ru" ;;
"Ukr") echo " ua" ;;
esac
}
while true; do
xsetroot -name " $(getVolume) | $(getKeyLayout) | $(getTime) | $(getDate)"
sleep 0
done