update config file
This commit is contained in:
@@ -14,19 +14,27 @@ ln -sf ~/.config/waybar/style/style$SWITCHTO.css ~/.config/waybar/style.css
|
||||
#set the wofi theme
|
||||
ln -sf ~/.config/wofi/style/style$SWITCHTO.css ~/.config/wofi/style.css
|
||||
|
||||
#set the xfce theme
|
||||
xfconf-query -c xsettings -p /Net/ThemeName -s "Adwaita$SWITCHTO"
|
||||
xfconf-query -c xsettings -p /Net/IconThemeName -s "Adwaita$SWITCHTO"
|
||||
|
||||
#set the GTK theme
|
||||
gsettings set org.gnome.desktop.interface gtk-theme "Adwaita$SWITCHTO"
|
||||
gsettings set org.gnome.desktop.interface icon-theme "Adwaita$SWITCHTO"
|
||||
#set the xfce and GTK theme
|
||||
# if [ $VER == "v4" ]; then
|
||||
# xfconf-query -c xsettings -p /Net/IconThemeName -s "Papirus-Dark"
|
||||
# gsettings set org.gnome.desktop.interface icon-theme "Papirus-Dark"
|
||||
# else
|
||||
# xfconf-query -c xsettings -p /Net/IconThemeName -s "Adwaita$SWITCHTO"
|
||||
# gsettings set org.gnome.desktop.interface icon-theme "Adwaita$SWITCHTO"
|
||||
# fi
|
||||
|
||||
#change the background image and be cool about it ;)
|
||||
swww img ~/.config/hypr/wallpaper$SWITCHTO.jpg --transition-fps 60 --transition-type wipe --transition-duration 2
|
||||
|
||||
#update the sddm image
|
||||
ln -sf /usr/share/sddm/themes/sdt/Backgrounds/wallpaper$SWITCHTO.jpg /usr/share/sddm/themes/sdt/wallpaper.jpg
|
||||
#reset mako
|
||||
sleep 1
|
||||
killall -SIGUSR2 dunst
|
||||
dunst &
|
||||
|
||||
#restart the waybar
|
||||
killall -SIGUSR2 waybar
|
||||
#killall -SIGUSR2 waybar <-- start causing web brwsers to close so switched to below...
|
||||
pkill waybar
|
||||
waybar &
|
||||
|
||||
# bottom waybar
|
||||
#waybar --config ~/.config/waybar/config-bottom.jsonc
|
||||
|
||||
52
dotfiles/config/waybar/scripts/brightness
Executable file
52
dotfiles/config/waybar/scripts/brightness
Executable file
@@ -0,0 +1,52 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
iDIR="$HOME/.config/waybar/icons"
|
||||
|
||||
# Get brightness
|
||||
get_backlight() {
|
||||
LIGHT=$(printf "%.0f\n" $(brightnessctl i))
|
||||
echo "${LIGHT}%"
|
||||
}
|
||||
|
||||
# Get icons
|
||||
get_icon() {
|
||||
backlight="$(brightnessctl g)"
|
||||
current="${backlight%%%}"
|
||||
if [[ ("$current" -ge "0") && ("$current" -le "52") ]]; then
|
||||
icon="$iDIR/brightness-20.png"
|
||||
elif [[ ("$current" -ge "52") && ("$current" -le "103") ]]; then
|
||||
icon="$iDIR/brightness-40.png"
|
||||
elif [[ ("$current" -ge "103") && ("$current" -le "155") ]]; then
|
||||
icon="$iDIR/brightness-60.png"
|
||||
elif [[ ("$current" -ge "155") && ("$current" -le "207") ]]; then
|
||||
icon="$iDIR/brightness-80.png"
|
||||
elif [[ ("$current" -ge "180") && ("$current" -le "255") ]]; then
|
||||
icon="$iDIR/brightness-100.png"
|
||||
fi
|
||||
}
|
||||
|
||||
# Notify
|
||||
notify_user() {
|
||||
notify-send -h string:x-canonical-private-synchronous:sys-notify -u low -i "$icon" "Brightness : $(brightnessctl g)"
|
||||
}
|
||||
|
||||
# Increase brightness
|
||||
inc_backlight() {
|
||||
brightnessctl set 10%+ && get_icon && notify_user
|
||||
}
|
||||
|
||||
# Decrease brightness
|
||||
dec_backlight() {
|
||||
brightnessctl set 10%- && get_icon && notify_user
|
||||
}
|
||||
|
||||
# Execute accordingly
|
||||
if [[ "$1" == "--get" ]]; then
|
||||
brightnessctl g
|
||||
elif [[ "$1" == "--inc" ]]; then
|
||||
inc_backlight
|
||||
elif [[ "$1" == "--dec" ]]; then
|
||||
dec_backlight
|
||||
else
|
||||
get_backlight
|
||||
fi
|
||||
106
dotfiles/config/waybar/scripts/volume
Executable file
106
dotfiles/config/waybar/scripts/volume
Executable file
@@ -0,0 +1,106 @@
|
||||
#!/bin/bash
|
||||
|
||||
iDIR="$HOME/.config/waybar/icons"
|
||||
|
||||
# Get Volume
|
||||
get_volume() {
|
||||
volume=$(pamixer --get-volume)
|
||||
echo "$volume"
|
||||
}
|
||||
|
||||
# Get icons
|
||||
get_icon() {
|
||||
current=$(get_volume)
|
||||
if [[ "$current" -eq "0" ]]; then
|
||||
echo "$iDIR/volume-mute.png"
|
||||
elif [[ ("$current" -ge "0") && ("$current" -le "30") ]]; then
|
||||
echo "$iDIR/volume-low.png"
|
||||
elif [[ ("$current" -ge "30") && ("$current" -le "60") ]]; then
|
||||
echo "$iDIR/volume-mid.png"
|
||||
elif [[ ("$current" -ge "60") && ("$current" -le "100") ]]; then
|
||||
echo "$iDIR/volume-high.png"
|
||||
fi
|
||||
}
|
||||
|
||||
# Notify
|
||||
notify_user() {
|
||||
notify-send -h string:x-canonical-private-synchronous:sys-notify -u low -i "$(get_icon)" "Volume : $(get_volume) %"
|
||||
}
|
||||
|
||||
# Increase Volume
|
||||
inc_volume() {
|
||||
pamixer -i 5 && notify_user
|
||||
}
|
||||
|
||||
# Decrease Volume
|
||||
dec_volume() {
|
||||
pamixer -d 5 && notify_user
|
||||
}
|
||||
|
||||
# Toggle Mute
|
||||
toggle_mute() {
|
||||
if [ "$(pamixer --get-mute)" == "false" ]; then
|
||||
pamixer -m && notify-send -h string:x-canonical-private-synchronous:sys-notify -u low -i "$iDIR/volume-mute.png" "Volume Switched OFF"
|
||||
elif [ "$(pamixer --get-mute)" == "true" ]; then
|
||||
pamixer -u && notify-send -h string:x-canonical-private-synchronous:sys-notify -u low -i "$(get_icon)" "Volume Switched ON"
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggle Mic
|
||||
toggle_mic() {
|
||||
if [ "$(pamixer --default-source --get-mute)" == "false" ]; then
|
||||
pamixer --default-source -m && notify-send -h string:x-canonical-private-synchronous:sys-notify -u low -i "$iDIR/microphone-mute.png" "Microphone Switched OFF"
|
||||
elif [ "$(pamixer --default-source --get-mute)" == "true" ]; then
|
||||
pamixer -u --default-source u && notify-send -h string:x-canonical-private-synchronous:sys-notify -u low -i "$iDIR/microphone.png" "Microphone Switched ON"
|
||||
fi
|
||||
}
|
||||
# Get icons
|
||||
get_mic_icon() {
|
||||
current=$(pamixer --default-source --get-volume)
|
||||
if [[ "$current" -eq "0" ]]; then
|
||||
echo "$iDIR/microphone.png"
|
||||
elif [[ ("$current" -ge "0") && ("$current" -le "30") ]]; then
|
||||
echo "$iDIR/microphone.png"
|
||||
elif [[ ("$current" -ge "30") && ("$current" -le "60") ]]; then
|
||||
echo "$iDIR/microphone.png"
|
||||
elif [[ ("$current" -ge "60") && ("$current" -le "100") ]]; then
|
||||
echo "$iDIR/microphone.png"
|
||||
fi
|
||||
}
|
||||
# Notify
|
||||
notify_mic_user() {
|
||||
notify-send -h string:x-canonical-private-synchronous:sys-notify -u low -i "$(get_mic_icon)" "Mic-Level : $(pamixer --default-source --get-volume) %"
|
||||
}
|
||||
|
||||
# Increase MIC Volume
|
||||
inc_mic_volume() {
|
||||
pamixer --default-source -i 5 && notify_mic_user
|
||||
}
|
||||
|
||||
# Decrease MIC Volume
|
||||
dec_mic_volume() {
|
||||
pamixer --default-source -d 5 && notify_mic_user
|
||||
}
|
||||
|
||||
# Execute accordingly
|
||||
if [[ "$1" == "--get" ]]; then
|
||||
get_volume
|
||||
elif [[ "$1" == "--inc" ]]; then
|
||||
inc_volume
|
||||
elif [[ "$1" == "--dec" ]]; then
|
||||
dec_volume
|
||||
elif [[ "$1" == "--toggle" ]]; then
|
||||
toggle_mute
|
||||
elif [[ "$1" == "--toggle-mic" ]]; then
|
||||
toggle_mic
|
||||
elif [[ "$1" == "--get-icon" ]]; then
|
||||
get_icon
|
||||
elif [[ "$1" == "--get-mic-icon" ]]; then
|
||||
get_mic_icon
|
||||
elif [[ "$1" == "--mic-inc" ]]; then
|
||||
inc_mic_volume
|
||||
elif [[ "$1" == "--mic-dec" ]]; then
|
||||
dec_mic_volume
|
||||
else
|
||||
get_volume
|
||||
fi
|
||||
Reference in New Issue
Block a user