summaryrefslogtreecommitdiff
path: root/.config/eww/applauncher.yuck
diff options
context:
space:
mode:
Diffstat (limited to '.config/eww/applauncher.yuck')
-rw-r--r--.config/eww/applauncher.yuck31
1 files changed, 27 insertions, 4 deletions
diff --git a/.config/eww/applauncher.yuck b/.config/eww/applauncher.yuck
index 7a02e8b..8a483ac 100644
--- a/.config/eww/applauncher.yuck
+++ b/.config/eww/applauncher.yuck
@@ -1,3 +1,5 @@
+(deflisten applist :initial '[{"name":"true"}]' `./listapps.py query`)
+
(defwindow applauncher
:monitor 0
:geometry (geometry :x "50%"
@@ -5,9 +7,30 @@
:width "500px"
:height "400px"
:anchor "center center")
- :stacking "overlay"
+ :stacking "fg"
:exclusive false
:focusable true
- (box :orientation "v"
- :class "applauncher"
- (input :onaccept `eww close applauncher`)))
+ (eventbox :onhoverlost `${EWW_CMD} close applauncher`
+ (box :orientation "v"
+ :space-evenly false
+ :class "applauncher"
+ (input :onchange `./listapps.py query {}`
+ :onaccept `./listapps.py run ${applist[0].name} & ${EWW_CMD} close applauncher`
+ :class "app-input")
+ (scroll :class "applist"
+ :vexpand true
+ :vscroll true
+ :hscroll false
+ (box :orientation "v"
+ :space-evenly false
+ (for appdata in applist
+ (app :appdata appdata)))))))
+
+(defwidget app [appdata]
+ (button :onclick `./listapps.py run ${appdata.name} & ${EWW_CMD} close applauncher`
+ :halign "start"
+ :hexpand true
+ :class "app"
+ (box :orientation "h"
+ :hexpand true
+ (label :text {appdata.name}))))