update:rofi launchers acc DMS
This commit is contained in:
@@ -2,34 +2,62 @@
|
||||
# run init setup.sh to symlink scripts
|
||||
THEME_FILE=~/.config/rofi/settings-manager/settings-manager.rasi
|
||||
|
||||
MONITOR=" Monitor"
|
||||
post_rofi() {
|
||||
local image_dir="$HOME/.config/rofi/images/sg"
|
||||
local current_image=$(grep "background-image: url" "$THEME_FILE" | cut -d'"' -f2)
|
||||
local new_image=$(find "$image_dir" -type f | sort -R | head -n 1 | sed "s|^$HOME|~|")
|
||||
while true; do
|
||||
if [[ "$new_image" != "$current_image" ]]; then
|
||||
sed -i 's|url("[^"]*"|url("'"$new_image"'"|' "$THEME_FILE"
|
||||
break
|
||||
fi
|
||||
new_image=$(find "$image_dir" -type f | sort -R | head -n 1 | sed "s|^$HOME|~|")
|
||||
done
|
||||
}
|
||||
|
||||
SETTINGS=" Settings"
|
||||
MONITOR=" Displays"
|
||||
WALLPAPER=" Wallpaper"
|
||||
SOUND=" Sound"
|
||||
BLUETOOTH=" Bluetooth"
|
||||
NETWORK=" Network"
|
||||
NIGHTLIGHT=" Night Light"
|
||||
STORAGE=" Disk Usage"
|
||||
# NIGHTLIGHT=" Night Light"
|
||||
|
||||
chosen=$(echo -e "$MONITOR\n$WALLPAPER\n$SOUND\n$BLUETOOTH\n$NETWORK\n$NIGHTLIGHT" | rofi -mesg " Settings" -dmenu -p "Action:" -config ~/.config/rofi/settings-manager/settings-manager.rasi -monitor "$ROFI_MONITOR")
|
||||
chosen=$(echo -e "$SETTINGS\n$MONITOR\n$NETWORK\n$SOUND\n$BLUETOOTH\n$WALLPAPER\n$STORAGE" | rofi -mesg " Settings" -dmenu -p "Action:" -config ~/.config/rofi/settings-manager/settings-manager.rasi -monitor "$ROFI_MONITOR")
|
||||
|
||||
# `dms ipc call settings tabs` to get the list of tabs
|
||||
case $chosen in
|
||||
"$SETTINGS")
|
||||
dms ipc call settings open
|
||||
;;
|
||||
"$MONITOR")
|
||||
wdisplays
|
||||
# has nightlight options on the side
|
||||
dms ipc call settings openWith displays
|
||||
# wdisplays
|
||||
;;
|
||||
"$NETWORK")
|
||||
dms ipc call settings openWith network
|
||||
# ghostty -e nmtui
|
||||
;;
|
||||
"$WALLPAPER")
|
||||
waypaper
|
||||
dms ipc call settings openWith wallpaper
|
||||
# waypaper
|
||||
;;
|
||||
"$SOUND")
|
||||
# dms ipc call settings openWith audio
|
||||
pavucontrol
|
||||
;;
|
||||
"$BLUETOOTH")
|
||||
# dms ipc call control-center openWith bluetooth
|
||||
blueman-manager
|
||||
;;
|
||||
"$NETWORK")
|
||||
ghostty -e nmtui
|
||||
;;
|
||||
"$NIGHTLIGHT")
|
||||
ghostty -e ~/.local/bin/run-wlsunset.sh
|
||||
"$STORAGE")
|
||||
ghostty -e gdu
|
||||
;;
|
||||
# "$NIGHTLIGHT")
|
||||
# ghostty -e ~/.local/bin/run-wlsunset.sh
|
||||
# ;;
|
||||
esac
|
||||
|
||||
if [[ "$HOSTNAME" == "astra" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user