mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-01 20:28:16 +02:00
Add integrated Style > Corner controls across hyprland, mako, walker
This commit is contained in:
@@ -62,6 +62,7 @@ GROUP_DESCRIPTIONS[restart]="Restart Omarchy components"
|
||||
GROUP_DESCRIPTIONS[setup]="Interactive setup wizards"
|
||||
GROUP_DESCRIPTIONS[screensaver]="Screensaver branding and animation"
|
||||
GROUP_DESCRIPTIONS[snapshot]="System snapshots"
|
||||
GROUP_DESCRIPTIONS[style]="Global UI style controls"
|
||||
GROUP_DESCRIPTIONS[sudo]="Sudo configuration helpers"
|
||||
GROUP_DESCRIPTIONS[swayosd]="SwayOSD status display helpers"
|
||||
GROUP_DESCRIPTIONS[system]="Reboot, shutdown, logout, and lock"
|
||||
|
||||
+10
-1
@@ -264,11 +264,12 @@ show_hardware_touchpad_haptics_menu() {
|
||||
}
|
||||
|
||||
show_style_menu() {
|
||||
case $(menu "Style" " Theme\n Unlock\n Font\n Background\n Hyprland\n Screensaver\n About") in
|
||||
case $(menu "Style" " Theme\n Unlock\n Font\n Background\n Corners\n Hyprland\n Screensaver\n About") in
|
||||
*Theme*) show_theme_menu ;;
|
||||
*Unlock*) omarchy-launch-walker -m menus:omarchyunlocks --width 800 --minheight 400 ;;
|
||||
*Font*) show_font_menu ;;
|
||||
*Background*) show_background_menu ;;
|
||||
*Corners*) show_style_corners_menu ;;
|
||||
*Hyprland*) open_in_editor ~/.config/hypr/looknfeel.conf ;;
|
||||
*Screensaver*) show_screensaver_menu ;;
|
||||
*About*) show_about_menu ;;
|
||||
@@ -276,6 +277,14 @@ show_style_menu() {
|
||||
esac
|
||||
}
|
||||
|
||||
show_style_corners_menu() {
|
||||
case $(omarchy-menu-select "Corners" " Straight" " Rounded") in
|
||||
*Straight*) omarchy-style-corners sharp ;;
|
||||
*Rounded*) omarchy-style-corners round ;;
|
||||
*) show_style_menu ;;
|
||||
esac
|
||||
}
|
||||
|
||||
show_about_menu() {
|
||||
case $(menu "About" " Edit Text\n Set From Image\n Restore Default") in
|
||||
*Text*) omarchy-branding-about text ;;
|
||||
|
||||
Executable
+14
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Set Hyprland, Mako, and Walker corners to sharp or round
|
||||
# omarchy:args=<sharp|round>
|
||||
# omarchy:examples=omarchy style corners round | omarchy style corners sharp
|
||||
|
||||
if [[ $1 != "sharp" && $1 != "round" ]]; then
|
||||
echo "Usage: omarchy-style-corners <sharp|round>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
omarchy-style-corners-hyprland "$1"
|
||||
omarchy-style-corners-mako "$1"
|
||||
omarchy-style-corners-walker "$1"
|
||||
@@ -2,14 +2,14 @@
|
||||
|
||||
# omarchy:summary=Set or toggle shape of Hyprland window corners
|
||||
# omarchy:args=[toggle|sharp|round]
|
||||
# omarchy:examples=omarchy hyprland window corners toggle | omarchy hyprland window corners round | omarchy hyprland window corners sharp
|
||||
# omarchy:examples=omarchy style corners hyprland toggle | omarchy style corners hyprland round | omarchy style corners hyprland sharp
|
||||
|
||||
case "${1:-toggle}" in
|
||||
round) set -- on ;;
|
||||
sharp) set -- off ;;
|
||||
toggle) ;;
|
||||
*)
|
||||
echo "Usage: omarchy-hyprland-window-corners [toggle|sharp|round]"
|
||||
echo "Usage: omarchy-style-corners-hyprland [toggle|sharp|round]"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
# omarchy:summary=Set or toggle rounded Mako notification corners
|
||||
# omarchy:args=[toggle|sharp|round]
|
||||
# omarchy:examples=omarchy mako corners toggle | omarchy mako corners round | omarchy mako corners sharp
|
||||
# omarchy:examples=omarchy style corners mako toggle | omarchy style corners mako round | omarchy style corners mako sharp
|
||||
|
||||
TOGGLES_CONFIG="$HOME/.local/state/omarchy/toggles/mako.ini"
|
||||
|
||||
@@ -30,7 +30,7 @@ case "${1:-toggle}" in
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "Usage: omarchy-mako-corners [toggle|sharp|round]"
|
||||
echo "Usage: omarchy-style-corners-mako [toggle|sharp|round]"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
Executable
+40
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Set or toggle rounded Walker corners
|
||||
# omarchy:args=[toggle|sharp|round]
|
||||
# omarchy:examples=omarchy style corners walker toggle | omarchy style corners walker round | omarchy style corners walker sharp
|
||||
|
||||
TOGGLES_CSS="$HOME/.local/state/omarchy/toggles/walker.css"
|
||||
|
||||
set_radius() {
|
||||
local radius="$1"
|
||||
|
||||
mkdir -p "$(dirname "$TOGGLES_CSS")"
|
||||
touch "$TOGGLES_CSS"
|
||||
|
||||
if grep -q '^ border-radius:' "$TOGGLES_CSS"; then
|
||||
sed -i "s/^ border-radius:.*/ border-radius: ${radius}px;/" "$TOGGLES_CSS"
|
||||
elif grep -q '^border-radius:' "$TOGGLES_CSS"; then
|
||||
sed -i "s/^border-radius:.*/border-radius: ${radius}px;/" "$TOGGLES_CSS"
|
||||
else
|
||||
echo ".box-wrapper { border-radius: ${radius}px; }" >>"$TOGGLES_CSS"
|
||||
fi
|
||||
}
|
||||
|
||||
case "${1:-toggle}" in
|
||||
round) set_radius 6 ;;
|
||||
sharp) set_radius 0 ;;
|
||||
toggle)
|
||||
if [[ -f $TOGGLES_CSS ]] && grep -q 'border-radius: 6px;' "$TOGGLES_CSS"; then
|
||||
set_radius 0
|
||||
else
|
||||
set_radius 6
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "Usage: omarchy-style-corners-walker [toggle|sharp|round]"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
omarchy-restart-walker
|
||||
@@ -1,4 +1,5 @@
|
||||
@import "../../../../../../../.config/omarchy/current/theme/walker.css";
|
||||
@import "../../../../../../../.local/state/omarchy/toggles/walker.css";
|
||||
|
||||
* {
|
||||
all: unset;
|
||||
|
||||
@@ -16,6 +16,7 @@ run_logged $OMARCHY_INSTALL/config/fix-powerprofilesctl-shebang.sh
|
||||
run_logged $OMARCHY_INSTALL/config/docker.sh
|
||||
run_logged $OMARCHY_INSTALL/config/mimetypes.sh
|
||||
run_logged $OMARCHY_INSTALL/config/user-dirs.sh
|
||||
run_logged $OMARCHY_INSTALL/config/toggles.sh
|
||||
run_logged $OMARCHY_INSTALL/config/nautilus-python.sh
|
||||
run_logged $OMARCHY_INSTALL/config/localdb.sh
|
||||
run_logged $OMARCHY_INSTALL/config/walker-elephant.sh
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
# Make sure toggles are available
|
||||
mkdir -p ~/.local/state/omarchy/toggles
|
||||
touch ~/.local/state/omarchy/toggles/mako.ini
|
||||
touch ~/.local/state/omarchy/toggles/walker.css
|
||||
@@ -1,4 +1,5 @@
|
||||
echo "Create Mako toggle config"
|
||||
echo "Create Mako and Walker toggle configs"
|
||||
|
||||
mkdir -p ~/.local/state/omarchy/toggles
|
||||
[[ -f ~/.local/state/omarchy/toggles/mako.ini ]] || touch ~/.local/state/omarchy/toggles/mako.ini
|
||||
[[ -f ~/.local/state/omarchy/toggles/walker.css ]] || touch ~/.local/state/omarchy/toggles/walker.css
|
||||
|
||||
Reference in New Issue
Block a user