Files
illogical-impulse/early/.config/eww/windows/osettings.yuck
T
2024-02-22 15:35:06 +07:00

1008 lines
38 KiB
Plaintext
Executable File

(defwidget checkboxhyprctl [value changevalue]
(eventbox
:cursor "pointer"
:onclick "hyprctl keyword ${changevalue} ${1 - value} && scripts/hyprsettings tickle &"
(box
:class "osettings-checkbox-${value}"
:halign "end"
)
)
)
(defwidget checkboxcmd [value changecmd]
(eventbox
:onclick "${changecmd}"
(box
:class "osettings-checkbox-${value}"
:halign "end"
)
)
)
(defwidget osettings []
(box
:orientation "v"
:space-evenly false
:style "
${anim_open_ostg ? 'transition: 200ms cubic-bezier(0.05, 0.7, 0.1, 1);' : 'transition: 150ms cubic-bezier(0.3, 0, 0.8, 0.15);'}
${rev_ostg ? '' : 'margin-left: -533px; margin-right: 533px;'}
"
(eventbox
:onclick "scripts/toggle-osettings.sh --close &"
:onmiddleclick "scripts/toggle-osettings.sh --close &"
:onrightclick "scripts/toggle-osettings.sh --close &"
(box
:class "box-that-is-there" :style "min-height: 1px;"
)
)
(eventbox
; :onhoverlost "scripts/toggle-osettings.sh --close &"
(box
:orientation "v"
:space-evenly false
:class "osettings-window"
(box
:orientation "v"
:space-evenly false
(box
:class "osettings-heading"
:orientation "v"
:space-evenly false
(label
:halign "start"
:wrap true
:class "osettings-title"
:text "# settings"
)
(label
:halign "start"
:wrap true
:class "osettings-subtitle"
:text "Tweak your experience"
)
)
(box
:spacing 0
:space-evenly false
:class "osettings-search"
:orientation "h"
(input
:halign "start"
:class "osettings-search-text"
:onchange "${EWW_CMD} update oquery=\"$(echo {} | tr [:upper:] [:lower:])\""
)
(box)
(button
:halign "end"
:class "osettings-search-icon"
:style "font-weight: bolder;"
""
)
)
)
(scroll
; :vscroll true
; :hscroll false
; :halign "fill"
:class "osettings-content"
:style "min-height: 792px;"
(box
:halign "fill"
:class "osettings-scroll-bg"
:space-evenly false
:spacing 20
:orientation "v"
(box
:class "osettings-settings"
:orientation "v"
:space-evenly false
; Quick settings
(revealer
:reveal "${matches('quick settings volume audio brightness',oquery)}"
:transition "slidedown"
:duration "200ms"
(box
:orientation "v"
:space-evenly false
(centerbox
(box
:orientation "h"
:space-evenly false
:spacing 10
(label
:halign "start"
:class "osettings-section-icon"
:text ""
)
(label
:halign "start"
:wrap true
:class "osettings-section"
:text "Quick values"
)
)
(box)
(box
:orientation "h" :space-evenly false
:halign "end" :spacing 4
(button :valign "center" :yalign 0.5
:class "osettings-tag"
:onclick "wpctl set-volume @DEFAULT_AUDIO_SINK@ 23% &"
"󰎈 music"
)
(button :valign "center" :yalign 0.5
:class "osettings-tag"
:onclick "wpctl set-volume @DEFAULT_AUDIO_SINK@ 50% &"
" asmr"
)
(button :valign "center" :yalign 0.5
:class "osettings-tag-material"
:onclick "light -S 40 &"
""
)
(button :valign "center" :yalign 0.5
:class "osettings-tag-material"
:onclick "light -S 5 &"
""
)
)
; (button :valign "center" :yalign 0.5
; :class "osettings-tag"
; :onclick "wpctl set-volume @DEFAULT_AUDIO_SINK@ 50% &"
; "night"
; )
)
(revealer
:reveal "${matches('quick settings volume audio',oquery)}"
:transition "slidedown"
:duration "200ms"
(eventbox
:onscroll "echo {} | sed -e 's/down/-/g' -e 's/up/+/g' | xargs -I% wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.03%"
(box
:orientation "h"
:space-evenly false
:spacing 10
(label
:wrap true
:class "osettings-text-icon"
:text ""
)
(box
:orientation "v"
:space-evenly false
(centerbox
:orientation "h"
:space-evenly false
:style "min-width: 417px;"
(label
:halign "start"
:wrap true
:class "osettings-text"
:text "Volume"
)
(box)
; (checkbox
; :halign "end"
; :class "osettings-checkbox"
; :onchecked "scripts/volume mute SINK"
; :onunchecked "scripts/volume mute SINK"
; )
(checkboxcmd
:value "${volume.audio}"
:changecmd "scripts/volume mute SINK"
)
)
(scale
:halign "fill"
:class "osettings-slider"
:value "${volume.percent}"
:tooltip "volume on ${volume.percent}%"
:onchange "scripts/volume setvol SINK {}"
)
)
)
)
)
(revealer
:reveal "${matches('quick settings brightness',oquery)}"
:transition "slidedown"
:duration "200ms"
(box
:orientation "h"
:space-evenly false
:spacing 10
(label
:wrap true
:class "osettings-text-icon"
:text ""
)
(box
:orientation "v"
:space-evenly false
:style "min-width: 417px;"
(label
:halign "start"
:wrap true
:class "osettings-text"
:text "Brightness"
)
(scale
:class "osettings-slider"
:value "${brightness.level}"
:onchange "light -S {}"
)
)
)
)
)
)
; Mouse
(revealer
:reveal "${matches('mouse and touchpad touch pad mouse speed mouse acceleration osu raw input sensitivity disable while typing disable_while_typing tap to click clickfinger_behavior',oquery)}"
:transition "slidedown"
:duration "200ms"
(box
:space-evenly false
:orientation "v"
(box
:orientation "h"
:space-evenly false
:spacing 10
(label
:halign "start"
:class "osettings-section-icon"
:text ""
)
(label
:halign "start"
:wrap true
:class "osettings-section"
:text "Mouse/Touchpad"
)
(box
:orientation "h" :space-evenly false
:halign "end" :spacing 4
:style "margin-left: 16px;"
(button :valign "center" :yalign 0.5
:class "osettings-tag"
:onclick "hyprctl keyword input:force_no_accel true &"
"󰐾 osu"
)
(button :valign "center" :yalign 0.5
:class "osettings-tag"
:onclick "hyprctl keyword input:touchpad:disable_while_typing false &"
"󰆧 minecraft"
)
)
)
(revealer
:reveal "${matches('mouse and touchpad touch pad speed mouse acceleration osu raw input sensitivity',oquery)}"
:transition "slidedown"
:duration "200ms"
(box
:space-evenly false
:orientation "v"
(centerbox
:orientation "h"
:space-evenly false
:halign "fill"
(label
:halign "start"
:wrap true
:class "osettings-text"
:text "Raw input"
)
(box)
(checkboxhyprctl
:value "${hyprjson.force_no_accel}"
:changevalue "input:force_no_accel"
:halign "end"
:class "osettings-checkbox"
)
)
(eventbox
:onrightclick "hyprctl keyword input:sensitivity 0"
(box
:space-evenly false
:orientation "v"
(label
:halign "start"
:wrap true
:class "osettings-text"
:text "Sensitivity"
)
(scale
:class "osettings-slider"
:value "${hyprjson.input_sensitivity * 50 + 50}"
:onchange "hyprctl keyword input:sensitivity $(echo - | awk '{print {} / 50 - 1}') && scripts/hyprsettings tickle"
)
)
)
)
)
(revealer
:reveal "${matches('mouse and touch pad touchpad disable while typing disable_while_typing',oquery)}"
:transition "slidedown"
:duration "200ms"
(box
:space-evenly false
:orientation "v"
(centerbox
:orientation "h"
:space-evenly false
:halign "fill"
(label
:halign "start"
:class "osettings-text"
:text "Disable touchpad while typing"
)
(box)
(checkboxhyprctl
:value "${hyprjson.touchpad_disable_while_typing}"
:changevalue "input:touchpad:disable_while_typing"
:class "osettings-checkbox"
)
)
)
)
(revealer
:reveal "${matches('mouse and touchpad touch pad tap to click clickfinger_behavior',oquery)}"
:transition "slidedown"
:duration "200ms"
(box
:space-evenly false
:orientation "v"
(centerbox
:orientation "h"
:space-evenly false
:halign "fill"
(label
:halign "start"
:class "osettings-text"
:text "Tap to click"
)
(box)
(checkboxhyprctl
:value "${hyprjson.touchpad_clickfinger_behavior}"
:changevalue "input:touchpad:clickfinger_behavior"
)
)
)
)
)
)
; Appearance
(revealer
:reveal "${matches('appearance looks customization blur size blur passes blur strength blur xray',oquery)}"
:transition "slidedown"
:duration "200ms"
(box
:space-evenly false
:orientation "v"
(centerbox
(box
:orientation "h"
:space-evenly false
:spacing 10
(label
:halign "start"
:class "osettings-section-icon"
:text ""
)
(label
:halign "start"
:wrap true
:class "osettings-section"
:text "Blur"
)
)
(box)
(box
:orientation "h" :space-evenly false
:halign "end" :spacing 4
:style "margin-left: 9px;"
(button :valign "center" :yalign 0.5
:class "osettings-tag"
:onclick "hyprctl keyword decoration:blur false && scripts/hyprsettings tickle &"
"no blur"
)
(button :valign "center" :yalign 0.5
:class "osettings-tag"
:onclick "hyprctl keyword decoration:blur true && \
hyprctl keyword decoration:blur_size 7 && \
hyprctl keyword decoration:blur_passes 4 && \
scripts/hyprsettings tickle &"
"intense"
)
)
)
(centerbox
:orientation "h"
:space-evenly false
:halign "fill"
(label
:halign "start"
:class "osettings-text"
:text "Enable blur"
)
(box)
(checkboxhyprctl
:value "${hyprjson.blur}"
:changevalue "decoration:blur"
)
)
(revealer
:reveal "${matches('appearance looks customization blur size blur strength',oquery)}"
:transition "slidedown"
:duration "200ms"
(box
:space-evenly false
:orientation "v"
(label
:halign "start"
:wrap true
:class "osettings-text"
:text "Blur size"
)
(scale
:class "osettings-slider"
:value "${hyprjson.blur_size}"
:tooltip "Blur size: ${hyprjson.blur_size}"
:onchange "hyprctl keyword decoration:blur_size {} && scripts/hyprsettings tickle"
)
)
)
(revealer
:reveal "${matches('appearance looks customization blur passes blur strength',oquery)}"
:transition "slidedown"
:duration "200ms"
(box
:space-evenly false
:orientation "v"
(label
:halign "start"
:wrap true
:class "osettings-text"
:text "Blur passes"
)
(scale
:class "osettings-slider"
:value "${hyprjson.blur_passes * 10}"
:tooltip "Blur passes: ${hyprjson.blur_passes}"
:onchange "hyprctl keyword decoration:blur_passes $(({} / 10)) && scripts/hyprsettings tickle"
)
)
)
(revealer
:reveal "${matches('appearance looks customization blur xray',oquery)}"
:transition "slidedown"
:duration "200ms"
(box
:space-evenly false
:orientation "v"
(centerbox
:orientation "h"
:space-evenly false
:halign "fill"
(label
:halign "start"
:class "osettings-text"
:text "Blur xray"
)
(box)
(checkboxhyprctl
:value "${hyprjson.blur_xray}"
:changevalue "decoration:blur_xray"
)
)
)
)
)
)
; Gaps and borders
(revealer
:reveal "${matches('appearance looks customization gaps gaps_in inner gaps: inner gaps_out outer gaps: outer space border_size border size border thickness',oquery)}"
:transition "slidedown"
:duration "200ms"
(box
:space-evenly false
:orientation "v"
(centerbox
(box
:orientation "h"
:space-evenly false
:spacing 10
(label
:halign "start"
:class "osettings-section-icon"
:text ""
)
(label
:halign "start"
:wrap true
:class "osettings-section"
:text "Gaps/Borders"
)
)
(box)
(box
:orientation "h" :space-evenly false
:halign "end" :spacing 4
:style "margin-left: 9px;"
(button :valign "center" :yalign 0.5
:class "osettings-tag"
:onclick "hyprctl keyword general:gaps_in 0 && \
hyprctl keyword general:gaps_out 0 && \
hyprctl keyword general:border_size 0 && \
hyprctl keyword decoration:rounding 0 && \
hyprctl keyword monitor eDP-1,addreserved,69,0,0,0 && \
eww update compact=true && \
scripts/hyprsettings tickle &"
"none"
)
(button :valign "center" :yalign 0.5
:class "osettings-tag"
:onclick "hyprctl keyword general:gaps_in 0 && \
hyprctl keyword general:gaps_out 0 && \
hyprctl keyword general:border_size 1 && \
hyprctl keyword decoration:rounding 0 && \
hyprctl keyword monitor eDP-1,addreserved,69,0,0,0 && \
eww update compact=true && \
scripts/hyprsettings tickle &"
"borders"
)
(button :valign "center" :yalign 0.5
:class "osettings-tag"
:onclick "hyprctl keyword general:gaps_in 4 && \
hyprctl keyword general:gaps_out 8 && \
hyprctl keyword general:border_size 1 && \
hyprctl keyword decoration:rounding 17 && \
hyprctl keyword monitor eDP-1,addreserved,61,0,0,0 && \
eww update compact=false && \
scripts/hyprsettings tickle &"
"comfy"
)
)
)
(revealer
:reveal "${matches('appearance looks customization gaps_in inner gaps: inner space',oquery)}"
:transition "slidedown"
:duration "200ms"
(box
:space-evenly false
:orientation "v"
(label
:halign "start"
:wrap true
:class "osettings-text"
:text "Gaps: Inner"
)
(scale
:class "osettings-slider"
:value "${hyprjson.gaps_in}"
:tooltip "Inner gaps: ${hyprjson.gaps_in}"
:onchange "hyprctl keyword general:gaps_in {} && scripts/hyprsettings tickle"
)
)
)
(revealer
:reveal "${matches('appearance looks customization gaps_out outer gaps: outer space',oquery)}"
:transition "slidedown"
:duration "200ms"
(box
:space-evenly false
:orientation "v"
(label
:halign "start"
:wrap true
:class "osettings-text"
:text "Gaps: Outer"
)
(scale
:class "osettings-slider"
:value "${hyprjson.gaps_out}"
:tooltip "Outer gaps: ${hyprjson.gaps_out}"
:onchange "hyprctl keyword general:gaps_out {} && scripts/hyprsettings tickle"
)
)
)
(revealer
:reveal "${matches('appearance looks customization border_size border size border thickness',oquery)}"
:transition "slidedown"
:duration "200ms"
(box
:space-evenly false
:orientation "v"
(label
:halign "start"
:wrap true
:class "osettings-text"
:text "Border size"
)
(scale
:class "osettings-slider"
:value "${hyprjson.border_size}"
:tooltip "Border size: ${hyprjson.border_size}"
:onchange "hyprctl keyword general:border_size {} && scripts/hyprsettings tickle"
)
)
)
(revealer
:reveal "${matches('appearance looks customization rounding corner',oquery)}"
:transition "slidedown"
:duration "200ms"
(box
:space-evenly false
:orientation "v"
(label
:halign "start"
:wrap true
:class "osettings-text"
:text "Rounding"
)
(scale
:class "osettings-slider"
:value "${hyprjson.rounding}"
:tooltip "Border size: ${hyprjson.rounding}"
:onchange "hyprctl keyword decoration:rounding {} && scripts/hyprsettings tickle"
)
)
)
)
)
; Hyperland
(revealer
:reveal "${matches(oquery, 'hyperland')}"
:transition "slidedown"
:duration "200ms"
(box
:space-evenly false
:orientation "v"
(box
:orientation "h"
:space-evenly false
:spacing 10
(label
:halign "start"
:class "osettings-section-icon"
:text ""
)
(label
:halign "start"
:wrap true
:class "osettings-section"
:text "Hyperland"
)
)
(revealer
:reveal "${matches(oquery, 'hyperland')}"
:transition "slidedown"
:duration "200ms"
(box
:space-evenly false
:orientation "v"
(button
:halign "fill"
:wrap true
:class "osettings-btn osettings-btn-neutral"
:onclick "notify-send whyyyyyyy 😭"
"Check the spelling and try again"
)
)
)
)
)
; Session control
(revealer
:reveal "${matches('session lock logout suspend log out shutdown shut down poweroff power off',oquery)}"
:transition "slidedown"
:duration "200ms"
(box
:space-evenly false
:orientation "v"
(box
:orientation "h"
:space-evenly false
:spacing 10
(label
:halign "start"
:class "osettings-section-icon"
:text ""
)
(label
:halign "start"
:wrap true
:class "osettings-section"
:text "Session"
)
)
(revealer
:reveal "${matches('session lock',oquery)}"
:transition "slidedown"
:duration "200ms"
(box
:orientation "v"
:space-evenly false
(button
:halign "fill"
:wrap true
:class "osettings-btn osettings-btn-neutral"
:onclick "pidof gtklock || gtklock &"
"Lock"
)
)
)
(revealer
:reveal "${matches('session suspend',oquery)}"
:transition "slidedown"
:duration "200ms"
(box
:orientation "v"
:space-evenly false
(button
:halign "fill"
:wrap true
:class "osettings-btn osettings-btn-neutral"
:onclick "systemctl suspend &"
"Suspend"
)
)
)
(revealer
:reveal "${matches('session logout log out',oquery)}"
:transition "slidedown"
:duration "200ms"
(box
:orientation "v"
:space-evenly false
(button
:halign "fill"
:wrap true
:class "osettings-btn osettings-btn-destructive"
:onclick "pkill Hyprland &"
"Logout"
)
)
)
(revealer
:reveal "${matches('session shutdown shut down poweroff power off',oquery)}"
:transition "slidedown"
:duration "200ms"
(box
:orientation "v"
:space-evenly false
(button
:halign "fill"
:wrap true
:class "osettings-btn osettings-btn-destructive"
:onclick "systemctl poweroff &"
"Shutdown"
)
)
)
)
)
; Hyprland
(revealer
:reveal "${matches('hyprland options open the wiki guide help social hypr development discord reload config configuration',oquery)}"
:transition "slidedown"
:duration "200ms"
(box
:space-evenly false
:orientation "v"
(box
:orientation "h"
:space-evenly false
:spacing 10
(label
:halign "start"
:class "osettings-section-icon"
:text ""
)
(label
:halign "start"
:wrap true
:class "osettings-section"
:text "Hyprland"
)
)
(revealer
:reveal "${matches('hyprland options reload config configuration',oquery)}"
:transition "slidedown"
:duration "200ms"
(box
:space-evenly false
:orientation "v"
(button
:halign "fill"
:wrap true
:class "osettings-btn osettings-btn-neutral"
:onclick "cp ~/.config/hypr/hyprland.conf temporary_config.conf && cp temporary_config.conf ~/.config/hypr/hyprland.conf && rm temporary_config.conf &"
"Reload config"
)
)
)
(revealer
:reveal "${matches('hyprland open the wiki guide help',oquery)}"
:transition "slidedown"
:duration "200ms"
(box
:space-evenly false
:orientation "v"
(button
:halign "fill"
:wrap true
:class "osettings-btn osettings-btn-informative"
:onclick "scripts/toggle-osettings.sh && xdg-open https://wiki.hyprland.org &"
"Open the wiki"
)
)
)
(revealer
:reveal "${matches('hyprland help social hypr development discord',oquery)}"
:transition "slidedown"
:duration "200ms"
(box
:space-evenly false
:orientation "v"
(button
:halign "fill"
:wrap true
:class "osettings-btn osettings-btn-informative"
:onclick "scripts/toggle-osettings.sh && xdg-open https://discord.com/invite/hQ9XvMUjjr &"
"Hypr Development Discord"
)
)
)
)
)
; Calendar
(revealer
:reveal "${'calendar' == oquery}"
:transition "slidedown"
:duration "200ms"
(box
:orientation "v"
:space-evenly false
(box
:orientation "h"
:space-evenly false
:spacing 10
(label
:halign "start"
:class "osettings-section-icon"
:text ""
)
(label
:halign "start"
:wrap true
:class "osettings-section"
:text "Calendar"
)
)
(calendar)
)
)
; Super secret settings
(revealer
:reveal "${oquery == '!secret' || oquery == '!sekret'}"
:transition "slidedown"
:duration "200ms"
(box
:orientation "v"
:space-evenly false
(box
:orientation "h"
:space-evenly false
:spacing 10
(label
:halign "start"
:class "osettings-section-icon"
:text ""
)
(label
:halign "start"
:wrap true
:class "osettings-section"
:text "Super secret settings"
)
)
(button
:halign "fill"
:wrap true
:class "osettings-btn osettings-btn-informative"
:onclick "scripts/supersecretsettings/culture &"
"Activate culture mode"
)
(button
:halign "fill"
:wrap true
:class "osettings-btn osettings-btn-informative"
:onclick "scripts/supersecretsettings/doreload &"
"Reset these stuff"
)
(button
:halign "fill"
:wrap true
:class "osettings-btn osettings-btn-destructive"
:onclick "hyprctl keyword bind ,c,exec,wtype k"
"Bekome a KDE developer"
)
(button
:halign "fill"
:wrap true
:class "osettings-btn osettings-btn-destructive"
:onclick "hyprctl keyword unbind ,c"
"Un-become a KDE developer"
)
)
)
; Waifu
; (revealer
; :reveal "${oquery == 'uwu' || oquery == 'sex'}"
; :transition "slidedown"
; :duration "200ms"
; (box
; :space-evenly false
; :orientation "v"
; (input
; :wrap true
; :class "osettings-btn osettings-btn-neutral"
; :style "padding: 0 20px;"
; :onaccept "python3 scripts/waifupics.py &"
; "segs"
; )
; (box
; :valign "center"
; :width 400
; :height 400
; :class "osettings-waifu"
; :style "
; background-image: url('eww_covers/waifu');
; "
; )
; )
; )
)
)
)
)
)
)
)
(defwindow osettings
:wm-ignore true
:monitor 0
:focusable true
:exclusive true
:namespace "osettings"
:geometry (geometry
:x "0px"
:y "61px"
:height "1019px"
:anchor "top left"
)
(osettings)
)
(defwidget osettings-button []
(eventbox
:class "osettings-toggle-button-${rev_ostg}"
:onmiddleclick "playerctl play-pause"
:onrightclick "playerctl next || playerctl position `bc <<< \"100 * $(playerctl metadata mpris:length) / 1000000 / 100\"`"
:onclick "scripts/toggle-osettings.sh &"
:onscroll "echo $(echo {} | sed -e 's/down/-/g' -e 's/up/+/g' | xargs -I% wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.03%) && scripts/volume osd"
(box
:class "module-button-pad-left"
(image
:path "images/svg/settings.svg"
:image-height 33
:image-width 33
)
)
)
)