Compare commits

...

3 commits

Author SHA1 Message Date
cc72d61a8e
Chezmoi templating 2023-07-14 04:56:11 -04:00
9efd5a3f8a
Overhaul for hidpi laptop 2023-07-14 01:07:01 -04:00
1e345bd8ea
Add 'lock' and 'before-sleep' options 2023-07-14 01:04:28 -04:00
3 changed files with 227 additions and 102 deletions

View file

@ -1,102 +0,0 @@
hack: &hack Hack:pixelsize=10
awesome: &awesome Font Awesome 6 Free:style=solid:pixelsize=12
.everforest:
0: &foreground d8caacff
1: &background 323d43ff
2: &black 4a555bff
3: &dark_grey 525c62ff
4: &dark_red e26c6eff
5: &red e68183ff
6: &dark_green 9bb86fff
7: &green a7c080ff
8: &dark_yellow d5b26bff
9: &yellow dbbc7fff
10: &dark_blue 6eb2a9ff
11: &blue 7fbbb3ff
12: &dark_magenta cf87a9ff
13: &magenta d699b6ff
14: &dark_cyan 72b783ff
15: &cyan 83c092ff
16: &light_grey d0bf9bff
17: &white d8caacff
bar:
monitor: DP-2
height: 26
location: bottom
layer: top
spacing: 2
margin: 2
font: Hack:pixelsize=10
foreground: *foreground
background: *background
border:
width: 1
color: *dark_cyan
margin: 2
left:
- river:
anchors:
- base: &river_base
margin: 10
text: "{id}"
on-click: sh -c 'riverctl set-focused-tags $((1 << ({id} - 1)))'
content:
map:
on-click: sh -c 'riverctl set-focused-tags $((1 << ({id} - 1)))'
conditions:
urgent:
string:
<<: *river_base
deco: {background: {color: *dark_red}}
focused:
string:
<<: *river_base
deco: {background: {color: *dark_cyan}}
~focused && occupied:
string:
<<: *river_base
deco: {background: {color: *light_grey}}
visible && occupied:
string:
<<: *river_base
deco: {background: {color: *dark_green}}
visible && ~occupied:
string:
<<: *river_base
deco: {background: {color: *dark_blue}}
~visible && occupied:
string:
<<: *river_base
deco: {background: {color: *dark_grey}}
~visible && ~occupied: {empty: {}}
~focused:
string:
<<: *river_base
right:
- network:
name: wlan0
poll-interval: 1000
content:
map:
default: {string: {text: , font: *awesome, foreground: *black}}
conditions:
state == down: {string: {text: , font: *awesome, foreground: *red}}
state == up:
map:
default:
- string: {text: , font: *awesome}
- string: {text: "{ssid} {dl-speed:mb}/{ul-speed:mb} Mb/s"}
conditions:
ipv4 == "":
- string: {text: , font: *awesome, foreground: *black}
- string: {text: "{ssid} {dl-speed:mb}/{ul-speed:mb} Mb/s", foreground: *black}
- clock:
content:
- string: {text: , font: *awesome}
- string: {text: "{date}", right-margin: 5}
- string: {text: , font: *awesome}
- string: {text: "{time}"}

View file

@ -0,0 +1,223 @@
.everforest:
0: &foreground d8caacff
1: &background 323d43cc
2: &black 4a555bff
3: &dark_grey 525c62ff
4: &dark_red e26c6eff
5: &red e68183ff
6: &dark_green 9bb86fff
7: &green a7c080ff
8: &dark_yellow d5b26bff
9: &yellow dbbc7fff
10: &dark_blue 6eb2a9ff
11: &blue 7fbbb3ff
12: &dark_magenta cf87a9ff
13: &magenta d699b6ff
14: &dark_cyan 72b783ff
15: &cyan 83c092ff
16: &light_grey d0bf9bff
17: &white d8caacff
{{- if eq .chezmoi.hostname "helix" }}
hack: &hack Hack:pixelsize=28
awesome: &awesome Font Awesome 6 Free:style=solid:pixelsize=26
{{- else}}
hack: &hack Hack:pixelsize=13
awesome: &awesome Font Awesome 6 Free:style=solid:pixelsize=12
{{- end }}
separator: &separator {string: {text: " | ", font: *hack, foreground: *light_grey}}
light_underline: &light_underline d0bf9b99
dark_underline: &dark_underline 4a555b99
bar:
{{- if eq .chezmoi.hostname "helix" }}
height: 72
location: top
{{- else if eq .chezmoi.hostname "hydrus" }}
monitor: DP-1
height: 28
location: bottom
{{- else }}
height: 36
location: top
{{- end }}
layer: top
spacing: 2
margin: 2
font: *hack
foreground: *foreground
background: *background
border:
{{- if eq .chezmoi.hostname "hydrus" }}
top-width: 0
bottom-width: 2
{{- else }}
top-width: 4
bottom-width: 0
{{- end }}
left-width: 0
right-width: 0
color: *light_underline
margin: 0
left:
- river:
anchors:
- base: &river_base
{{- if eq .chezmoi.hostname "helix" }}
left-margin: 56
right-margin: 56
{{- else }}
left-margin: 22
right-margin: 22
{{- end }}
text: "{id}"
content:
map:
on-click:
left: sh -c "riverctl set-focused-tags $((1 << ({id} - 1)))"
middle: sh -c "riverctl toggle-view-tags $((1 << ({id} -1)))"
right: sh -c "riverctl toggle-focused-tags $((1 << ({id} -1)))"
conditions:
urgent:
string:
<<: *river_base
deco: {stack: [{background: {color: *dark_red}}, {underline: {size: 4, color: *black}}]}
foreground: *black
focused:
string:
<<: *river_base
deco: {stack: [{background: {color: *light_grey}}, {underline: {size: 4, color: *dark_underline}}]}
foreground: *dark_grey
visible && occupied:
string:
<<: *river_base
deco: {stack: [{background: {color: *light_underline}}, {underline: {size: 4, color: *dark_underline}}]}
foreground: *light_grey
visible && ~occupied:
string:
<<: *river_base
deco: {stack: [{background: {color: *light_underline}}, {underline: {size: 4, color: *dark_underline}}]}
foreground: *light_grey
~visible && occupied:
string:
<<: *river_base
deco: {stack: [{background: {color: *dark_grey}}, {underline: {size: 4, color: *light_underline}}]}
foreground: *light_grey
~focused && occupied:
string:
<<: *river_base
deco: {stack: [{background: {color: *dark_grey}}, {underline: {size: 4, color: *light_underline}}]}
foreground: *light_grey
id < 10 && ~visible && ~occupied:
string:
<<: *river_base
foreground: *light_grey
id >= 10 && ~visible && ~occupied: {empty: {}}
center:
- foreign-toplevel:
content:
map:
conditions:
activated:
- string: {text: "{app-id}: {title}"}
~activated: {empty: {}}
right:
- pulse:
content:
map:
on-click:
left: sh -c "pactl set-sink-mute @DEFAULT_SINK@ toggle"
wheel-up: sh -c "pactl set-sink-volume @DEFAULT_SINK@ +5%"
wheel-down: sh -c "pactl set-sink-volume @DEFAULT_SINK@ -5%"
conditions:
sink_muted:
- string: {text: , font: *awesome, foreground: *light_underline}
- string: {text: " {sink_percent}% ({sink_port})", foreground: *light_underline}
~sink_muted:
- ramp:
tag: sink_percent
items:
- string: {text: , font: *awesome}
- string: {text: , font: *awesome}
- string: {text: , font: *awesome}
- string: {text: " {sink_percent}% ({sink_port})"}
{{- if ne .chezmoi.hostname "hydrus" }}
- label:
content: *separator
- backlight:
name: amdgpu_bl0
content:
- ramp:
tag: percent
items:
- string: {text: , font: *awesome}
- string: {text: , font: *awesome}
- string: {text: " {percent}%"}
- label:
content: *separator
- network:
name: wlan0
poll-interval: 1000
content:
map:
default: {string: {text: , font: *awesome}}
conditions:
state == down: {string: {text: , font: *awesome, foreground: *dark_grey}}
state == up:
map:
default:
- string: {text: , font: *awesome}
- string: {text: " {name}: {state}"}
#- string: {text: " {ssid} {dl-speed:mb}/{ul-speed:mb} Mb/s", foreground: *light_grey}
conditions:
ipv4 == "":
- string: {text: , font: *awesome}
- string: {text: " {name}: {state}"}
#- string: {text: " {ssid} {dl-speed:mb}/{ul-speed:mb} Mb/s", foreground: *light_grey}
- label:
content: *separator
- battery:
name: BAT0
poll-interval: 10
anchors:
discharging: &discharging
list:
items:
- ramp:
tag: capacity
items:
- string: {text: , foreground: *dark_red, font: *awesome}
- string: {text: , foreground: *dark_yellow, font: *awesome}
- string: {text: , font: *awesome}
- string: {text: , font: *awesome}
- string: {text: , font: *awesome}
- string: {text: " {capacity}% {estimate}"}
content:
map:
conditions:
state == unknown:
<<: *discharging
state == discharging:
<<: *discharging
state == charging:
- string: {text: , font: *awesome}
- string: {text: " {capacity}% {estimate}"}
state == full:
- string: {text: , foreground: *dark_green, font: *awesome}
- string: {text: " {capacity}% full", foreground: *dark_green}
state == "not charging":
- string: {text:  , font: *awesome}
- string: {text: " {capacity}%"}
{{- end }}
- label:
content: *separator
- clock:
date-format: "%Y-%m-%d"
time-format: "%R"
content:
- string: {text: , font: *awesome}
- string: {text: " {date} | "}
- string: {text: , font: *awesome}
- string: {text: " {time} "}

View file

@ -19,6 +19,8 @@ swayidle -w \
resume 'wlr-randr --output eDP-1 --on && kanshictl reload' \
timeout 3600 'loginctl suspend-then-hibernate' \
resume 'wlr-randr --output eDP-1 --on && kanshictl reload' \
lock 'waylock-launcher' \
before-sleep 'waylock-launcher' \
2>&1 | tee -a "$LOG_FILE" & disown
{{- else if eq .chezmoi.hostname "hydrus" }}
# lock: 5m, display: 15m
@ -26,6 +28,8 @@ swayidle -w \
timeout 300 'waylock-launcher' \
timeout 900 'wlr-randr --output DP-1 --off --output DP-2 --off' \
resume 'wlr-randr --output DP-1 --on --output DP-2 --on && sleep 2 && kanshictl reload' \
lock 'waylock-launcher' \
before-sleep 'waylock-launcher' \
2>&1 | tee -a "$LOG_FILE" & disown
{{- else }}
# lock after 5m