mirror of
https://github.com/olexsmir/dotfiles.git
synced 2026-01-15 08:41:34 +02:00
🔥 Update
This commit is contained in:
parent
ae0251b74e
commit
d5685185d7
8 changed files with 270 additions and 41 deletions
|
|
@ -3,6 +3,7 @@ declare options=("i3
|
|||
berry
|
||||
qtile
|
||||
openbox
|
||||
spectrwm
|
||||
polybar
|
||||
picom
|
||||
dunst
|
||||
|
|
@ -40,18 +41,25 @@ case "$choice" in
|
|||
"menu") choice="$HOME/.config/openbox/menu.xml" ;;
|
||||
"reload") openbox --reconfigure && pkill kitty ;;
|
||||
esac
|
||||
;;
|
||||
spectrwm)
|
||||
why=$(echo -e "spectrwm.conf\nsectrwm-bar.sh"|dmenu -p Spectrwm $@)
|
||||
case "$why" in
|
||||
"spectrwm.conf") choice="$HOME/.spectrwm.conf" ;;
|
||||
"spectrwm-bar.sh") choice="$HOME/.script/spectrwm-bar.sh" ;;
|
||||
esac
|
||||
;;
|
||||
picom) choice="$HOME/.config/picom.conf" ;;
|
||||
polybar) choice="$HOME/.config/polybar/config" ;;
|
||||
qutebrowser)
|
||||
why=$(echo -e "config.py\nquickmarks" | dmenu -p 'Qutebrowser')
|
||||
why=$(echo -e "config.py\nquickmarks"|dmenu -p 'Qutebrowser' $@)
|
||||
case "$why" in
|
||||
"config.py") choice="$HOME/.config/qutebrowser/config.py" ;;
|
||||
"quickmarks") choice="$HOME/.config/qutebrowser/quickmarks" ;;
|
||||
esac
|
||||
;;
|
||||
ranger)
|
||||
why=$(echo -e "rc.conf\nrifle.conf")
|
||||
why=$(echo -e "rc.conf\nrifle.conf"|dmenu -p 'Ranger' $@)
|
||||
case "$why" in
|
||||
"rc.conf") choice="$HOME/.config/ranger/rc.conf" ;;
|
||||
"rifle.conf") choice="$HOME/.config/ranger/rifle.conf" ;;
|
||||
|
|
@ -66,7 +74,7 @@ case "$choice" in
|
|||
;;
|
||||
tmux) choice="$HOME/.tmux.conf" ;;
|
||||
term)
|
||||
why=$(echo -e "kitty\nalacritty"|demnu -p "Term" $@)
|
||||
why=$(echo -e "kitty\nalacritty"|dmenu -p Term $@)
|
||||
case "$why" in
|
||||
kitty) choice="$HOME/.config/kitty/kitty.conf" ;;
|
||||
alacritty) choice="$hoME/.config/alacritty/alacritty.yml" ;;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
#!/bin/sh
|
||||
|
||||
declare options=("Shut Down
|
||||
Reboot
|
||||
Logout
|
||||
|
|
@ -7,7 +6,6 @@ Suspend
|
|||
Lock Screen")
|
||||
|
||||
choice=$(echo -e "${options[@]}" | dmenu -p 'Power' $@)
|
||||
|
||||
case "$choice" in
|
||||
"Shut Down")
|
||||
declare opt=("Yes\nNo")
|
||||
|
|
@ -27,9 +25,15 @@ case "$choice" in
|
|||
;;
|
||||
"Logout")
|
||||
declare opt=("Yes\nNo")
|
||||
yesno=$(echo -e "${opt[@]}" | dmenu -p 'Power' $@)
|
||||
yesno=$(echo -e "${opt[@]}" | dmenu -p 'Logout' $@)
|
||||
case "$yesno" in
|
||||
"Yes") exec loginctl terminate-session $XDG_SESSION_ID ;;
|
||||
"Yes")
|
||||
if [[ "$(pgrep spectrwm)" ]]; then
|
||||
exec pkill spectrwm
|
||||
else
|
||||
exec loginctl terminate-session $XDG_SESSION_ID
|
||||
fi
|
||||
;;
|
||||
"No") exec exit 0 ;;
|
||||
esac
|
||||
;;
|
||||
|
|
|
|||
38
script/spectrwm-bar.sh
Executable file
38
script/spectrwm-bar.sh
Executable file
|
|
@ -0,0 +1,38 @@
|
|||
#!/bin/bash
|
||||
|
||||
## WIFI SIGNAL
|
||||
wifi() {
|
||||
wifis=$(cat /proc/net/wireless | grep "wlp3s0" | awk '{print $4}' | grep -o '[0-9]*')
|
||||
echo -e " $wifis%"
|
||||
}
|
||||
|
||||
## RAM
|
||||
mem() {
|
||||
mem=`free | awk '/Mem/ {printf "%dM/%dM\n", $3 / 1024.0, $2 / 1024.0 }'`
|
||||
echo -e "$mem"
|
||||
}
|
||||
|
||||
## VOLUME
|
||||
vol() {
|
||||
vol=`amixer get Master | awk -F'[][]' 'END{ print $4":"$2 }' | sed 's/on://g'`
|
||||
echo -e " $vol"
|
||||
}
|
||||
|
||||
|
||||
## KEYBOARD
|
||||
keyl() {
|
||||
case "$(xkblayout)" in
|
||||
Eng) date="us";;
|
||||
Rus) date="ru";;
|
||||
Ukr) date="ua";;
|
||||
esac
|
||||
echo -e " $date"
|
||||
}
|
||||
|
||||
|
||||
SLEEP_SEC=0
|
||||
while :; do
|
||||
echo "+@fg=2;$(keyl) +@fg=0; +@fg=3;$(vol) +@fg=0; +@fg=4;$(wifi) +@fg=0;"
|
||||
sleep $SLEEP_SEC
|
||||
done
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue