forked from Shinonome/dots-hyprland
719 lines
28 KiB
Plaintext
Executable File
719 lines
28 KiB
Plaintext
Executable File
(defwidget cavacol_winnews [nth dir]
|
|
(box
|
|
:valign "${dir == 'up' ? 'end' : (
|
|
dir == 'down' ? 'start' : (
|
|
dir == 'virt' ? 'center' : 'fill'
|
|
)
|
|
)}"
|
|
:halign "${dir == 'right' ? 'start' : (
|
|
dir == 'left' ? 'end' : (
|
|
dir == 'hori' ? 'center' : 'fill'
|
|
)
|
|
)}"
|
|
:width 15
|
|
:class "winnews-cava-column"
|
|
:style "
|
|
transition: 0ms;
|
|
min-${dir == 'up' || dir == 'down' ? 'height' : 'width'}: ${cavajson[nth] / 8}px;
|
|
"
|
|
)
|
|
)
|
|
|
|
(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 winnews_widget []
|
|
(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"
|
|
: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
|
|
; System info
|
|
(revealer
|
|
:reveal "${matches('fetch system information user distro kernel uptime de desktop packages',oquery)}"
|
|
:transition "slidedown"
|
|
:duration "200ms"
|
|
(revealer
|
|
:reveal "${matches('fetch system information user distro kernel uptime de desktop packages',oquery)}"
|
|
:transition "fade"
|
|
: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}")
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
; 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"
|
|
: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"
|
|
: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"
|
|
: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"
|
|
(revealer
|
|
:reveal "${matches('appearance looks customization blur size blur passes blur strength blur xray',oquery)}"
|
|
:transition "fade"
|
|
: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"
|
|
: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"
|
|
: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 rounding corner',oquery)}"
|
|
:transition "slidedown"
|
|
:duration "200ms"
|
|
(revealer
|
|
:reveal "${matches('appearance looks customization gaps gaps_in inner gaps: inner gaps_out outer gaps: outer space border_size border size border thickness rounding corner',oquery)}"
|
|
:transition "fade"
|
|
: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 ; Quote
|
|
:reveal "${matches('quote speech vaxry linus torvalds hyprland',oquery)}"
|
|
:transition "slidedown"
|
|
:duration "200ms"
|
|
(revealer
|
|
:reveal "${matches('quote speech vaxry linus torvalds hyprland',oquery)}"
|
|
:transition "fade"
|
|
: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 "Assistant"
|
|
)
|
|
(label
|
|
:halign "start"
|
|
:wrap true
|
|
:class "winnews-section"
|
|
:text "Quote"
|
|
)
|
|
)
|
|
(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 "Chat")
|
|
(label :class "winnews-text" :text {quote_content[4]})
|
|
)
|
|
(box
|
|
:orientation "h" :space-evenly false :spacing 10
|
|
:halign "end"
|
|
:style "margin-right: 20px;"
|
|
(label :class "winnews-fetch-icon" :text "Person")
|
|
(label :class "winnews-text" :text {quote_author[4]})
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(revealer ; Waifu
|
|
:reveal "${matches('waifu anime cute sex segs ecchi hentai',oquery)}"
|
|
:transition "slidedown"
|
|
:duration "200ms"
|
|
(revealer
|
|
:reveal "${matches('waifu anime cute sex segs ecchi hentai',oquery)}"
|
|
:transition "fade"
|
|
:duration "200ms"
|
|
(box :orientation "v" :space-evenly false
|
|
:class "winnews-widget-nopad"
|
|
(box
|
|
:orientation "h"
|
|
:space-evenly false
|
|
(label
|
|
:halign "start"
|
|
:class "winnews-section-icon"
|
|
:text ""
|
|
)
|
|
(label
|
|
:halign "start"
|
|
:wrap true
|
|
:hexpand true
|
|
:class "winnews-section"
|
|
:text "Random waifu"
|
|
)
|
|
(eventbox
|
|
:onclick "scripts/toggle-winnews.sh --close && xdg-open 'https://waifu.pics/' &"
|
|
:cursor "pointer"
|
|
(label
|
|
:halign "end"
|
|
:wrap true
|
|
:class "winnews-link winnews-title-right"
|
|
:text "(https://waifu.pics/)"
|
|
)
|
|
)
|
|
)
|
|
; Tag strip
|
|
(scroll
|
|
:halign "fill"
|
|
:hscroll true :vscroll false
|
|
(box
|
|
:class "winnews-tag-strip"
|
|
:space-evenly false
|
|
(for id in WAIFU_TAG_ID
|
|
(button
|
|
:class "winnews-tag"
|
|
:onclick "eww update waifu_get=$(scripts/waifupics.py ${WAIFU_CATEGORIES_ARGS[id]}) &"
|
|
(label :class "wintoggle-text" :text {WAIFU_CATEGORIES[id]})
|
|
)
|
|
)
|
|
)
|
|
)
|
|
; Totally necessary bunny ears
|
|
(label
|
|
:halign "start"
|
|
:wrap true
|
|
:hexpand true
|
|
:halign "center"
|
|
:text "
|
|
⠀⠀⢀⡤⣄⡀
|
|
⠀⢠⡏⠀⠀⠳⡄⠀⠀⠀⠀⠀ ⣀⣀⣀
|
|
⠀⢸⠃⠀⠀⠀⢿⠀⠀⠀⠀ ⣼⠃⠀⠘⢧
|
|
⠀⢸⡆⠀⠀⠀⠸⡆⠀⠀ ⣸⠃⠀⠀⠀⠈⢧
|
|
⠀⠈⣇⠀⠀⠀ ⣧⠀ ⠀ ⡏⠀⢦⠀⠀⠀⠸⡆
|
|
⠀ ⢹⡀⠀⠀⠀⢸⠀ ⢸⠇⠀⠘⢧⡀⣸⠃
|
|
⠀ ⠀⢳⠀⠀⠀⢸⡆ ⢸⠀ ⠀⣼⠙
|
|
"
|
|
:style "margin-bottom: -20px;"
|
|
)
|
|
; The image
|
|
(box
|
|
:orientation "v" :space-evenly false :valign "center"
|
|
(box
|
|
:class "winnews-waifu"
|
|
:style "
|
|
background-image: url('${(waifu_get == 'null' || waifu_get == '') ? 'eww_covers/waifu' : waifu_get}');
|
|
"
|
|
)
|
|
)
|
|
)
|
|
)
|
|
) ; Waifu: end
|
|
(revealer ; Cava
|
|
:reveal "${matches('cava music audio visualizer sound volume beats',oquery)}"
|
|
:transition "slidedown"
|
|
:duration "200ms"
|
|
(revealer
|
|
:reveal "${matches('cava music audio visualizer sound volume beats',oquery)}"
|
|
:transition "fade"
|
|
:duration "200ms"
|
|
(overlay
|
|
(box :orientation "h"
|
|
:height 150
|
|
:class "winnews-widget-nopad-cava"
|
|
(cavacol_winnews :dir "up" :nth 0)
|
|
(cavacol_winnews :dir "up" :nth 1)
|
|
(cavacol_winnews :dir "up" :nth 2)
|
|
(cavacol_winnews :dir "up" :nth 3)
|
|
(cavacol_winnews :dir "up" :nth 4)
|
|
(cavacol_winnews :dir "up" :nth 5)
|
|
(cavacol_winnews :dir "up" :nth 6)
|
|
(cavacol_winnews :dir "up" :nth 7)
|
|
(cavacol_winnews :dir "up" :nth 8)
|
|
(cavacol_winnews :dir "up" :nth 9)
|
|
(cavacol_winnews :dir "up" :nth 10)
|
|
(cavacol_winnews :dir "up" :nth 10)
|
|
(cavacol_winnews :dir "up" :nth 10)
|
|
(cavacol_winnews :dir "up" :nth 12)
|
|
(cavacol_winnews :dir "up" :nth 14)
|
|
(cavacol_winnews :dir "up" :nth 16)
|
|
(cavacol_winnews :dir "up" :nth 18)
|
|
(cavacol_winnews :dir "up" :nth 20)
|
|
(cavacol_winnews :dir "up" :nth 22)
|
|
(cavacol_winnews :dir "up" :nth 24)
|
|
(cavacol_winnews :dir "up" :nth 26)
|
|
(cavacol_winnews :dir "up" :nth 28)
|
|
(cavacol_winnews :dir "up" :nth 30)
|
|
(cavacol_winnews :dir "up" :nth 32)
|
|
(cavacol_winnews :dir "up" :nth 34)
|
|
)
|
|
(box
|
|
:orientation "h"
|
|
:space-evenly false
|
|
:valign "start"
|
|
(label
|
|
:halign "start"
|
|
:class "winnews-section-icon"
|
|
:text ""
|
|
)
|
|
(label
|
|
:halign "start"
|
|
:wrap true
|
|
:class "winnews-section"
|
|
:text "Cava"
|
|
)
|
|
)
|
|
)
|
|
)
|
|
) ; Cava: end
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
(defwindow winnews
|
|
:wm-ignore true
|
|
:focusable true
|
|
:monitor 0
|
|
:geometry (geometry
|
|
:width "50%"
|
|
; :height "0%"
|
|
:anchor "top left"
|
|
)
|
|
(winnews_widget)
|
|
)
|
|
|
|
(defwidget winnews-button []
|
|
(eventbox
|
|
:class "winbarbutton-h winnewsicon-interaction"
|
|
: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"
|
|
(box
|
|
:class "winnewsicon winbutton-${rev_winnews}"
|
|
)
|
|
)
|
|
)
|
|
)
|