Compare commits

..

No commits in common. "bdf243ed75af75ba835c0bebaceb55a8fe3b0ea5" and "bc6d1a94a5ba6296f4765b1ded28536b56946554" have entirely different histories.

6 changed files with 18 additions and 22 deletions

View file

@ -50,8 +50,6 @@
is-floating = true; is-floating = true;
}]; }];
shadow = { shadow = {
offset.y = 0;
offset.x = 0;
softness = 40; softness = 40;
color = "#bab9e5af"; color = "#bab9e5af";
inactive-color = "#fa9d99af"; inactive-color = "#fa9d99af";

View file

@ -3,8 +3,8 @@
:class "workspaces" :class "workspaces"
(for workspace in workspaces (for workspace in workspaces
(button (button
:style "border-bottom: 4px solid ${workspace.color}${workspace.active ? "; background-color: #3c3836" : ""}" :style "border-bottom: 4px solid ${workspace.color}"
:class "${workspace.focused ? "focused" : ""}" :class "${workspace.active ? "focused" : 0}"
:onclick "swaymsg workspace ${workspace.name}" :onclick "swaymsg workspace ${workspace.name}"
(label :text "${workspace.idx}") (label :text "${workspace.idx}")
) )

View file

@ -10,6 +10,10 @@ label {
border: 0px; border: 0px;
} }
.workspaces button.urgent {
background-color: #cc241d;
}
.workspaces button.focused { .workspaces button.focused {
background-color: #504935; background-color: #504935;
} }

View file

@ -36,5 +36,4 @@ alias gunim = cd ~/Docs/uni/mathe1-3;
# typos # typos
alias juts = just; alias juts = just;
alias miau = meow;
alias shut = shutdown now; alias shut = shutdown now;

View file

@ -75,6 +75,8 @@ def meow [ n = 1 ] {
"m{rr,r,}{e,ee,{,e,aa}o}w{,w,ww}" | str expand | shuffle | first $n | str join ' ' "m{rr,r,}{e,ee,{,e,aa}o}w{,w,ww}" | str expand | shuffle | first $n | str join ' '
} }
alias miau = meow;
def bars [display_name?: string] { def bars [display_name?: string] {
print $display_name; print $display_name;
pkill eww pkill eww
@ -90,6 +92,7 @@ def bars [display_name?: string] {
def "dp ccchh" [] { def "dp ccchh" [] {
layaway "hdmi2 + edp/bottom,center" layaway "hdmi2 + edp/bottom,center"
pkill eww
bars "25BL56WY" bars "25BL56WY"
} }
@ -97,5 +100,6 @@ def "dp gay" [] {
layaway "dp3 + edp1/bottom,center + dp5/right,top" layaway "dp3 + edp1/bottom,center + dp5/right,top"
# manual fix for lack of frequency in layaway, else monitor just turns off # manual fix for lack of frequency in layaway, else monitor just turns off
swaymsg "output DP-3 position 0 0 scale 1 transform normal resolution 1920x1080@60Hz" swaymsg "output DP-3 position 0 0 scale 1 transform normal resolution 1920x1080@60Hz"
pkill eww
bars "LEN G27c-10" bars "LEN G27c-10"
} }

View file

@ -46,7 +46,6 @@ fn main() -> Result<(), std::io::Error> {
.values() .values()
.map(|it| it.clone()) .map(|it| it.clone())
.collect::<Vec<Workspace>>(); .collect::<Vec<Workspace>>();
workspaces.sort_by(|a, b| a.idx.cmp(&b.idx)); workspaces.sort_by(|a, b| a.idx.cmp(&b.idx));
workspaces.sort_by(|a, b| { workspaces.sort_by(|a, b| {
a.output a.output
@ -72,21 +71,13 @@ fn main() -> Result<(), std::io::Error> {
let results = workspaces let results = workspaces
.iter() .iter()
.map( .map(|ws| WsData {
|Workspace { color: output_colors_lut[&ws.output.clone().expect("unreachable")]
idx, [if ws.is_active { 1 } else { 0 }],
output, idx: ws.idx,
is_active, focused: ws.is_focused,
is_focused, active: ws.is_active,
.. })
}| WsData {
color: output_colors_lut[&output.clone().expect("unreachable")]
[if *is_active { 1 } else { 0 }],
idx: *idx,
focused: *is_focused,
active: *is_active,
},
)
.collect::<Vec<_>>(); .collect::<Vec<_>>();
println!("{}", serde_json::to_string(&results).unwrap()); println!("{}", serde_json::to_string(&results).unwrap());