aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/scripts/WaybarLayout.sh
diff options
context:
space:
mode:
authorJa.KooLit <jimmielovejay@gmail.com>2023-11-11 11:50:01 +0900
committerGitHub <noreply@github.com>2023-11-11 11:50:01 +0900
commit391e4762befd0cbd0c7db8bb43a8b5871898c462 (patch)
tree3bb61a4e7e1d3674ae4af4af8880d63295d1c786 /config/hypr/scripts/WaybarLayout.sh
parentb69298b7d4c6763d429f8c537e58723fb4439748 (diff)
parent501587a60172e955e0df3e9b3480f16bedd7698f (diff)
Merge pull request #17 from JaKooLit/Dev
Additional waybar tweaks. Added Catppuccin Mocha and Latte waybar themes.
Diffstat (limited to 'config/hypr/scripts/WaybarLayout.sh')
-rwxr-xr-xconfig/hypr/scripts/WaybarLayout.sh53
1 files changed, 53 insertions, 0 deletions
diff --git a/config/hypr/scripts/WaybarLayout.sh b/config/hypr/scripts/WaybarLayout.sh
new file mode 100755
index 00000000..87af0fa5
--- /dev/null
+++ b/config/hypr/scripts/WaybarLayout.sh
@@ -0,0 +1,53 @@
+#!/bin/bash
+
+CONFIG="$HOME/.config/waybar/configs"
+WCONFIG="$HOME/.config/waybar/config"
+
+menu() {
+ cat <<EOF
+default
+Top(gnome)
+Bottom(plasma)
+simple-long
+simple-short
+Top-&-Bottom
+Left
+Right
+Top-Left
+Top-Right
+Bottom-Left
+Bottom-Right
+all-sides
+no panel
+EOF
+}
+
+apply_config() {
+ ln -sf "$CONFIG/config-$1" "$WCONFIG"
+}
+
+main() {
+ choice=$(menu | rofi -dmenu -config ~/.config/rofi/config-waybar.rasi)
+
+ case $choice in
+ "no panel")
+ if pgrep -x "waybar" >/dev/null; then
+ pkill waybar
+ exit
+ fi
+ ;;
+ *)
+ apply_config "$choice"
+ ;;
+ esac
+}
+
+# Check if rofi is already running
+if pidof rofi >/dev/null; then
+ pkill rofi
+ exit 0
+else
+ main
+fi
+
+exec ~/.config/hypr/scripts/Refresh.sh &
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage