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. 81
      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"
menu() {
cat <<EOF
default
default-Bottom
Peony
Chrysanthemum
Gardenia
Camellia
simple-long
simple-short
Top-&-Bottom
Left
Right
Top-Left
Top-Right
Bottom-Left
Bottom-Right
no panel
EOF
# List only files (excluding directories) in the directory and sort alphabetically
options=()
while IFS= read -r file; do
if [ -f "$CONFIG/$file" ]; then
options+=("$file")
fi
done < <(find "$CONFIG" -maxdepth 1 -type f -exec basename {} \; | sort)
printf '%s\n' "${options[@]}"
}
apply_config() {
@ -29,7 +20,7 @@ apply_config() {
}
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
echo "No option selected. Exiting."

81
config/hypr/scripts/WaybarStyles.sh

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

10
config/waybar/configs/default → 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",

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
# 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

Loading…
Cancel
Save