Add files via upload

This commit is contained in:
Andrew Varnavsky 2022-10-18 19:16:03 +03:00 committed by GitHub
parent 55bc15ff7b
commit 8cf0427445
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 56 additions and 1 deletions

17
scripts/dunstvol Normal file
View File

@ -0,0 +1,17 @@
#!/bin/sh
# changeVolume
msgTag="volumechange"
iconPath="/usr/share/icons/Adwaita/32x32/legacy/"
volume="$(pactl get-sink-volume 0 | awk '{print $5}' )"
mute="$(pactl get-sink-mute 0 | awk '{print $2}' )"
if [[ $volume == 0 || "$mute" == "yes" ]]; then
# Show the sound muted notification
notify-send -a "changeVolume" -h string:x-dunst-stack-tag:$msgTag -i $iconPath/audio-volume-muted.png "Volume muted" --expire-time=1000
else
# Show the volume notification
notify-send -a "changeVolume" -h string:x-dunst-stack-tag:$msgTag -i $iconPath/audio-volume-high.png -h int:value:"$volume" "Volume: ${volume}" --expire-time=1000
fi

8
scripts/restartdwm Normal file
View File

@ -0,0 +1,8 @@
#!/bin/sh
cd ~/dwm
make -j4
make install
killall dwm

19
scripts/startdwm Normal file
View File

@ -0,0 +1,19 @@
#!/bin/sh
#picom -b --vsync --experimental-backends
#feh --bg-scale ~/path/to/img.png
#setxkbmap us,ru -option 'grp:shift_alt_toggle'
# Statusbar loop
while true; do
ubar
sleep 1s # Update time every second
done &
# relaunch DWM
while true; do
# Log stderror to a file
~/.local/bin/dwm 2> ~/.dwm.log
# No error logging
#dwm >/dev/null 2>&1
done

View File

@ -1 +1,12 @@
e
#!/bin/sh
SEP="┇"
#RAM_USAGE=$( free -h | awk '/Mem:/ { printf(" %5s/%s \n", $3, $2) }' )
#CPU_USAGE=$( mpstat 1 1 | awk '/Av/ {printf(" %s% \n", $(NF-9))}' )
LANG=$( xset -q|grep LED| awk '{ if (substr ($10,5,1) == 1) print "[RU]"; else print "[EN]"; }' )
DATE_TIME=$(date +" %d.%m $SEP  %H:%M")
BATT=$(cat /sys/class/power_supply/BAT0/capacity)
xsetroot -rv -name " $SEP $LANG $SEP  $BATT% $SEP $DATE_TIME "