Move to fully user editable wofi styles

Closes #190
This commit is contained in:
David Heinemeier Hansson
2025-07-16 07:11:36 -07:00
parent 4ea0e65950
commit 781a7888cb
10 changed files with 17 additions and 82 deletions

View File

@ -10,7 +10,7 @@ show_power_menu() {
\u200D Relaunch \u200D Relaunch
\u2060󰜉 Restart \u2060󰜉 Restart
\u2063󰐥 Shutdown" \u2063󰐥 Shutdown"
local selection=$(echo -e "$menu_options" | wofi --show dmenu --prompt "Power Options" --width 150 --height 195 -O alphabetical --style ~/.local/share/omarchy/default/wofi/select.css) local selection=$(echo -e "$menu_options" | wofi --show dmenu --prompt "Power Options" --width 150 --height 195 -O alphabetical --style ~/.config/wofi/select.css)
case "$selection" in case "$selection" in
*Lock*) hyprlock ;; *Lock*) hyprlock ;;

View File

@ -1,7 +1,8 @@
#!/bin/bash #!/bin/bash
if gum confirm "Refresh Wofi config? This will replace your current settings with Omarchy defaults."; then if [[ "$1" == "-y" ]] || gum confirm "Refresh Wofi config? This will replace your current settings with Omarchy defaults."; then
# Overwrite local waybar settings with the latest in Omarchy # Overwrite local waybar settings with the latest in Omarchy
cp -f ~/.local/share/omarchy/config/wofi/config ~/.config/wofi/ 2>/dev/null cp -f ~/.local/share/omarchy/config/wofi/config ~/.config/wofi/ 2>/dev/null
cp -f ~/.local/share/omarchy/config/wofi/style.css ~/.config/wofi/ 2>/dev/null cp -f ~/.local/share/omarchy/config/wofi/style.css ~/.config/wofi/ 2>/dev/null
cp -f ~/.local/share/omarchy/config/wofi/select.css ~/.config/wofi/ 2>/dev/null
fi fi

View File

@ -56,4 +56,4 @@ grep -h '^[[:space:]]*bind' $USER_HYPRLAND_CONF $OMARCHY_BINDINGS_CONF |
printf "%-35s → %s\n", key_combo, action; printf "%-35s → %s\n", key_combo, action;
} }
}' | }' |
flock --nonblock /tmp/.wofi.lock -c "wofi -dmenu -i --width 60% --height 70% -p 'Hyprland Keybindings' -O alphabetical --style=\"$HOME/.local/share/omarchy/default/wofi/search.css\"" wofi -dmenu -i --width 60% --height 70% -p 'Hyprland Keybindings' -O alphabetical

View File

@ -25,7 +25,7 @@ selection=$(printf '%s\n' "${themes[@]}" | wofi \
--width 150 \ --width 150 \
--height 300 \ --height 300 \
-O alphabetical \ -O alphabetical \
--style ~/.local/share/omarchy/default/wofi/select.css 2>/dev/null) --style ~/.config/wofi/select.css 2>/dev/null)
# Remove any Pango markup before converting back to filename # Remove any Pango markup before converting back to filename
clean_selection=$(echo "$selection" | sed -E 's/<[^>]+>//g') clean_selection=$(echo "$selection" | sed -E 's/<[^>]+>//g')

View File

@ -1,8 +1,11 @@
@import ".config/omarchy/current/theme/wofi.css"; /* Use by power menu, theme selector, and other menus without visible search bar */
@import ".local/share/omarchy/default/wofi/search.css";
@import ".config/wofi/style.css";
#input { #input {
display: none; display: none;
opacity: 0; opacity: 0;
margin-top: -200px; margin-top: -200px;
} }
@import ".config/omarchy/current/theme/wofi.css";

View File

@ -1,4 +1,4 @@
/* Colors are defined by theme files and can be referenced via @base, @text, @selected-text, and @border */ /* Colors are defined by theme file and can be referenced via @base, @text, @selected-text, and @border */
* { * {
font-family: 'CaskaydiaMono Nerd Font', monospace; font-family: 'CaskaydiaMono Nerd Font', monospace;
@ -71,3 +71,4 @@ window {
-gtk-icon-transform: scale(0.7); -gtk-icon-transform: scale(0.7);
} }
@import ".config/omarchy/current/theme/wofi.css";

View File

@ -1,6 +1,6 @@
# Launching # Launching
bind = SUPER, space, exec, pkill wofi || wofi --show drun --sort-order=alphabetical --style="$HOME/.local/share/omarchy/default/wofi/search.css" bind = SUPER, space, exec, pkill wofi || wofi --show drun -O alphabetical
bind = SUPER, K, exec, ~/.local/share/omarchy/bin/omarchy-show-keybindings bind = SUPER, K, exec, pkill wofi || ~/.local/share/omarchy/bin/omarchy-show-keybindings
# Aesthetics # Aesthetics
bind = SUPER SHIFT, SPACE, exec, pkill -SIGUSR1 waybar bind = SUPER SHIFT, SPACE, exec, pkill -SIGUSR1 waybar

View File

@ -1,73 +0,0 @@
@import ".config/omarchy/current/theme/wofi.css";
@import ".config/wofi/style.css";
* {
font-family: 'CaskaydiaMono Nerd Font', monospace;
font-size: 18px;
}
window {
margin: 0px;
padding: 20px;
background-color: @base;
opacity: 0.95;
}
#inner-box {
margin: 0;
padding: 0;
border: none;
background-color: @base;
}
#outer-box {
margin: 0;
padding: 20px;
border: none;
background-color: @base;
border: 2px solid @border;
}
#scroll {
margin: 0;
padding: 0;
border: none;
background-color: @base;
}
#input {
margin: 0;
padding: 10px;
border: none;
background-color: @base;
color: @text;
}
#input:focus {
outline: none;
box-shadow: none;
border: none;
}
#text {
margin: 5px;
border: none;
color: @text;
}
#entry {
background-color: @base;
}
#entry:selected {
outline: none;
border: none;
}
#entry:selected #text {
color: @selected-text;
}
#entry image {
-gtk-icon-transform: scale(0.7);
}

View File

@ -2,4 +2,5 @@ echo "Make wofi stylesheet user editable"
if [[ -L "$HOME/.config/wofi/style.css" ]]; then if [[ -L "$HOME/.config/wofi/style.css" ]]; then
rm "$HOME/.config/wofi/style.css" rm "$HOME/.config/wofi/style.css"
cp ~/.local/share/omarchy/config/wofi/style.css ~/.config/wofi/ cp ~/.local/share/omarchy/config/wofi/style.css ~/.config/wofi/
cp ~/.local/share/omarchy/config/wofi/search.css ~/.config/wofi/
fi fi

2
migrations/1752673060.sh Normal file
View File

@ -0,0 +1,2 @@
echo "Make all wofi stylesheets user editable"
omarchy-refresh-wofi -y