mirror of
https://github.com/olexsmir/dotfiles.git
synced 2026-01-15 08:41:34 +02:00
Add DWM config
This commit is contained in:
parent
13c6216796
commit
f7c0cef79f
13 changed files with 407 additions and 131 deletions
25
script/dwmbar.sh
Executable file
25
script/dwmbar.sh
Executable 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue