eww add seperators & layouts
This commit is contained in:
@@ -72,7 +72,7 @@
|
||||
(defpoll date
|
||||
:interval "1s"
|
||||
:initial "-"
|
||||
`date '+ %a %d.%m.%y %H:%M'`)
|
||||
`date '+ %a %d.%m.%y %H:%M'`)
|
||||
|
||||
(defvar ws1 "ws-empty")
|
||||
(defvar ws2 "ws-empty")
|
||||
@@ -84,6 +84,8 @@
|
||||
(defvar ws8 "ws-empty")
|
||||
(defvar ws9 "ws-empty")
|
||||
|
||||
(defvar layouts "")
|
||||
|
||||
;; /-- Blocks -->
|
||||
(defwidget widgetWorkspaces []
|
||||
(box
|
||||
@@ -149,53 +151,108 @@
|
||||
:onclick "wmctrl -s 8"
|
||||
:class "workspace-button ${ws9}"
|
||||
(label
|
||||
:text "9"))
|
||||
(label
|
||||
:text " ")))
|
||||
:text "9"))))
|
||||
|
||||
(defwidget widgetWindows []
|
||||
(label
|
||||
:text "| ${windows}"))
|
||||
:text "${windows}"))
|
||||
|
||||
(defwidget widgetMic []
|
||||
(defwidget widgetLayouts []
|
||||
(label
|
||||
:class micClass
|
||||
:text "${micIcon} "))
|
||||
:text "${layouts}"))
|
||||
|
||||
(defwidget widgetLogSeperator []
|
||||
(label
|
||||
:class "text separator"
|
||||
:text "⦁"))
|
||||
|
||||
(defwidget widgetSpeaker []
|
||||
(box
|
||||
:space-evenly false
|
||||
(label
|
||||
:class speakerClass
|
||||
:text "${speakerIcon} ${speakerVolume}% "))
|
||||
:text "${speakerIcon} ")
|
||||
(label
|
||||
:class "text"
|
||||
:text "${speakerVolume}% ")
|
||||
(label
|
||||
:class micClass
|
||||
:text "${micIcon}")))
|
||||
|
||||
(defwidget widgetBacklight []
|
||||
(box
|
||||
:space-evenly false
|
||||
(label
|
||||
:class "backlight"
|
||||
:text " ${backlight}% "))
|
||||
:text " ")
|
||||
(label
|
||||
:class "text"
|
||||
:text "${backlight}%")))
|
||||
|
||||
(defwidget widgetCpu []
|
||||
(box
|
||||
:space-evenly false
|
||||
(label
|
||||
:class "cpu"
|
||||
:text " ${cpu}% "))
|
||||
:text " ")
|
||||
(label
|
||||
:class "text"
|
||||
:text "${cpu}%")))
|
||||
|
||||
(defwidget widgetMemory []
|
||||
(box
|
||||
:space-evenly false
|
||||
(label
|
||||
:class "memory"
|
||||
:text " ${memory}% "))
|
||||
:text " ")
|
||||
(label
|
||||
:class "text"
|
||||
:text "${memory}%")))
|
||||
|
||||
(defwidget widgetBattery []
|
||||
(box
|
||||
:space-evenly false
|
||||
(label
|
||||
:class batteryClass
|
||||
:text "${batteryIcon} ${batteryVolume}% "))
|
||||
:text "${batteryIcon} ")
|
||||
(label
|
||||
:class "text"
|
||||
:text "${batteryVolume}%")))
|
||||
|
||||
(defwidget widgetNetworkDown []
|
||||
(box
|
||||
:space-evenly false
|
||||
(label
|
||||
:class "networkDown"
|
||||
:text " ${networkDown}KiB "))
|
||||
:text " ")
|
||||
(label
|
||||
:class "text"
|
||||
:text "${networkDown}")))
|
||||
|
||||
(defwidget widgetNetworkUp []
|
||||
(box
|
||||
:space-evenly false
|
||||
(label
|
||||
:class "networkUp"
|
||||
:text " ${networkUp}KiB "))
|
||||
:text " ")
|
||||
(label
|
||||
:class "text"
|
||||
:text "${networkUp}")))
|
||||
|
||||
(defwidget widgetTime []
|
||||
(box
|
||||
:space-evenly false
|
||||
(label
|
||||
:class "time"
|
||||
:text " ")
|
||||
(label
|
||||
:class "text"
|
||||
:text "${date}")))
|
||||
|
||||
(defwidget widgetSeperator []
|
||||
(label
|
||||
:class "text separator"
|
||||
:text "|"))
|
||||
|
||||
;; /-- Bar -->
|
||||
(defwindow bar []
|
||||
@@ -215,16 +272,25 @@
|
||||
:space-evenly false
|
||||
:class "bar"
|
||||
(widgetWorkspaces)
|
||||
(widgetLogSeperator)
|
||||
(widgetLayouts)
|
||||
(widgetLogSeperator)
|
||||
(widgetWindows)
|
||||
(box :hexpand true)
|
||||
(widgetMic)
|
||||
(widgetSpeaker)
|
||||
(widgetSeperator)
|
||||
(widgetBacklight)
|
||||
(widgetSeperator)
|
||||
(widgetCpu)
|
||||
(widgetSeperator)
|
||||
(widgetMemory)
|
||||
(widgetSeperator)
|
||||
(widgetBattery)
|
||||
(widgetSeperator)
|
||||
(widgetNetworkDown)
|
||||
(widgetSeperator)
|
||||
(widgetNetworkUp)
|
||||
(label :text date)
|
||||
(widgetSeperator)
|
||||
(widgetTime)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -9,8 +9,11 @@
|
||||
$violet: #cba6f7;
|
||||
$blue: #89b4fa;
|
||||
$gold: #fab387;
|
||||
$orange: #fab387;
|
||||
// <-- Prepare all -->
|
||||
* { all: unset; }
|
||||
* {all: unset;}
|
||||
.text {color: $white-text;}
|
||||
.separator {padding: 0px 4px;}
|
||||
// <-- Bar -->
|
||||
// <-- Widgets -->
|
||||
// <-- Audio -->
|
||||
@@ -32,21 +35,12 @@
|
||||
// <-- Network -->
|
||||
.networkUp {color: $blue;}
|
||||
// <-- Workspaces -->
|
||||
.workspace-button {
|
||||
background: $grey-background;
|
||||
}
|
||||
.ws-current {
|
||||
color: $green;
|
||||
}
|
||||
.ws-visible {
|
||||
color: $red;
|
||||
}
|
||||
.ws-hidden {
|
||||
color: $white-text;
|
||||
}
|
||||
.ws-empty {
|
||||
color: $grey-text;
|
||||
}
|
||||
.workspace-button {background: $grey-background;}
|
||||
.ws-current {color: $green;}
|
||||
.ws-visible {color: $red;}
|
||||
.ws-hidden {color: $white-text;}
|
||||
.ws-empty {color: $grey-text;}
|
||||
.time {color: $orange;}
|
||||
// <-- Window -->
|
||||
.bar {
|
||||
padding: 0.2em 1em;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
line=$(cat /tmp/xmonad-eww-log)
|
||||
IFS='|' read -r workspaces windows <<<"$line"
|
||||
IFS='|' read -r workspaces layouts windows <<<"$line"
|
||||
# Workspaces
|
||||
workspaceArray=($workspaces)
|
||||
i=0
|
||||
@@ -15,5 +15,7 @@ for ws in "${workspaceArray[@]}"; do
|
||||
eww update ws$i="ws-empty"
|
||||
fi
|
||||
done
|
||||
# Layouts
|
||||
eww update layouts="${layouts}"
|
||||
# Windows
|
||||
echo "${windows}"
|
||||
|
||||
@@ -76,7 +76,7 @@ myXmobarPP =
|
||||
, ppHiddenNoWindows = id
|
||||
, ppUrgent = wrap "!" "!"
|
||||
, ppSep = "|"
|
||||
, ppOrder = \(ws : _ : _ : wins : _) -> [ws, wins]
|
||||
, ppOrder = \(ws : layout : _ : wins : _) -> [ws, layout, wins]
|
||||
, ppExtras = [logTitles formatFocused formatUnfocused]
|
||||
}
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user