integrate home-manager config
This commit is contained in:
parent
a470338c43
commit
826a0e5525
45 changed files with 5308 additions and 1 deletions
95
home-manager/jwm/eww/eww.scss
Normal file
95
home-manager/jwm/eww/eww.scss
Normal file
|
@ -0,0 +1,95 @@
|
|||
@import "theme_cat_mocha"
|
||||
@import "theme_jwm"
|
||||
|
||||
* {
|
||||
font-family: 'Iosevka Comfy Duo, Symbols Nerd Font, Font Awesome';
|
||||
}
|
||||
|
||||
.background {
|
||||
background-color: rgba(#000, 0);
|
||||
}
|
||||
|
||||
.bar {
|
||||
background-color: rgba($cat-mantle, 0.9);
|
||||
padding: 5px 10px;
|
||||
border-radius: 10px;
|
||||
margin: 10px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.modules > widget {
|
||||
background-color: rgba(#000, 0);
|
||||
}
|
||||
|
||||
.modules > widget > *,
|
||||
.modules > * {
|
||||
background-color: rgba($cat-surface1, 0.7);
|
||||
border-radius: 10px;
|
||||
margin: 0px 10px;
|
||||
padding: 0px 10px;
|
||||
}
|
||||
|
||||
.modules > .container {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.modules > .container > widget > *,
|
||||
.modules > .container > * {
|
||||
padding: 0px 8px;
|
||||
}
|
||||
.modules > .container > widget:first-child > *,
|
||||
.modules > .container > *:first-child {
|
||||
border-top-left-radius: 10px;
|
||||
border-bottom-left-radius: 10px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
.modules > .container > widget:last-child > *,
|
||||
.modules > .container > *:last-child {
|
||||
border-top-right-radius: 10px;
|
||||
border-bottom-right-radius: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.workspaces { padding: 0px; }
|
||||
.workspaces .item {
|
||||
font-size: 90%;
|
||||
min-width: 12px;
|
||||
padding: 0px 8px;
|
||||
border-radius: 10px;
|
||||
background-color: rgba(0,0,0,0);
|
||||
color: $cat-text;
|
||||
}
|
||||
|
||||
.workspaces .item:focus,
|
||||
.workspaces .item.workspace-active,
|
||||
.workspaces .item:hover {
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
.workspaces .item.workspace-active {
|
||||
background-color: $jwm-accent;
|
||||
color: $jwm-accent-contrast;
|
||||
}
|
||||
|
||||
.audio-controls { padding: 0; }
|
||||
.audio-controls .volume-control { padding-right: 6px; }
|
||||
.audio-controls .mic-control .icon { padding-left: 6px; }
|
||||
|
||||
.volume-control .icon { font-size: 18px; }
|
||||
.volume-control .value { padding-left: 6px; }
|
||||
.volume-control.muted .icon { color: $cat-red; }
|
||||
.volume-control.muted .value {
|
||||
color: $cat-subtext0;
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.mic-control.muted .icon { color: $cat-subtext0; }
|
||||
|
||||
.playerctl.playing .music-icon {
|
||||
background-color: $jwm-accent;
|
||||
color: $jwm-accent-contrast;
|
||||
}
|
||||
.playerctl.paused .details { color: $cat-subtext0; }
|
||||
.playerctl .details > *:first-child, .playerctl > *:first-child { padding-left: 0px; }
|
||||
.playerctl .details > *:last-child, .playerctl > *:last-child { padding-right: 0px; }
|
||||
.playerctl .details > * { padding: 0px 5px; }
|
288
home-manager/jwm/eww/eww.yuck
Normal file
288
home-manager/jwm/eww/eww.yuck
Normal file
|
@ -0,0 +1,288 @@
|
|||
;; --------- Variables
|
||||
|
||||
;; --------- Listeners
|
||||
|
||||
(deflisten hyprland-window
|
||||
`
|
||||
socat -U - /tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock | \
|
||||
grep 'activewindow>>' --line-buffered | \
|
||||
sed 's/^activewindow>>[^,]*,//' --unbuffered
|
||||
`)
|
||||
|
||||
(deflisten hyprland-submap
|
||||
`
|
||||
socat -U - /tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock | \
|
||||
grep 'submap>>' --line-buffered | \
|
||||
sed 's/^submap>>//' --unbuffered
|
||||
`)
|
||||
|
||||
(deflisten workspace-list
|
||||
:initial '[]'
|
||||
`hyprland-workspaces _ | jq --compact-output --unbuffered '[
|
||||
.[] | select(.id > 0)
|
||||
]'`)
|
||||
|
||||
(deflisten current-workspace
|
||||
:initial '[]'
|
||||
`hyprland-workspaces _ | jq --compact-output --unbuffered '
|
||||
.[] | select(.id > 0) | select(.class | contains("active")) | .id
|
||||
'`)
|
||||
|
||||
|
||||
(deflisten audio-out-volume
|
||||
:initial 0
|
||||
`
|
||||
pamixer --get-volume
|
||||
pactl subscribe | grep --line-buffered "'change' on sink" | xargs -I {} pamixer --get-volume
|
||||
`
|
||||
)
|
||||
|
||||
(deflisten audio-out-mute
|
||||
:initial false
|
||||
`
|
||||
pamixer --get-mute
|
||||
pactl subscribe | grep --line-buffered "'change' on sink" | xargs -I {} pamixer --get-mute
|
||||
`
|
||||
)
|
||||
|
||||
(deflisten audio-in-mute
|
||||
:initial false
|
||||
`
|
||||
pamixer --get-mute --source @DEFAULT_SOURCE@
|
||||
pactl subscribe | grep --line-buffered "'change' on source" | xargs -I {} pamixer --get-mute --source @DEFAULT_SOURCE@
|
||||
`
|
||||
)
|
||||
|
||||
|
||||
(deflisten playerctl-status :initial "" `playerctl status --player strawberry --follow --format '{{lc(status)}}'`)
|
||||
(deflisten playerctl-title `playerctl metadata --player strawberry --follow --format '{{title}}'`)
|
||||
(deflisten playerctl-artist `playerctl metadata --player strawberry --follow --format '{{artist}}'`)
|
||||
(deflisten playerctl-album `playerctl metadata --player strawberry --follow --format '{{album}}'`)
|
||||
(deflisten playerctl-position `playerctl metadata --player strawberry --follow --format '{{duration(position)}}'`)
|
||||
(deflisten playerctl-length `playerctl metadata --player strawberry --follow --format '{{duration(mpris:length)}}'`)
|
||||
|
||||
;; -------------- Widgets
|
||||
|
||||
(defwidget window-title [?limit-width]
|
||||
(label
|
||||
:visible {strlength(hyprland-window) > 0}
|
||||
:text hyprland-window
|
||||
:class "window-title"
|
||||
:tooltip hyprland-window
|
||||
:limit-width {limit-width ?: 999}
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget wm-mode []
|
||||
(eventbox
|
||||
:class "wm-mode"
|
||||
:visible {strlength(hyprland-submap) > 0}
|
||||
:onclick `hyprctl dispatch submap '' >/dev/null`
|
||||
(label
|
||||
:text hyprland-submap
|
||||
:tooltip hyprland-submap
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget workspaces [monitor]
|
||||
(box
|
||||
:class "workspaces"
|
||||
(eventbox
|
||||
:onscroll `~/.config/eww/hyprworkspace {} ${monitor} ${current-workspace}`
|
||||
(box
|
||||
(for i in {jq(workspace-list, '[ .[] | select (.monitor == "${monitor}") ]')}
|
||||
(button
|
||||
:onclick "bash -c 'hyprctl dispatch workspace ${i.id} >/dev/null'"
|
||||
:class "item ${i.class}"
|
||||
"${i.name}"
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget clock []
|
||||
(label
|
||||
:class "clock"
|
||||
:text {formattime(EWW_TIME, "%H:%M")}
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget battery [bat]
|
||||
(box
|
||||
:class {"battery " + (EWW_BATTERY[bat].capacity < 15 && EWW_BATTERY[bat].status != "Charging" ? "critical" : "") }
|
||||
:style {EWW_BATTERY[bat].status == "Charging" ? "padding-left: 8px" : "padding-left: 3px"}
|
||||
:space-evenly false
|
||||
(box
|
||||
:visible {EWW_BATTERY[bat].status == 'Charging'}
|
||||
:style "margin-right: 3px"
|
||||
(transform
|
||||
:rotate 75
|
||||
:translate-x "-19px"
|
||||
:translate-y "-4px"
|
||||
(label :text ""))
|
||||
)
|
||||
(transform
|
||||
:visible {EWW_BATTERY[bat].status != 'Charging'}
|
||||
:rotate 75
|
||||
:translate-x "-21px"
|
||||
(label :text {
|
||||
EWW_BATTERY[bat].capacity < 10 ? "" :
|
||||
EWW_BATTERY[bat].capacity < 20 ? "" :
|
||||
EWW_BATTERY[bat].capacity < 30 ? "" :
|
||||
EWW_BATTERY[bat].capacity < 40 ? "" :
|
||||
EWW_BATTERY[bat].capacity < 50 ? "" :
|
||||
EWW_BATTERY[bat].capacity < 60 ? "" :
|
||||
EWW_BATTERY[bat].capacity < 70 ? "" :
|
||||
EWW_BATTERY[bat].capacity < 80 ? "" :
|
||||
EWW_BATTERY[bat].capacity < 90 ? "" :
|
||||
""
|
||||
}))
|
||||
(label :text "100%")
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget volume-control []
|
||||
(eventbox
|
||||
:onclick `pamixer --toggle-mute`
|
||||
;;:onclick `notify-send "handler triggered"`
|
||||
:onscroll `
|
||||
amt=1
|
||||
if [ "{}" = "up" ]; then
|
||||
pamixer --increase $amt
|
||||
else
|
||||
pamixer --decrease $amt
|
||||
fi
|
||||
`
|
||||
(box
|
||||
:space-evenly false
|
||||
:class {"volume-control " + (audio-out-mute ? "muted " : "")}
|
||||
(label
|
||||
:class "icon"
|
||||
:text {
|
||||
audio-out-mute ? "" : (
|
||||
audio-out-volume < 10 ? "" :
|
||||
audio-out-volume < 60 ? "" :
|
||||
""
|
||||
)
|
||||
}
|
||||
)
|
||||
(label :class "value" :text "${audio-out-volume}%")
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget mic-control []
|
||||
(eventbox
|
||||
:class {"mic-control " + (audio-in-mute ? "muted " : "")}
|
||||
:onclick `pamixer --toggle-mute --source @DEFAULT_SOURCE@`
|
||||
(label
|
||||
:class "icon"
|
||||
:text {audio-in-mute ? "" : ""}
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defwidget audio-controls []
|
||||
(box :class "container audio-controls" :space-evenly false (volume-control) (mic-control))
|
||||
)
|
||||
|
||||
(defwidget playerctl [?limit-width]
|
||||
(box
|
||||
:space-evenly false
|
||||
:class "container playerctl ${playerctl-status}"
|
||||
(eventbox
|
||||
(label :class "music-icon" :text "")
|
||||
)
|
||||
(eventbox
|
||||
:visible { playerctl-status != '' }
|
||||
:onclick 'playerctl --player strawberry play-pause'
|
||||
:onrightclick 'playerctl --player strawberry next'
|
||||
:onmiddleclick 'playerctl --player strawberry previous'
|
||||
(box
|
||||
:class "details"
|
||||
:space-evenly false
|
||||
:tooltip `${playerctl-title} - ${playerctl-artist} - ${playerctl-album}`
|
||||
(label
|
||||
:class "status-icon"
|
||||
:text { (playerctl-status == 'playing') ? '' : '' }
|
||||
)
|
||||
(label
|
||||
:class "track-info"
|
||||
:limit-width limit-width
|
||||
:text `${playerctl-title} - ${playerctl-artist} - ${playerctl-album}`
|
||||
)
|
||||
(label
|
||||
:class "position"
|
||||
:markup `<small>[${playerctl-position}/${playerctl-length}]</small>`
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
;; ---------- Bars
|
||||
|
||||
(defwidget bar [monitor ?title-limit-width]
|
||||
(centerbox :class "bar"
|
||||
:class "bar"
|
||||
(box :class "modules modules-left"
|
||||
:space-evenly false
|
||||
:halign "start"
|
||||
(workspaces :monitor monitor)
|
||||
(wm-mode)
|
||||
(playerctl :limit-width 60)
|
||||
)
|
||||
(box :class "modules modules-center"
|
||||
:space-evenly false
|
||||
:halign "center"
|
||||
(window-title :limit-width title-limit-width)
|
||||
)
|
||||
(box :class "modules modules-right"
|
||||
:space-evenly false
|
||||
:halign "end"
|
||||
(audio-controls)
|
||||
(battery :bat "BAT0")
|
||||
(clock)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(defwindow bar-window-0
|
||||
:monitor 0
|
||||
:geometry (geometry :x "0%"
|
||||
:width "100%"
|
||||
:height "30px"
|
||||
:anchor "top center")
|
||||
:stacking "fg"
|
||||
;; :reserve (struts :distance "80px" :side "top")
|
||||
:exclusive true
|
||||
:windowtype "dock"
|
||||
(box (bar :monitor "eDP-1" :title-limit-width 100))
|
||||
)
|
||||
(defwindow bar-window-1
|
||||
:monitor 1
|
||||
:geometry (geometry :x "0%"
|
||||
:width "100%"
|
||||
:height "30px"
|
||||
:anchor "top center")
|
||||
:stacking "fg"
|
||||
;; :reserve (struts :distance "80px" :side "top")
|
||||
:exclusive true
|
||||
:windowtype "dock"
|
||||
(box (bar :monitor "DP-3"))
|
||||
)
|
||||
(defwindow bar-window-2
|
||||
:monitor 2
|
||||
:geometry (geometry :x "0%"
|
||||
:width "100%"
|
||||
:height "30px"
|
||||
:anchor "top center")
|
||||
:stacking "fg"
|
||||
;; :reserve (struts :distance "80px" :side "top")
|
||||
:exclusive true
|
||||
:windowtype "dock"
|
||||
(box (bar :monitor "DP-2" :title-limit-width 60))
|
||||
)
|
22
home-manager/jwm/eww/hyprworkspace
Executable file
22
home-manager/jwm/eww/hyprworkspace
Executable file
|
@ -0,0 +1,22 @@
|
|||
#!/bin/sh
|
||||
|
||||
cmd=$1
|
||||
monitor=$2
|
||||
current=$3
|
||||
|
||||
|
||||
if [ "$cmd" = "down" ]; then
|
||||
to_change=$(
|
||||
hyprctl workspaces -j | jq --raw-output '
|
||||
[ .[] | select(.monitor == "'$monitor'" and .id > 0) | .id ] |
|
||||
([ .[] | select(. < '$current') ] | max) // max
|
||||
')
|
||||
elif [ "$cmd" = "up" ]; then
|
||||
to_change=$(
|
||||
hyprctl workspaces -j | jq --raw-output '
|
||||
[ .[] | select(.monitor == "'$monitor'" and .id > 0) | .id ] |
|
||||
([ .[] | select(. > '$current') ] | min) // min
|
||||
')
|
||||
fi
|
||||
|
||||
hyprctl dispatch workspace $to_change >/dev/null
|
26
home-manager/jwm/eww/theme_cat_latte.scss
Normal file
26
home-manager/jwm/eww/theme_cat_latte.scss
Normal file
|
@ -0,0 +1,26 @@
|
|||
$cat-rosewater: #dc8a78;
|
||||
$cat-flamingo: #dd7878;
|
||||
$cat-pink: #ea76cb;
|
||||
$cat-mauve: #8839ef;
|
||||
$cat-red: #d20f39;
|
||||
$cat-maroon: #e64553;
|
||||
$cat-peach: #fe640b;
|
||||
$cat-yellow: #df8e1d;
|
||||
$cat-green: #40a02b;
|
||||
$cat-teal: #179299;
|
||||
$cat-sky: #04a5e5;
|
||||
$cat-sapphire: #209fb5;
|
||||
$cat-blue: #1e66f5;
|
||||
$cat-lavender: #7287fd;
|
||||
$cat-text: #4c4f69;
|
||||
$cat-subtext1: #5c5f77;
|
||||
$cat-subtext0: #6c6f85;
|
||||
$cat-overlay2: #7c7f93;
|
||||
$cat-overlay1: #8c8fa1;
|
||||
$cat-overlay0: #9ca0b0;
|
||||
$cat-surface2: #acb0be;
|
||||
$cat-surface1: #bcc0cc;
|
||||
$cat-surface0: #ccd0da;
|
||||
$cat-base: #eff1f5;
|
||||
$cat-mantle: #e6e9ef;
|
||||
$cat-crust: #dce0e8;
|
26
home-manager/jwm/eww/theme_cat_mocha.scss
Normal file
26
home-manager/jwm/eww/theme_cat_mocha.scss
Normal file
|
@ -0,0 +1,26 @@
|
|||
$cat-rosewater: #f5e0dc;
|
||||
$cat-flamingo: #f2cdcd;
|
||||
$cat-pink: #f5c2e7;
|
||||
$cat-mauve: #cba6f7;
|
||||
$cat-red: #f38ba8;
|
||||
$cat-maroon: #eba0ac;
|
||||
$cat-peach: #fab387;
|
||||
$cat-yellow: #f9e2af;
|
||||
$cat-green: #a6e3a1;
|
||||
$cat-teal: #94e2d5;
|
||||
$cat-sky: #89dceb;
|
||||
$cat-sapphire: #74c7ec;
|
||||
$cat-blue: #89b4fa;
|
||||
$cat-lavender: #b4befe;
|
||||
$cat-text: #cdd6f4;
|
||||
$cat-subtext1: #bac2de;
|
||||
$cat-subtext0: #a6adc8;
|
||||
$cat-overlay2: #9399b2;
|
||||
$cat-overlay1: #7f849c;
|
||||
$cat-overlay0: #6c7086;
|
||||
$cat-surface2: #585b70;
|
||||
$cat-surface1: #45475a;
|
||||
$cat-surface0: #313244;
|
||||
$cat-base: #1e1e2e;
|
||||
$cat-mantle: #181825;
|
||||
$cat-crust: #11111b;
|
3
home-manager/jwm/eww/theme_jwm.scss
Normal file
3
home-manager/jwm/eww/theme_jwm.scss
Normal file
|
@ -0,0 +1,3 @@
|
|||
$jwm-accent: $cat-green;
|
||||
$jwm-accent2: $cat-blue;
|
||||
$jwm-accent-contrast: $cat-crust;
|
Loading…
Add table
Add a link
Reference in a new issue