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