Browse Source

waybar changes on name, style and script

pull/24/head
Ja.KooLit 2 years ago
parent
commit
c4d6938ca6
  1. 29
      config/hypr/scripts/WaybarLayout.sh
  2. 93
      config/hypr/scripts/WaybarStyles.sh
  3. 240
      config/rofi/config-waybar-layout.rasi
  4. 240
      config/rofi/config-waybar-style.rasi
  5. 2
      config/rofi/resolution/1080p/config-waybar-layout.rasi
  6. 2
      config/rofi/resolution/1080p/config-waybar-style.rasi
  7. 0
      config/waybar/configs/Bottom & Left
  8. 0
      config/waybar/configs/Bottom & Right
  9. 0
      config/waybar/configs/Camellia [Bottom]
  10. 0
      config/waybar/configs/Chrysanthemum [TOP]
  11. 10
      config/waybar/configs/Default [Bottom]
  12. 10
      config/waybar/configs/Default [TOP]
  13. 0
      config/waybar/configs/Gardenia [Bottom]
  14. 0
      config/waybar/configs/Peony [TOP]
  15. 0
      config/waybar/configs/Simple-L [TOP]
  16. 0
      config/waybar/configs/Simple-S [TOP]
  17. 0
      config/waybar/configs/Top & Bottom
  18. 0
      config/waybar/configs/Top & Left
  19. 0
      config/waybar/configs/Top & Right
  20. 0
      config/waybar/style/Black & White.css
  21. 0
      config/waybar/style/Colored (Bordered).css
  22. 0
      config/waybar/style/Colored (Lined).css
  23. 0
      config/waybar/style/Colored.css
  24. 0
      config/waybar/style/Colorful.css
  25. 0
      config/waybar/style/Dark.css
  26. 0
      config/waybar/style/Golden Noir.css
  27. 0
      config/waybar/style/Light.css
  28. 0
      config/waybar/style/Pywal.css
  29. 0
      config/waybar/style/Simple Pink.css
  30. 2
      copy.sh

29
config/hypr/scripts/WaybarLayout.sh

@ -4,24 +4,15 @@ CONFIG="$HOME/.config/waybar/configs"
WCONFIG="$HOME/.config/waybar/config" WCONFIG="$HOME/.config/waybar/config"
menu() { menu() {
cat <<EOF # List only files (excluding directories) in the directory and sort alphabetically
default options=()
default-Bottom while IFS= read -r file; do
Peony if [ -f "$CONFIG/$file" ]; then
Chrysanthemum options+=("$file")
Gardenia fi
Camellia done < <(find "$CONFIG" -maxdepth 1 -type f -exec basename {} \; | sort)
simple-long
simple-short printf '%s\n' "${options[@]}"
Top-&-Bottom
Left
Right
Top-Left
Top-Right
Bottom-Left
Bottom-Right
no panel
EOF
} }
apply_config() { apply_config() {
@ -29,7 +20,7 @@ apply_config() {
} }
main() { main() {
choice=$(menu | rofi -dmenu -config ~/.config/rofi/config-waybar.rasi) choice=$(menu | rofi -dmenu -config ~/.config/rofi/config-waybar-layout.rasi)
if [[ -z "$choice" ]]; then if [[ -z "$choice" ]]; then
echo "No option selected. Exiting." echo "No option selected. Exiting."

93
config/hypr/scripts/WaybarStyles.sh

@ -1,58 +1,49 @@
#!/bin/bash #!/bin/bash
# ACTUAL THEME CONFIG="$HOME/.config/waybar/style"
THEMEIS=$(realpath ~/.config/waybar/style.css | sed 's/.*-\(.*\)\.css/\1/') WCONFIG="$HOME/.config/waybar/style.css"
# Array for the styles menu() {
STYLES=( # List only files (excluding directories) in the directory and sort alphabetically
"Purpl" options=()
"Crimson" while IFS= read -r file; do
"Golden-Noir" if [ -f "$CONFIG/$file" ]; then
"Simple-Pink" options+=("$(basename "$file" .css)")
"pywal" fi
"dark" done < <(find "$CONFIG" -maxdepth 1 -type f -name '*.css' -exec basename {} \; | sort)
"light"
"Black-&-White" printf '%s\n' "${options[@]}"
"colors" }
"colors-border"
"colors-line" apply_style() {
"colorful" ln -sf "$CONFIG/$1.css" "$WCONFIG"
"Catppuccin-Mocha" }
"Catppuccin-Latte"
"Transparent" main() {
) choice=$(menu | rofi -dmenu -config ~/.config/rofi/config-waybar-style.rasi)
# Build ROFI if [[ -z "$choice" ]]; then
SELECTED_STYLE=$(printf "%s\n" "${STYLES[@]}" | rofi -dmenu -config ~/.config/rofi/config-waybar.rasi "${#STYLES[@]}") echo "No option selected. Exiting."
exit 0
fi
# Check if rofi is already running apply_style "$choice"
if pidof rofi > /dev/null; then
pkill rofi
exit 0
fi
# Verify the selected theme # Restart relevant processes
if [[ " ${STYLES[@]} " =~ " $SELECTED_STYLE " ]]; then for process in waybar mako dunst; do
SWITCHTO="${SELECTED_STYLE}" if pgrep -x "$process" >/dev/null; then
else pkill "$process"
echo "Invalid selection" fi
exit 1 done
fi
# APPLY THEME # Launch Refresh.sh in the background
THEMEFILE="$HOME/.config/waybar/style/${SWITCHTO}.css" ~/.config/hypr/scripts/Refresh.sh &
if [ -f "$THEMEFILE" ]; then }
ln -sf "$THEMEFILE" "$HOME/.config/waybar/style.css"
else
echo "Error: $THEMEFILE not found"
exit 1
fi
# Restart relevant processes # Check if rofi is already running
for process in waybar mako dunst; do if pgrep -x "rofi" >/dev/null; then
if pidof "$process" > /dev/null; then pkill rofi
pkill "$process" exit 0
fi fi
done
exec ~/.config/hypr/scripts/Refresh.sh main

240
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;
}

240
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;
}

2
config/rofi/config-waybar.rasi → config/rofi/resolution/1080p/config-waybar-layout.rasi

@ -95,7 +95,7 @@ entry {
background-color: transparent; background-color: transparent;
text-color: inherit; text-color: inherit;
cursor: text; cursor: text;
placeholder: "Choose Waybar Styles or Layouts"; placeholder: "Choose Waybar Layout";
placeholder-color: inherit; placeholder-color: inherit;
} }

2
config/rofi/resolution/1080p/config-waybar.rasi → config/rofi/resolution/1080p/config-waybar-style.rasi

@ -95,7 +95,7 @@ entry {
background-color: transparent; background-color: transparent;
text-color: inherit; text-color: inherit;
cursor: text; cursor: text;
placeholder: "Choose Waybar Styles or Layouts"; placeholder: "Choose Waybar Syles";
placeholder-color: inherit; placeholder-color: inherit;
} }

0
config/waybar/configs/Bottom-Left → config/waybar/configs/Bottom & Left

0
config/waybar/configs/Bottom-Right → config/waybar/configs/Bottom & Right

0
config/waybar/configs/Camellia → config/waybar/configs/Camellia [Bottom]

0
config/waybar/configs/Chrysanthemum → config/waybar/configs/Chrysanthemum [TOP]

10
config/waybar/configs/default-Bottom → config/waybar/configs/Default [Bottom]

@ -37,17 +37,17 @@
"custom/light_dark", "custom/light_dark",
"custom/separator#dot-line", "custom/separator#dot-line",
"custom/lock", "custom/lock",
//],
"custom/separator#dot-line",
"custom/keybinds",
], ],
//"custom/separator#dot-line",
//"custom/keybinds",
//],
"modules-right": [ "modules-right": [
//"hyprland/window", //"hyprland/window",
"tray", "tray",
"custom/separator#dot-line", "custom/separator#dot-line",
"bluetooth", //"bluetooth",
"custom/separator#dot-line", //"custom/separator#dot-line",
//"network", //"network",
//"custom/separator#dot-line", //"custom/separator#dot-line",
"battery", "battery",

10
config/waybar/configs/default → config/waybar/configs/Default [TOP]

@ -37,17 +37,17 @@
"custom/light_dark", "custom/light_dark",
"custom/separator#dot-line", "custom/separator#dot-line",
"custom/lock", "custom/lock",
//],
"custom/separator#dot-line",
"custom/keybinds",
], ],
//"custom/separator#dot-line",
//"custom/keybinds",
//],
"modules-right": [ "modules-right": [
//"hyprland/window", //"hyprland/window",
"tray", "tray",
"custom/separator#dot-line", "custom/separator#dot-line",
"bluetooth", //"bluetooth",
"custom/separator#dot-line", //"custom/separator#dot-line",
//"network", //"network",
//"custom/separator#dot-line", //"custom/separator#dot-line",
"battery", "battery",

0
config/waybar/configs/Gardenia → config/waybar/configs/Gardenia [Bottom]

0
config/waybar/configs/Peony → config/waybar/configs/Peony [TOP]

0
config/waybar/configs/simple-long → config/waybar/configs/Simple-L [TOP]

0
config/waybar/configs/simple-short → config/waybar/configs/Simple-S [TOP]

0
config/waybar/configs/Top-&-Bottom → config/waybar/configs/Top & Bottom

0
config/waybar/configs/Top-Left → config/waybar/configs/Top & Left

0
config/waybar/configs/Top-Right → config/waybar/configs/Top & Right

0
config/waybar/style/Black-&-White.css → config/waybar/style/Black & White.css

0
config/waybar/style/colors-border.css → config/waybar/style/Colored (Bordered).css

0
config/waybar/style/colors-line.css → config/waybar/style/Colored (Lined).css

0
config/waybar/style/colors.css → config/waybar/style/Colored.css

0
config/waybar/style/colorful.css → config/waybar/style/Colorful.css

0
config/waybar/style/dark.css → config/waybar/style/Dark.css

0
config/waybar/style/Golden-Noir.css → config/waybar/style/Golden Noir.css

0
config/waybar/style/light.css → config/waybar/style/Light.css

0
config/waybar/style/pywal.css → config/waybar/style/Pywal.css

0
config/waybar/style/Simple-Pink.css → config/waybar/style/Simple Pink.css

2
copy.sh

@ -160,7 +160,7 @@ cp -r wallpapers ~/Pictures/ && { echo "${OK}Copy completed!"; } || { echo "${ER
# Initial Symlinks to avoid errors # Initial Symlinks to avoid errors
# symlinks for waybar # 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" && \ ln -sf "$HOME/.config/waybar/style/pywal.css" "$HOME/.config/waybar/style.css" && \
# symlinks for dunst # symlinks for dunst

Loading…
Cancel
Save