forked from Shinonome/dots-hyprland
stuff
This commit is contained in:
Executable
+585
@@ -0,0 +1,585 @@
|
||||
(defwidget winstart_widget []
|
||||
(box
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
:style "
|
||||
${anim_open_winstart ? 'transition: 150ms cubic-bezier(0.05, 0.7, 0.1, 1);' : 'transition: 100ms cubic-bezier(0.3, 0, 0.8, 0.15);'}
|
||||
${rev_winstart ? '' : 'margin-bottom: -900px;'}
|
||||
"
|
||||
(eventbox
|
||||
:valign "start"
|
||||
:onclick "scripts/toggle-winstart.sh --close &"
|
||||
:onmiddleclick "scripts/toggle-winstart.sh --close &"
|
||||
:onrightclick "scripts/toggle-winstart.sh --close &"
|
||||
(box
|
||||
:class "box-that-is-there" :style "min-height: 1px;"
|
||||
)
|
||||
)
|
||||
(box
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
:class "winwin-top"
|
||||
:height 113
|
||||
:width 676
|
||||
:style "
|
||||
${winsearch != '' ? 'min-width: 811px;' : 'min-width: 676px;'}
|
||||
"
|
||||
(overlay
|
||||
(box
|
||||
:valign "end"
|
||||
:space-evenly false
|
||||
:class "winstart-search-prompt"
|
||||
(box
|
||||
:halign "start"
|
||||
:class "winsearch-icon winstart-search-searchbox-icon"
|
||||
)
|
||||
(revealer
|
||||
:reveal {winsearch == ''}
|
||||
:halign "start"
|
||||
:duration "100ms"
|
||||
(label :class "winstart-search-prompt-text" :xalign 0 :text "Type to search")
|
||||
)
|
||||
)
|
||||
(box
|
||||
:valign "end"
|
||||
:class "winstart-search-accent"
|
||||
)
|
||||
(input
|
||||
:class "winstart-search-contents"
|
||||
:onchange "${EWW_CMD} update winsearch='${winsearch_prefix}{}' && ${EWW_CMD} update winsearch_results=\"$(scripts/appsearch '${winsearch_prefix}{}' --updateinfo)\" &"
|
||||
:onaccept "scripts/launchapp '${winsearch_results == '[]' ? (winsearch_prefix + {}) : winsearch_results[0].exec}' &"
|
||||
)
|
||||
)
|
||||
)
|
||||
(revealer
|
||||
:reveal {winsearch != ''}
|
||||
:transition "slidedown"
|
||||
:duration "0ms"
|
||||
(box
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
:class "winwin-bottom-light"
|
||||
:height 682
|
||||
:width 676
|
||||
:style "
|
||||
${winsearch != '' ? 'min-width: 811px;' : 'min-width: 676px;'}
|
||||
"
|
||||
; Tag strip
|
||||
(box
|
||||
:class "winsearch-tag-strip"
|
||||
:space-evenly false
|
||||
(eventbox
|
||||
:onclick "${EWW_CMD} update winsearch_prefix='' && ${EWW_CMD} update winsearch='${winsearch_prefix} ' && ${EWW_CMD} update winsearch_results=\"$(scripts/appsearch ' ' --updateinfo)\" &"
|
||||
(box :class "winsearch-tag-${winsearch_prefix == ''}"
|
||||
(label :class "wintoggle-text" :text "All")
|
||||
)
|
||||
)
|
||||
(eventbox
|
||||
:onclick "${EWW_CMD} update winsearch_prefix='>load ' && ${EWW_CMD} update winsearch='${winsearch_prefix} ' && ${EWW_CMD} update winsearch_results=\"$(scripts/appsearch '>load ' --updateinfo)\" &"
|
||||
(box :class "winsearch-tag-${winsearch_prefix == '>load '}"
|
||||
(label :class "wintoggle-text" :text "Load theme")
|
||||
)
|
||||
)
|
||||
(eventbox
|
||||
:onclick "${EWW_CMD} update winsearch_prefix='1*' && ${EWW_CMD} update winsearch='${winsearch_prefix} ' && ${EWW_CMD} update winsearch_results=\"$(scripts/appsearch --calculator --updateinfo)\" &"
|
||||
(box :class "winsearch-tag-${winsearch_prefix == '1*'}"
|
||||
(label :class "wintoggle-text" :text "Calculate")
|
||||
)
|
||||
)
|
||||
; (eventbox
|
||||
; :onclick "${EWW_CMD} update winsearch_prefix='>_ ' && ${EWW_CMD} update winsearch='${winsearch_prefix}${winsearch}' && ${EWW_CMD} update winsearch_results=\"$(scripts/appsearch '${winsearch_prefix}${winsearch}')\" &"
|
||||
; (box :class "winsearch-tag-${winsearch_prefix == '>_ '}"
|
||||
; (label :class "wintoggle-text" :text "Execute")
|
||||
; )
|
||||
; )
|
||||
)
|
||||
(box
|
||||
:height 627
|
||||
:space-evenly false
|
||||
:orientation "h"
|
||||
:class "winsearch-pad"
|
||||
:spacing 11
|
||||
; Search results list
|
||||
(scroll
|
||||
:width 404
|
||||
(box
|
||||
:width 404
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
:class "winsearch-result-list"
|
||||
(revealer
|
||||
:reveal {winsearch_results != '[]'}
|
||||
:transition "slidedown"
|
||||
:duration "0ms"
|
||||
(label
|
||||
:halign "start"
|
||||
:class "winstart-section winsearch-section"
|
||||
:text "${winsearch_prefix == '' ? 'Results' :
|
||||
(winsearch_prefix == '>load ' ? 'Themes' :
|
||||
(winsearch_prefix == '1*' ? 'Calculator' : 'Execute'))}"
|
||||
)
|
||||
)
|
||||
(box
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
(for result in winsearch_results
|
||||
(overlay
|
||||
(input
|
||||
:value "${result.name}"
|
||||
:class "winsearch-result"
|
||||
:style "
|
||||
background-position: -0.5% center;
|
||||
background-size: auto 65%;
|
||||
"
|
||||
:onaccept "scripts/launchapp '${result.exec}' && scripts/toggle-winstart.sh --close &"
|
||||
)
|
||||
(image
|
||||
:halign "start"
|
||||
:class "winsearch-result-icon"
|
||||
:path {(result.icon != '' && result.icon != 'null') ? result.icon : 'images/svg/dark/appgeneric.svg'}
|
||||
:image-width 28
|
||||
:image-height 28
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(label
|
||||
:halign "start"
|
||||
:class "winstart-section winsearch-section"
|
||||
:text "Run command"
|
||||
)
|
||||
(overlay
|
||||
(input
|
||||
:value {winsearch}
|
||||
:class "winsearch-result"
|
||||
:onaccept "scripts/launchapp '${winsearch_prefix}{}' &"
|
||||
)
|
||||
(image
|
||||
:halign "start"
|
||||
:class "winsearch-result-icon"
|
||||
:path "images/svg/dark/protocol.svg"
|
||||
:image-width 28
|
||||
:image-height 28
|
||||
)
|
||||
)
|
||||
(label
|
||||
:halign "start"
|
||||
:class "winstart-section winsearch-section"
|
||||
:text "Search the web"
|
||||
)
|
||||
(overlay
|
||||
(input
|
||||
:value {winsearch}
|
||||
:class "winsearch-result"
|
||||
:onaccept "xdg-open 'https://www.google.com/search?q={}' && scripts/toggle-winstart.sh --close &"
|
||||
)
|
||||
(image
|
||||
:halign "start"
|
||||
:class "winsearch-result-icon"
|
||||
:path "images/svg/dark/search-fluent.svg"
|
||||
:image-width 28
|
||||
:image-height 28
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
; More options
|
||||
(revealer
|
||||
:reveal {winsearch != ''}
|
||||
:transition "slideleft"
|
||||
:duration "50ms"
|
||||
; Entry actions panel
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly false
|
||||
:class "winsearch-actions-box"
|
||||
:width 404
|
||||
(image
|
||||
:halign "center"
|
||||
:class "winsearch-result-icon-big"
|
||||
:path {(winsearch_actions.icon != '' && winsearch_actions.icon != 'null') ? winsearch_actions.icon : 'images/svg/dark/appgeneric.svg'}
|
||||
:image-width 67
|
||||
:image-height 67
|
||||
)
|
||||
(label
|
||||
:class "winsearch-result-actions-title"
|
||||
:text {winsearch_actions.name}
|
||||
)
|
||||
(label
|
||||
:class "winsearch-result-actions-subtext"
|
||||
:text {winsearch_actions_type}
|
||||
)
|
||||
(box
|
||||
:class "winsearch-separator"
|
||||
)
|
||||
; Actions
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly false
|
||||
(revealer
|
||||
:reveal {winsearch_actions_type == 'Application'}
|
||||
:transition "slidedown"
|
||||
:duration "0ms"
|
||||
(button
|
||||
:class "winsearch-actions-button"
|
||||
:onclick "scripts/launchapp '${winsearch_actions.exec}' &"
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:spacing 13
|
||||
(image
|
||||
:class "winsearch-actions-icon"
|
||||
:path "images/svg/open.svg"
|
||||
:image-width 20
|
||||
:image-height 20
|
||||
)
|
||||
(label :text "Run")
|
||||
)
|
||||
)
|
||||
)
|
||||
(revealer
|
||||
:reveal {winsearch_actions_type == 'Application'}
|
||||
:transition "slidedown"
|
||||
:duration "0ms"
|
||||
(button
|
||||
:class "winsearch-actions-button"
|
||||
:onclick "scripts/launchapp 'xdg-open ${winsearch_actions.filepath}'&"
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:spacing 13
|
||||
(image
|
||||
:class "winsearch-actions-icon"
|
||||
:path "images/svg/folderopen.svg"
|
||||
:image-width 20
|
||||
:image-height 20
|
||||
)
|
||||
(label :text "Open desktop entry")
|
||||
)
|
||||
)
|
||||
)
|
||||
(revealer
|
||||
:reveal {winsearch_actions_type == 'Math result'}
|
||||
:transition "slidedown"
|
||||
:duration "0ms"
|
||||
(button
|
||||
:class "winsearch-actions-button"
|
||||
:onclick "scripts/launchapp '${winsearch_actions.exec}' &"
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:spacing 13
|
||||
(image
|
||||
:class "winsearch-actions-icon"
|
||||
:path "images/svg/copy.svg"
|
||||
:image-width 20
|
||||
:image-height 20
|
||||
)
|
||||
(label :text "Copy result")
|
||||
)
|
||||
)
|
||||
)
|
||||
(revealer
|
||||
:reveal {winsearch_actions_type == 'Color theme'}
|
||||
:transition "slidedown"
|
||||
:duration "0ms"
|
||||
(button
|
||||
:class "winsearch-actions-button"
|
||||
:onclick "scripts/launchapp '${winsearch_actions.exec}' &"
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:spacing 13
|
||||
(image
|
||||
:class "winsearch-actions-icon"
|
||||
:path "images/svg/applycolor.svg"
|
||||
:image-width 20
|
||||
:image-height 20
|
||||
)
|
||||
(label :text "Apply colorscheme")
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(revealer
|
||||
:reveal {winsearch == ''}
|
||||
:transition "slidedown"
|
||||
:duration "0ms"
|
||||
(box
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
(box
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
:class "winwin-center-noseparator"
|
||||
:height 581
|
||||
:style "
|
||||
${winsearch != '' ? 'min-width: 811px;' : 'min-width: 676px;'}
|
||||
"
|
||||
(box
|
||||
:space-evenly false
|
||||
:orientation "h"
|
||||
(revealer
|
||||
:reveal {!winstart_allapps}
|
||||
:transition "slideright"
|
||||
:duration "250ms"
|
||||
(revealer
|
||||
:reveal {!winstart_allapps}
|
||||
:transition "crossfade"
|
||||
:duration "200ms"
|
||||
(box
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
:width 674
|
||||
(centerbox
|
||||
:orientation "h"
|
||||
:class "winsearch-section-box"
|
||||
(label
|
||||
:halign "start"
|
||||
:class "winstart-section"
|
||||
:text "Pinned"
|
||||
)
|
||||
(box)
|
||||
(button
|
||||
:halign "end"
|
||||
:class "wintoggle-text winstart-button-allapps"
|
||||
:onclick "scripts/toggle-allapps.sh --open &"
|
||||
(box
|
||||
:space-evenly false
|
||||
:spacing 6
|
||||
(label :text "All apps" :style "padding: 0 2px;")
|
||||
(label :class "winstart-allapps-icon" :text "")
|
||||
; (box
|
||||
; :class "winstart-allapps-arrow"
|
||||
; )
|
||||
)
|
||||
)
|
||||
)
|
||||
(box
|
||||
:class "winstart-pinnedapps"
|
||||
:height 293
|
||||
:orientation "v"
|
||||
:space-evenly false
|
||||
(for row in pinnedapps
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
(for app in row
|
||||
(eventbox
|
||||
:class "winstart-pinnedapps-entry"
|
||||
:onclick "scripts/toggle-winstart.sh --close && ${app.exec}"
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly false
|
||||
:class "winstart-pinnedapps-entry-pad"
|
||||
:width 101
|
||||
:height 88
|
||||
(box
|
||||
:class "winstart-pinnedapps-icon"
|
||||
:style "
|
||||
min-width: 33px;
|
||||
min-height: 33px;
|
||||
background-image: url('${app.icon}');
|
||||
background-position: center;
|
||||
background-size: auto 100%;
|
||||
"
|
||||
)
|
||||
(label
|
||||
:limit-width 12
|
||||
:class "wintoggle-text"
|
||||
:style "margin-top: 4px;"
|
||||
:text "${app.name}"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(centerbox
|
||||
:orientation "h"
|
||||
:class "winsearch-section-box"
|
||||
(label
|
||||
:halign "start"
|
||||
:class "winstart-section"
|
||||
:text "Recommended"
|
||||
)
|
||||
(box)
|
||||
(box)
|
||||
)
|
||||
(box
|
||||
:class "winstart-recommended"
|
||||
:height 222
|
||||
:orientation "v"
|
||||
:space-evenly false
|
||||
:valign "start"
|
||||
(for recrow in recommended
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:valign "start"
|
||||
:spacing 20
|
||||
(for entry in recrow
|
||||
(eventbox
|
||||
:class "winstart-recommended-entry"
|
||||
:onclick "scripts/toggle-winstart.sh --close && ${entry.exec}"
|
||||
(box
|
||||
:valign "start"
|
||||
:orientation "h"
|
||||
:space-evenly false
|
||||
:width 286
|
||||
:height 66
|
||||
:class "winstart-recommended-entry-pad"
|
||||
; Recommended tile contents here
|
||||
(box
|
||||
:halign "start"
|
||||
:class "winstart-recommended-icon"
|
||||
:style "
|
||||
min-width: 33px;
|
||||
min-height: 33px;
|
||||
background-image: url('${entry.icon}');
|
||||
background-position: center;
|
||||
background-size: 100% auto;
|
||||
"
|
||||
)
|
||||
(box
|
||||
:orientation "v"
|
||||
:space-evenly false
|
||||
:class "winstart-recommended-text"
|
||||
(label :xalign 0 :class "wintoggle-text winstart-recommended-name" :text "${entry.name}" :limit-width 26)
|
||||
(label :xalign 0 :class "wintoggle-text winstart-recommended-subtext" :text "${entry.subtext}" :limit-width 29)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(revealer
|
||||
:reveal {winstart_allapps}
|
||||
:transition "slideleft"
|
||||
:duration "250ms"
|
||||
(revealer
|
||||
:reveal {winstart_allapps}
|
||||
:transition "crossfade"
|
||||
:duration "200ms"
|
||||
(box
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
:width 674
|
||||
(centerbox
|
||||
:orientation "h"
|
||||
:class "winsearch-section-box"
|
||||
(label
|
||||
:halign "start"
|
||||
:class "winstart-section"
|
||||
:text "All apps"
|
||||
)
|
||||
(box)
|
||||
(button
|
||||
:halign "end"
|
||||
:class "wintoggle-text winstart-button-allapps"
|
||||
:onclick "scripts/toggle-allapps.sh --close"
|
||||
(box
|
||||
:space-evenly false
|
||||
:spacing 6
|
||||
(label :class "winstart-allapps-icon" :text "")
|
||||
(label :text "Back" :style "padding: 0 2px;")
|
||||
; (box
|
||||
; :class "winstart-allapps-arrow"
|
||||
; )
|
||||
)
|
||||
)
|
||||
)
|
||||
(scroll
|
||||
:height 549
|
||||
(box
|
||||
:space-evenly false
|
||||
:orientation "v"
|
||||
:class "winstart-allapps-box"
|
||||
(for app in allapps
|
||||
(button
|
||||
:class "winstart-allapps-app"
|
||||
:onclick "scripts/toggle-winstart.sh --close && gtk-launch ${app.filename} &"
|
||||
(box
|
||||
:space-evenly false
|
||||
:orientation "h"
|
||||
(revealer
|
||||
:transition "slideright"
|
||||
:duration "0ms"
|
||||
:reveal {app.icon != '_letter'}
|
||||
(image
|
||||
:class "winstart-allapps-app-icon"
|
||||
:path {(app.icon != '_letter' && app.icon != '') ? app.icon : 'images/svg/dark/app.svg'}
|
||||
:image-height 25
|
||||
:image-width 25
|
||||
)
|
||||
)
|
||||
(label
|
||||
:class "winbartext winstart-allapps-appname"
|
||||
:text {app.name}
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(centerbox
|
||||
:orientation "h"
|
||||
:class "winwin-bottom winstart-bottom-pad"
|
||||
:height 67
|
||||
(button
|
||||
:halign "start"
|
||||
:class "winstart-user"
|
||||
:onclick "scripts/toggle-winstart.sh --close && gnome-control-center user-accounts &"
|
||||
(box
|
||||
:space-evenly false
|
||||
:orientation "h"
|
||||
:spacing 16
|
||||
(box
|
||||
:class "winstart-user-icon"
|
||||
)
|
||||
(label :class "wintoggle-text" :text "${username}")
|
||||
)
|
||||
)
|
||||
(box)
|
||||
(button
|
||||
:halign "end"
|
||||
:class "winstart-power-icon winstart-power-icon-${rev_winpowermenu}"
|
||||
:onclick "scripts/toggle-winpowermenu.sh &"
|
||||
(image
|
||||
:path "images/svg/dark/power.svg"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defwindow winstart
|
||||
:wm-ignore true
|
||||
:monitor 0
|
||||
:focusable true
|
||||
:geometry (geometry
|
||||
:x "0px"
|
||||
:y "51px"
|
||||
; :height 788
|
||||
:width 673
|
||||
:anchor "bottom center"
|
||||
)
|
||||
(winstart_widget)
|
||||
)
|
||||
Reference in New Issue
Block a user