From c4d6938ca6d225f15f2b04924cafaa07062b54b4 Mon Sep 17 00:00:00 2001 From: "Ja.KooLit" Date: Thu, 16 Nov 2023 15:10:32 +0900 Subject: [PATCH] waybar changes on name, style and script --- config/hypr/scripts/WaybarLayout.sh | 29 +-- config/hypr/scripts/WaybarStyles.sh | 93 +++---- config/rofi/config-waybar-layout.rasi | 240 ++++++++++++++++++ config/rofi/config-waybar-style.rasi | 240 ++++++++++++++++++ .../1080p/config-waybar-layout.rasi} | 2 +- ...g-waybar.rasi => config-waybar-style.rasi} | 2 +- .../configs/{Bottom-Left => Bottom & Left} | 0 .../configs/{Bottom-Right => Bottom & Right} | 0 .../configs/{Camellia => Camellia [Bottom]} | 0 .../{Chrysanthemum => Chrysanthemum [TOP]} | 0 .../{default-Bottom => Default [Bottom]} | 12 +- .../waybar/configs/{default => Default [TOP]} | 12 +- .../configs/{Gardenia => Gardenia [Bottom]} | 0 config/waybar/configs/{Peony => Peony [TOP]} | 0 .../configs/{simple-long => Simple-L [TOP]} | 0 .../configs/{simple-short => Simple-S [TOP]} | 0 .../configs/{Top-&-Bottom => Top & Bottom} | 0 .../waybar/configs/{Top-Left => Top & Left} | 0 .../waybar/configs/{Top-Right => Top & Right} | 0 .../{Black-&-White.css => Black & White.css} | 0 ...lors-border.css => Colored (Bordered).css} | 0 .../{colors-line.css => Colored (Lined).css} | 0 .../waybar/style/{colors.css => Colored.css} | 0 .../style/{colorful.css => Colorful.css} | 0 config/waybar/style/{dark.css => Dark.css} | 0 .../{Golden-Noir.css => Golden Noir.css} | 0 config/waybar/style/{light.css => Light.css} | 0 config/waybar/style/{pywal.css => Pywal.css} | 0 .../{Simple-Pink.css => Simple Pink.css} | 0 copy.sh | 2 +- 30 files changed, 547 insertions(+), 85 deletions(-) create mode 100644 config/rofi/config-waybar-layout.rasi create mode 100644 config/rofi/config-waybar-style.rasi rename config/rofi/{config-waybar.rasi => resolution/1080p/config-waybar-layout.rasi} (99%) rename config/rofi/resolution/1080p/{config-waybar.rasi => config-waybar-style.rasi} (99%) rename config/waybar/configs/{Bottom-Left => Bottom & Left} (100%) rename config/waybar/configs/{Bottom-Right => Bottom & Right} (100%) rename config/waybar/configs/{Camellia => Camellia [Bottom]} (100%) rename config/waybar/configs/{Chrysanthemum => Chrysanthemum [TOP]} (100%) rename config/waybar/configs/{default-Bottom => Default [Bottom]} (91%) rename config/waybar/configs/{default => Default [TOP]} (91%) rename config/waybar/configs/{Gardenia => Gardenia [Bottom]} (100%) rename config/waybar/configs/{Peony => Peony [TOP]} (100%) rename config/waybar/configs/{simple-long => Simple-L [TOP]} (100%) rename config/waybar/configs/{simple-short => Simple-S [TOP]} (100%) rename config/waybar/configs/{Top-&-Bottom => Top & Bottom} (100%) rename config/waybar/configs/{Top-Left => Top & Left} (100%) rename config/waybar/configs/{Top-Right => Top & Right} (100%) rename config/waybar/style/{Black-&-White.css => Black & White.css} (100%) rename config/waybar/style/{colors-border.css => Colored (Bordered).css} (100%) rename config/waybar/style/{colors-line.css => Colored (Lined).css} (100%) rename config/waybar/style/{colors.css => Colored.css} (100%) rename config/waybar/style/{colorful.css => Colorful.css} (100%) rename config/waybar/style/{dark.css => Dark.css} (100%) rename config/waybar/style/{Golden-Noir.css => Golden Noir.css} (100%) rename config/waybar/style/{light.css => Light.css} (100%) rename config/waybar/style/{pywal.css => Pywal.css} (100%) rename config/waybar/style/{Simple-Pink.css => Simple Pink.css} (100%) diff --git a/config/hypr/scripts/WaybarLayout.sh b/config/hypr/scripts/WaybarLayout.sh index 15d9195..dd5fc38 100755 --- a/config/hypr/scripts/WaybarLayout.sh +++ b/config/hypr/scripts/WaybarLayout.sh @@ -4,24 +4,15 @@ CONFIG="$HOME/.config/waybar/configs" WCONFIG="$HOME/.config/waybar/config" menu() { - cat < /dev/null; then - pkill rofi - exit 0 -fi + apply_style "$choice" -# Verify the selected theme -if [[ " ${STYLES[@]} " =~ " $SELECTED_STYLE " ]]; then - SWITCHTO="${SELECTED_STYLE}" -else - echo "Invalid selection" - exit 1 -fi + # Restart relevant processes + for process in waybar mako dunst; do + if pgrep -x "$process" >/dev/null; then + pkill "$process" + fi + done -# APPLY THEME -THEMEFILE="$HOME/.config/waybar/style/${SWITCHTO}.css" -if [ -f "$THEMEFILE" ]; then - ln -sf "$THEMEFILE" "$HOME/.config/waybar/style.css" -else - echo "Error: $THEMEFILE not found" - exit 1 -fi + # Launch Refresh.sh in the background + ~/.config/hypr/scripts/Refresh.sh & +} -# Restart relevant processes -for process in waybar mako dunst; do - if pidof "$process" > /dev/null; then - pkill "$process" - fi -done +# Check if rofi is already running +if pgrep -x "rofi" >/dev/null; then + pkill rofi + exit 0 +fi -exec ~/.config/hypr/scripts/Refresh.sh +main diff --git a/config/rofi/config-waybar-layout.rasi b/config/rofi/config-waybar-layout.rasi new file mode 100644 index 0000000..b953570 --- /dev/null +++ b/config/rofi/config-waybar-layout.rasi @@ -0,0 +1,240 @@ +/* ---- ๐Ÿ’ซ https://github.com/JaKooLit ๐Ÿ’ซ ---- */ + +/* ---- Configuration ---- */ +configuration { + modi: "drun,run"; + font: "Fira Code SemiBold 14"; + show-icons: true; + display-drun: "๎ฏ†"; + display-run: "๏„ "; + display-filebrowser: "๏ป"; + display-window: "๏‹"; + drun-display-format: "{name}"; + hover-select: true; + me-select-entry: "MouseSecondary"; + me-accept-entry: "MousePrimary"; + window-format: "{w} ยท {c} ยท {t}"; + +} + +/* ---- Load pywal colors (custom wal template) ---- */ +@import "~/.config/rofi/pywal-color/pywal-theme.rasi" + +/* ---- Window ---- */ +window { + width: 50%; + height: 50%; + x-offset: 0px; + y-offset: 0px; + spacing: 0px; + padding: 0px; + margin: 0px; + color: transparent; + border: 2px; + border-color: @background; + cursor: "default"; + transparency: "real"; + location: center; + anchor: center; + fullscreen: false; + enabled: true; + border-radius: 10px; +} + +/* ---- Mainbox ---- */ +mainbox { + enabled: true; + orientation: horizontal; + spacing: 0px; + margin: 0px; + background-color: transparent; + background-image: url("~/.config/rofi/.current_wallpaper", height); + children: [ "imagebox", "listbox" ]; +} + +/* ---- Imagebox ---- */ +imagebox { + padding: 18px; + background-color: transparent; + orientation: vertical; + children: [ "inputbar", "dummy", "mode-switcher" ]; +} + +/* ---- Listbox ---- */ +listbox { + spacing: 20px; + background-color: transparent; + orientation: vertical; + children: [ "message", "listview" ]; +} +/* ---- Dummy ---- */ +dummy { + background-color: transparent; +} + +/* ---- Inputbar ---- */ +inputbar { + enabled: true; + text-color: @foreground; + spacing: 10px; + padding: 15px; + border-radius: 10px; + border-color: @foreground; + children: [ "textbox-prompt-colon", "entry" ]; +} + +textbox-prompt-colon { + enabled: true; + expand: false; + str: "๐Ÿ”Ž "; + text-color: inherit; +} + +entry { + enabled: true; + background-color: transparent; + text-color: inherit; + cursor: text; + placeholder: "Choose Waybar Layout"; + placeholder-color: inherit; +} + +/* ---- Mode Switcher ---- */ +mode-switcher{ + enabled: true; + spacing: 20px; + background-color: transparent; + text-color: @foreground; +} + +button { + padding: 10px; + border-radius: 10px; + background-color: @background; + text-color: inherit; + cursor: pointer; + border: 0px; +} + +button selected { + background-color: @selected-normal-background; + text-color: @foreground; +} + +/* ---- Listview ---- */ +listview { + enabled: true; + columns: 1; + lines: 10; + cycle: true; + dynamic: true; + scrollbar: true; + layout: vertical; + reverse: false; + fixed-height: true; + fixed-columns: true; + spacing: 0px; + padding: 10px; + margin: 0px; + border-radius: 10px; + border: 0px; + background-image: url("~/.config/rofi/.current_wallpaper", height); +} + +/* ---- Element ---- */ +element { + enabled: true; + padding: 5px; + margin: 2px; + cursor: pointer; + background-color: @background; + border-radius: 10px; + border: 0px; +} + +element normal.normal { + background-color: inherit; + text-color: @foreground; +} + +element normal.urgent { + background-color: inherit; + text-color: @foreground; +} + +element normal.active { + background-color: inherit; + text-color: @foreground; +} + +element selected.normal { + background-color: @selected-normal-background; + text-color: @foreground; +} + +element selected.urgent { + background-color: inherit; + text-color: @foreground; +} + +element selected.active { + background-color: inherit; + text-color: @foreground; +} + +element alternate.normal { + background-color: inherit; + text-color: @foreground; +} + +element alternate.urgent { + background-color: inherit; + text-color: @foreground; +} + +element alternate.active { + background-color: inherit; + text-color: @foreground; +} + +element-icon { + background-color: transparent; + text-color: inherit; + size: 32px; + cursor: inherit; +} + +element-text { + background-color: transparent; + text-color: inherit; + cursor: inherit; + vertical-align: 0.5; + horizontal-align: 0.0; +} + +/*****----- Message -----*****/ +message { + background-color: transparent; + border: 0px; + margin: 20px 0px 0px 0px; + padding: 0px; + spacing: 0px; + border-radius: 10px; +} + +textbox { + padding: 15px; + margin: 0px; + border-radius: 0px; + background-color: @background; + text-color: @foreground; + vertical-align: 0.5; + horizontal-align: 0.0; +} + +error-message { + padding: 15px; + border-radius: 20px; + background-color: @background; + text-color: @foreground; +} diff --git a/config/rofi/config-waybar-style.rasi b/config/rofi/config-waybar-style.rasi new file mode 100644 index 0000000..3941594 --- /dev/null +++ b/config/rofi/config-waybar-style.rasi @@ -0,0 +1,240 @@ +/* ---- ๐Ÿ’ซ https://github.com/JaKooLit ๐Ÿ’ซ ---- */ + +/* ---- Configuration ---- */ +configuration { + modi: "drun,run"; + font: "Fira Code SemiBold 14"; + show-icons: true; + display-drun: "๎ฏ†"; + display-run: "๏„ "; + display-filebrowser: "๏ป"; + display-window: "๏‹"; + drun-display-format: "{name}"; + hover-select: true; + me-select-entry: "MouseSecondary"; + me-accept-entry: "MousePrimary"; + window-format: "{w} ยท {c} ยท {t}"; + +} + +/* ---- Load pywal colors (custom wal template) ---- */ +@import "~/.config/rofi/pywal-color/pywal-theme.rasi" + +/* ---- Window ---- */ +window { + width: 50%; + height: 50%; + x-offset: 0px; + y-offset: 0px; + spacing: 0px; + padding: 0px; + margin: 0px; + color: transparent; + border: 2px; + border-color: @background; + cursor: "default"; + transparency: "real"; + location: center; + anchor: center; + fullscreen: false; + enabled: true; + border-radius: 10px; +} + +/* ---- Mainbox ---- */ +mainbox { + enabled: true; + orientation: horizontal; + spacing: 0px; + margin: 0px; + background-color: transparent; + background-image: url("~/.config/rofi/.current_wallpaper", height); + children: [ "imagebox", "listbox" ]; +} + +/* ---- Imagebox ---- */ +imagebox { + padding: 18px; + background-color: transparent; + orientation: vertical; + children: [ "inputbar", "dummy", "mode-switcher" ]; +} + +/* ---- Listbox ---- */ +listbox { + spacing: 20px; + background-color: transparent; + orientation: vertical; + children: [ "message", "listview" ]; +} +/* ---- Dummy ---- */ +dummy { + background-color: transparent; +} + +/* ---- Inputbar ---- */ +inputbar { + enabled: true; + text-color: @foreground; + spacing: 10px; + padding: 15px; + border-radius: 10px; + border-color: @foreground; + children: [ "textbox-prompt-colon", "entry" ]; +} + +textbox-prompt-colon { + enabled: true; + expand: false; + str: "๐Ÿ”Ž "; + text-color: inherit; +} + +entry { + enabled: true; + background-color: transparent; + text-color: inherit; + cursor: text; + placeholder: "Choose Waybar Syles"; + placeholder-color: inherit; +} + +/* ---- Mode Switcher ---- */ +mode-switcher{ + enabled: true; + spacing: 20px; + background-color: transparent; + text-color: @foreground; +} + +button { + padding: 10px; + border-radius: 10px; + background-color: @background; + text-color: inherit; + cursor: pointer; + border: 0px; +} + +button selected { + background-color: @selected-normal-background; + text-color: @foreground; +} + +/* ---- Listview ---- */ +listview { + enabled: true; + columns: 1; + lines: 10; + cycle: true; + dynamic: true; + scrollbar: true; + layout: vertical; + reverse: false; + fixed-height: true; + fixed-columns: true; + spacing: 0px; + padding: 10px; + margin: 0px; + border-radius: 10px; + border: 0px; + background-image: url("~/.config/rofi/.current_wallpaper", height); +} + +/* ---- Element ---- */ +element { + enabled: true; + padding: 5px; + margin: 2px; + cursor: pointer; + background-color: @background; + border-radius: 10px; + border: 0px; +} + +element normal.normal { + background-color: inherit; + text-color: @foreground; +} + +element normal.urgent { + background-color: inherit; + text-color: @foreground; +} + +element normal.active { + background-color: inherit; + text-color: @foreground; +} + +element selected.normal { + background-color: @selected-normal-background; + text-color: @foreground; +} + +element selected.urgent { + background-color: inherit; + text-color: @foreground; +} + +element selected.active { + background-color: inherit; + text-color: @foreground; +} + +element alternate.normal { + background-color: inherit; + text-color: @foreground; +} + +element alternate.urgent { + background-color: inherit; + text-color: @foreground; +} + +element alternate.active { + background-color: inherit; + text-color: @foreground; +} + +element-icon { + background-color: transparent; + text-color: inherit; + size: 32px; + cursor: inherit; +} + +element-text { + background-color: transparent; + text-color: inherit; + cursor: inherit; + vertical-align: 0.5; + horizontal-align: 0.0; +} + +/*****----- Message -----*****/ +message { + background-color: transparent; + border: 0px; + margin: 20px 0px 0px 0px; + padding: 0px; + spacing: 0px; + border-radius: 10px; +} + +textbox { + padding: 15px; + margin: 0px; + border-radius: 0px; + background-color: @background; + text-color: @foreground; + vertical-align: 0.5; + horizontal-align: 0.0; +} + +error-message { + padding: 15px; + border-radius: 20px; + background-color: @background; + text-color: @foreground; +} diff --git a/config/rofi/config-waybar.rasi b/config/rofi/resolution/1080p/config-waybar-layout.rasi similarity index 99% rename from config/rofi/config-waybar.rasi rename to config/rofi/resolution/1080p/config-waybar-layout.rasi index 799c8c3..10f619f 100644 --- a/config/rofi/config-waybar.rasi +++ b/config/rofi/resolution/1080p/config-waybar-layout.rasi @@ -95,7 +95,7 @@ entry { background-color: transparent; text-color: inherit; cursor: text; - placeholder: "Choose Waybar Styles or Layouts"; + placeholder: "Choose Waybar Layout"; placeholder-color: inherit; } diff --git a/config/rofi/resolution/1080p/config-waybar.rasi b/config/rofi/resolution/1080p/config-waybar-style.rasi similarity index 99% rename from config/rofi/resolution/1080p/config-waybar.rasi rename to config/rofi/resolution/1080p/config-waybar-style.rasi index 799c8c3..545d9b6 100644 --- a/config/rofi/resolution/1080p/config-waybar.rasi +++ b/config/rofi/resolution/1080p/config-waybar-style.rasi @@ -95,7 +95,7 @@ entry { background-color: transparent; text-color: inherit; cursor: text; - placeholder: "Choose Waybar Styles or Layouts"; + placeholder: "Choose Waybar Syles"; placeholder-color: inherit; } diff --git a/config/waybar/configs/Bottom-Left b/config/waybar/configs/Bottom & Left similarity index 100% rename from config/waybar/configs/Bottom-Left rename to config/waybar/configs/Bottom & Left diff --git a/config/waybar/configs/Bottom-Right b/config/waybar/configs/Bottom & Right similarity index 100% rename from config/waybar/configs/Bottom-Right rename to config/waybar/configs/Bottom & Right diff --git a/config/waybar/configs/Camellia b/config/waybar/configs/Camellia [Bottom] similarity index 100% rename from config/waybar/configs/Camellia rename to config/waybar/configs/Camellia [Bottom] diff --git a/config/waybar/configs/Chrysanthemum b/config/waybar/configs/Chrysanthemum [TOP] similarity index 100% rename from config/waybar/configs/Chrysanthemum rename to config/waybar/configs/Chrysanthemum [TOP] diff --git a/config/waybar/configs/default-Bottom b/config/waybar/configs/Default [Bottom] similarity index 91% rename from config/waybar/configs/default-Bottom rename to config/waybar/configs/Default [Bottom] index 512995d..fc2a646 100644 --- a/config/waybar/configs/default-Bottom +++ b/config/waybar/configs/Default [Bottom] @@ -37,17 +37,17 @@ "custom/light_dark", "custom/separator#dot-line", "custom/lock", - //], - "custom/separator#dot-line", - "custom/keybinds", - ], + ], + //"custom/separator#dot-line", + //"custom/keybinds", + //], "modules-right": [ //"hyprland/window", "tray", "custom/separator#dot-line", - "bluetooth", - "custom/separator#dot-line", + //"bluetooth", + //"custom/separator#dot-line", //"network", //"custom/separator#dot-line", "battery", diff --git a/config/waybar/configs/default b/config/waybar/configs/Default [TOP] similarity index 91% rename from config/waybar/configs/default rename to config/waybar/configs/Default [TOP] index 2f8678f..39b13d8 100644 --- a/config/waybar/configs/default +++ b/config/waybar/configs/Default [TOP] @@ -37,17 +37,17 @@ "custom/light_dark", "custom/separator#dot-line", "custom/lock", - //], - "custom/separator#dot-line", - "custom/keybinds", - ], + ], + //"custom/separator#dot-line", + //"custom/keybinds", + //], "modules-right": [ //"hyprland/window", "tray", "custom/separator#dot-line", - "bluetooth", - "custom/separator#dot-line", + //"bluetooth", + //"custom/separator#dot-line", //"network", //"custom/separator#dot-line", "battery", diff --git a/config/waybar/configs/Gardenia b/config/waybar/configs/Gardenia [Bottom] similarity index 100% rename from config/waybar/configs/Gardenia rename to config/waybar/configs/Gardenia [Bottom] diff --git a/config/waybar/configs/Peony b/config/waybar/configs/Peony [TOP] similarity index 100% rename from config/waybar/configs/Peony rename to config/waybar/configs/Peony [TOP] diff --git a/config/waybar/configs/simple-long b/config/waybar/configs/Simple-L [TOP] similarity index 100% rename from config/waybar/configs/simple-long rename to config/waybar/configs/Simple-L [TOP] diff --git a/config/waybar/configs/simple-short b/config/waybar/configs/Simple-S [TOP] similarity index 100% rename from config/waybar/configs/simple-short rename to config/waybar/configs/Simple-S [TOP] diff --git a/config/waybar/configs/Top-&-Bottom b/config/waybar/configs/Top & Bottom similarity index 100% rename from config/waybar/configs/Top-&-Bottom rename to config/waybar/configs/Top & Bottom diff --git a/config/waybar/configs/Top-Left b/config/waybar/configs/Top & Left similarity index 100% rename from config/waybar/configs/Top-Left rename to config/waybar/configs/Top & Left diff --git a/config/waybar/configs/Top-Right b/config/waybar/configs/Top & Right similarity index 100% rename from config/waybar/configs/Top-Right rename to config/waybar/configs/Top & Right diff --git a/config/waybar/style/Black-&-White.css b/config/waybar/style/Black & White.css similarity index 100% rename from config/waybar/style/Black-&-White.css rename to config/waybar/style/Black & White.css diff --git a/config/waybar/style/colors-border.css b/config/waybar/style/Colored (Bordered).css similarity index 100% rename from config/waybar/style/colors-border.css rename to config/waybar/style/Colored (Bordered).css diff --git a/config/waybar/style/colors-line.css b/config/waybar/style/Colored (Lined).css similarity index 100% rename from config/waybar/style/colors-line.css rename to config/waybar/style/Colored (Lined).css diff --git a/config/waybar/style/colors.css b/config/waybar/style/Colored.css similarity index 100% rename from config/waybar/style/colors.css rename to config/waybar/style/Colored.css diff --git a/config/waybar/style/colorful.css b/config/waybar/style/Colorful.css similarity index 100% rename from config/waybar/style/colorful.css rename to config/waybar/style/Colorful.css diff --git a/config/waybar/style/dark.css b/config/waybar/style/Dark.css similarity index 100% rename from config/waybar/style/dark.css rename to config/waybar/style/Dark.css diff --git a/config/waybar/style/Golden-Noir.css b/config/waybar/style/Golden Noir.css similarity index 100% rename from config/waybar/style/Golden-Noir.css rename to config/waybar/style/Golden Noir.css diff --git a/config/waybar/style/light.css b/config/waybar/style/Light.css similarity index 100% rename from config/waybar/style/light.css rename to config/waybar/style/Light.css diff --git a/config/waybar/style/pywal.css b/config/waybar/style/Pywal.css similarity index 100% rename from config/waybar/style/pywal.css rename to config/waybar/style/Pywal.css diff --git a/config/waybar/style/Simple-Pink.css b/config/waybar/style/Simple Pink.css similarity index 100% rename from config/waybar/style/Simple-Pink.css rename to config/waybar/style/Simple Pink.css diff --git a/copy.sh b/copy.sh index 12aeb31..8568559 100755 --- a/copy.sh +++ b/copy.sh @@ -160,7 +160,7 @@ cp -r wallpapers ~/Pictures/ && { echo "${OK}Copy completed!"; } || { echo "${ER # Initial Symlinks to avoid errors # symlinks for waybar -ln -sf "$HOME/.config/waybar/configs/default" "$HOME/.config/waybar/config" && \ +ln -sf "$HOME/.config/waybar/configs/Default [TOP]" "$HOME/.config/waybar/config" && \ ln -sf "$HOME/.config/waybar/style/pywal.css" "$HOME/.config/waybar/style.css" && \ # symlinks for dunst