mirror of
https://github.imc.re/void-land/hyprland-void-dots
synced 2025-04-25 13:46:54 +02:00
fix: eww workspaces
This commit is contained in:
parent
e499594658
commit
7ece0b080b
6 changed files with 12 additions and 70 deletions
|
@ -3,7 +3,6 @@
|
|||
|
||||
(include "./src/sidebar/main.yuck")
|
||||
(include "./src/control-panel/main.yuck")
|
||||
(include "./src/control-panel/windowswitcher.yuck")
|
||||
(include "./src/wallpapers/main.yuck")
|
||||
(include "./src/dashboard/main.yuck")
|
||||
(include "./src/dock/main.yuck")
|
||||
|
|
|
@ -12,22 +12,25 @@
|
|||
(defpoll calendar_day :initial "1" :interval "20h" "date '+%d'")
|
||||
(defpoll calendar_year :initial "2000" :interval "20h" "date '+%Y'")
|
||||
(defpoll bat0 :initial "0" :interval "30s" "bash ./scripts/sys_info --bat")
|
||||
(defpoll baticon :initial "" :interval "30s" "bash ./scripts/sys_info --baticon")
|
||||
(defpoll batstat :interval "30s" "cat /sys/class/power_supply/BAT0/status")
|
||||
(defpoll homedir :initial "" :interval "24h" "echo ~")
|
||||
(defpoll theme :interval "24h" "./scripts/toggletheme")
|
||||
; (defpoll cpu :interval "1s" "bash ./scripts/sys_info --cpu")
|
||||
; (defpoll mem :interval "1s" "bash ./scripts/sys_info --mem")
|
||||
|
||||
; Reveals
|
||||
(defvar reveal1 false)
|
||||
(defvar reveal2 false)
|
||||
(defvar reveal3 false)
|
||||
(defvar reveal4 false)
|
||||
(defvar reveal5 false)
|
||||
(defvar reveal6 false)
|
||||
|
||||
(defpoll trashcanpath :interval "24h" "./scripts/iconfetch.py trashcan_empty")
|
||||
; Desktop
|
||||
(defpoll trashcanPath :interval "24h" "./scripts/iconfetch.py trashcan_empty")
|
||||
|
||||
; Wallpaper
|
||||
(defvar wallpapers "[]")
|
||||
|
||||
;; windows for workspace switching
|
||||
(defvar windows "[[], [], [], [], []]")
|
||||
|
||||
; Hyprland
|
||||
(defvar gapsouter 0)
|
||||
(defvar gapsinner 10)
|
||||
|
@ -47,7 +50,7 @@
|
|||
|
||||
; Workspaces
|
||||
(defvar show_no_of_windows false)
|
||||
(deflisten workspacesjson :initial "[]" "./scripts/workspaces get-all-workspaces")
|
||||
(defpoll workspacesjson :initial "[]" :interval "60s" "./scripts/workspaces get-all-workspaces")
|
||||
(defpoll current_workspace :initial "0" :interval "50ms" "./scripts/workspaces get-active-workspace")
|
||||
|
||||
; Notifications
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
(include "./src/control-panel/windowswitcher.yuck")
|
||||
|
||||
(defwindow control_panel
|
||||
:geometry (geometry
|
||||
:x 10
|
||||
|
|
|
@ -1,58 +0,0 @@
|
|||
|
||||
;; Credits to T0kyob0y
|
||||
|
||||
(defwidget overview []
|
||||
(box
|
||||
:space-evenly false
|
||||
:class "unbarwidget"
|
||||
:orientation "h"
|
||||
:hexpand true
|
||||
(scroll
|
||||
:hscroll true
|
||||
:vscroll false
|
||||
:hexpand true
|
||||
(box
|
||||
:orientation "h"
|
||||
:space-evenly true
|
||||
:spacing 10
|
||||
(for i in {[0, 1, 2, 3, 4]}
|
||||
(button
|
||||
;; :ondropped "notify-send 'real'"
|
||||
:onclick "${EWW_CMD} update revealcontrolpanel=false && swaymsg -t command workspace number ${i+1}"
|
||||
;; :onclick "swaymsg -t command workspace number ${i+1}"
|
||||
(box
|
||||
:class "overviewworkspace"
|
||||
:space-evenly false
|
||||
;; :height {round(1080/5.8, 0)}
|
||||
:vexpand true
|
||||
:width {round(1920/5.8, 0)}
|
||||
(for j in {windows[i]}
|
||||
(windowapp :w j)
|
||||
))
|
||||
))))))
|
||||
|
||||
(defwidget windowapp [w]
|
||||
(box
|
||||
:style "
|
||||
margin-left: ${round(((w.rect.x)/5.8), 0)}px;
|
||||
margin-top: ${round(w.rect.y/5.8, 0)}px;
|
||||
margin-right: -${round((w.rect.x + w.rect.width)/5.8, 0)}px;
|
||||
margin-bottom: -${round(((w.rect.y + w.rect.height)/5.8), 0)}px;
|
||||
"
|
||||
:hexpand false
|
||||
:vexpand false
|
||||
:halign "start"
|
||||
:valign "start"
|
||||
:class "overviewwindow"
|
||||
(eventbox
|
||||
:valign "center"
|
||||
:halign "center"
|
||||
:dragvalue "${w.pid}"
|
||||
:dragtype "text"
|
||||
(image
|
||||
:valign "center"
|
||||
:halign "center"
|
||||
:image-height {round(w.rect.width/5.8 * 45/100, 0)}
|
||||
:image-width {round(w.rect.height/5.8 * 45/100, 0)}
|
||||
:path {w.path}
|
||||
))))
|
|
@ -22,7 +22,7 @@
|
|||
:space-evenly false
|
||||
:height 100
|
||||
:valign "end"
|
||||
(image :width 100 :height 100 :image-width 80 :image-height 80 :path trashcanpath)
|
||||
(image :width 100 :height 100 :image-width 80 :image-height 80 :path trashcanPath)
|
||||
(label :class "desktoptext" :text "Trash")))
|
||||
|
||||
(for i in '["amogus"]'
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
:height "450"
|
||||
:vexpand false
|
||||
(home)
|
||||
(workspaces)
|
||||
(workspaces)
|
||||
(hiddenctl)
|
||||
))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue