(defwidget checkboxhyprctl-win [value changevalue] (eventbox :cursor "pointer" :onclick "hyprctl keyword ${changevalue} ${1 - value} && scripts/hyprsettings tickle" (box :class "win-checkbox-${value}" :halign "end" ) ) ) (defwidget winnewspanel [] (box :orientation "v" :space-evenly false :width {RES_WIDTH / 2} :height {RES_HEIGHT - 51} :style " ${anim_open_winnews ? 'transition: 200ms cubic-bezier(0.05, 0.7, 0.1, 1);' : 'transition: 150ms cubic-bezier(0.3, 0, 0.8, 0.15);'} ${rev_winnews ? '' : 'margin-left: -960px; margin-right: 960px;'} " (eventbox :onclick "scripts/toggle-winnews.sh --close &" :onmiddleclick "scripts/toggle-winnews.sh --close &" :onrightclick "scripts/toggle-winnews.sh --close &" (box :class "box-that-is-there" :style "min-height: 0px;" ) ) (box :space-evenly false :orientation "v" :width {RES_WIDTH / 2 - 24} :height {RES_HEIGHT - 51} :class "winwin" (centerbox :class "winnews-topbar" :height 35 (box :space-evenly false :height 35 (label :class "winnews-clock" :text "Widgets") ) (box :space-evenly false :height 35 (overlay (box :space-evenly false :class "winnews-search-prompt" :height 33 :width 500 (box :halign "start" :class "winsearch-icon winstart-search-searchbox-icon" :style "margin-left: 5px;" ) (revealer :reveal {oquery == ''} :halign "start" :duration "100ms" (label :class "winnews-search-prompt-text" :xalign 0 :text "Search Widgets") ) ) (input :class "winnews-search-contents" :onchange "${EWW_CMD} update oquery='{}' &" ) ) ) (box :space-evenly false :height 35 :halign "end" (label :class "winnews-clock" :text {time12}) (button :halign "end" :space-evenly false :class "winnews-user" :onclick "scripts/toggle-winnews.sh --close && gnome-control-center user-accounts &" (box :height 35 :width 35 :class "winstart-user-icon" ) ) ) ) (scroll :height 930 (box :orientation "h" :spacing 12 :class "winnews-widgets" (box :orientation "v" :spacing 12 :space-evenly false ; Mouse and touchpad (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 :orientation "v" :space-evenly false :class "winnews-widget" (box :orientation "h" :space-evenly false (label :halign "start" :class "winnews-section-icon" :text "" ) (label :halign "start" :wrap true :class "winnews-section" :text "Mouse & Touchpad" ) ) (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" (eventbox :onrightclick "hyprctl keyword input:sensitivity 0" (box :space-evenly false :orientation "v" :class "winnews-option" (label :halign "start" :wrap true :class "winnews-text" :text "Sensitivity" ) (scale :class "winslider winslider-winnews" :value "${hyprjson.input_sensitivity * 50 + 50}" :onchange "hyprctl keyword input:sensitivity $(echo - | awk '{print {} / 50 - 1}') && scripts/hyprsettings tickle" ) ) ) (centerbox :orientation "h" :space-evenly false :halign "fill" :class "winnews-option" (label :xalign 0 :wrap true :class "winnews-text" :text "Raw input" ) (box) (checkboxhyprctl-win :value "${hyprjson.force_no_accel}" :changevalue "input:force_no_accel" :halign "end" :class "win-checkbox" ) ) ) ) (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 :class "winnews-option" :orientation "h" :space-evenly false :halign "fill" (label :halign "start" :class "winnews-text" :text "Disable touchpad while typing" ) (box) (checkboxhyprctl-win :value "${hyprjson.touchpad_disable_while_typing}" :changevalue "input:touchpad:disable_while_typing" :class "win-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" :class "winnews-option" (label :halign "start" :class "winnews-text" :text "Tap to click" ) (box) (checkboxhyprctl-win :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" :class "winnews-widget" (box :orientation "h" :space-evenly false (label :halign "start" :class "winnews-section-icon" :text "" ) (label :halign "start" :wrap true :class "winnews-section" :text "Blur" ) ) (centerbox :orientation "h" :space-evenly false :halign "fill" :class "winnews-option" (label :halign "start" :class "winnews-text" :text "Enable blur" ) (box) (checkboxhyprctl-win :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" :class "winnews-option" (label :halign "start" :wrap true :class "winnews-text" :text "Blur size" ) (scale :class "winslider winslider-winnews" :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" :class "winnews-option" (label :halign "start" :wrap true :class "winnews-text" :text "Blur passes" ) (scale :class "winslider winslider-winnews" :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" :class "winnews-option" (centerbox :orientation "h" :space-evenly false :halign "fill" (label :halign "start" :class "winnews-text" :text "Blur xray" ) (box) (checkboxhyprctl-win :value "${hyprjson.blur_xray}" :changevalue "decoration:blur_xray" ) ) ) ) ) ) ; Revealer (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" :class "winnews-widget" (box :orientation "h" :space-evenly false :spacing 10 (label :halign "start" :class "winnews-section-icon" :text "" ) (label :halign "start" :wrap true :class "winnews-section" :text "Gaps/Borders" ) ) (revealer :reveal "${matches('appearance looks customization gaps_in inner gaps: inner space',oquery)}" :transition "slidedown" :duration "200ms" (box :space-evenly false :orientation "v" :class "winnews-option" (label :halign "start" :wrap true :class "winnews-text" :text "Gaps: Inner" ) (scale :class "winslider winslider-winnews" :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" :class "winnews-option" (label :halign "start" :wrap true :class "winnews-text" :text "Gaps: Outer" ) (scale :class "winslider winslider-winnews" :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" :class "winnews-option" (label :halign "start" :wrap true :class "winnews-text" :text "Border size" ) (scale :class "winslider winslider-winnews" :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" :class "winnews-option" (label :halign "start" :wrap true :class "winnews-text" :text "Rounding" ) (scale :class "winslider winslider-winnews" :value "${hyprjson.rounding}" :tooltip "Border size: ${hyprjson.rounding}" :onchange "hyprctl keyword decoration:rounding {} && scripts/hyprsettings tickle" ) ) ) ) ) ; Revealer ) ; 2nd column (box :orientation "v" :spacing 12 :space-evenly false (revealer :reveal "${matches('fetch system information user distro kernel uptime de desktop packages',oquery)}" :transition "slidedown" :duration "200ms" (box :orientation "v" :space-evenly false :class "winnews-widget" (box :orientation "h" :space-evenly false (label :halign "start" :class "winnews-section-icon" :text "" ) (label :halign "start" :wrap true :class "winnews-section" :text "System info" ) ) (box :orientation "v" :space-evenly false :valign "center" :class "winnews-fetch-pad" (box :orientation "h" :space-evenly false :spacing 20 (label :class "winnews-fetch-icon" :text "") (label :class "winnews-text" :text "${username + '@' + hostname}") ) (box :orientation "h" :space-evenly false :spacing 20 (label :class "winnews-fetch-icon" :text "") (label :class "winnews-text" :text "${kernel}") ) (box :orientation "h" :space-evenly false :spacing 20 (label :class "winnews-fetch-icon" :text "") (label :class "winnews-text" :text "${uptime}") ) (box :orientation "h" :space-evenly false :spacing 20 (label :class "winnews-fetch-icon" :text "") (label :class "winnews-text" :text "${wm}") ) (box :orientation "h" :space-evenly false :spacing 20 (label :class "winnews-fetch-icon" :text "") (label :class "winnews-text" :text "${packages}") ) ) ) ) ) ) ) ) ) ) (defwindow winnews :wm-ignore true :focusable true :monitor 0 :geometry (geometry :width "50%" ; :height "0%" :anchor "top left" ) (winnewspanel) ) (defwidget winnews-button [] (eventbox :class "winbutton-only thewinbutton" :onclick "scripts/toggle-winnews.sh &" :onmiddleclick "playerctl play-pause" :onrightclick "playerctl next || playerctl position `bc <<< \"100 * $(playerctl metadata mpris:length) / 1000000 / 100\"`" :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 "winbutton-pad" (image :class "winnewsicon winbutton-${rev_winnews}" :path "images/icons/winnews.png" ) ) ) )