terribly overengineered monitor -> workspace function
this probably adds around 20 years of eval time
This commit is contained in:
parent
e628f55645
commit
0bbc352e8f
1 changed files with 11 additions and 11 deletions
|
@ -188,17 +188,17 @@ in {
|
||||||
"${name},${w}x${h}@${refresh},${x}x${y},${scale}"
|
"${name},${w}x${h}@${refresh},${x}x${y},${scale}"
|
||||||
) config.poz.other.hardware.monitors;
|
) config.poz.other.hardware.monitors;
|
||||||
|
|
||||||
workspace = (
|
# I'm so sorry
|
||||||
# laptop
|
workspace = (flatten (imap0 (monitor_index: monitor_name: (
|
||||||
map (i:
|
map (i: let
|
||||||
"${i}, monitor:eDP-1${optionalString (i == "1") ", default:true"}"
|
# a % b
|
||||||
) (genList (i: toString (i + 1)) 10)
|
mod = a: b: a - (b * (a / b));
|
||||||
) ++ (
|
workspace = toString i;
|
||||||
# second monitor
|
isDefault = (mod i 10) == 1; # 11, 21, 31, ...
|
||||||
map (i:
|
in
|
||||||
"${i}, monitor:HDMI-A-1${optionalString (i == "11") ", default:true"}"
|
"${workspace}, monitor:${monitor_name}${optionalString isDefault ", default:true"}"
|
||||||
) (genList (i: toString (i + 11)) 10)
|
) (genList (i: i + 1 + (10 * monitor_index)) 10)
|
||||||
) ++ [
|
)) (attrNames config.poz.other.hardware.monitors))) ++ [
|
||||||
# scratchpads
|
# scratchpads
|
||||||
"special:btop, decorate:false"
|
"special:btop, decorate:false"
|
||||||
(mkIf isAmdGpuPresent "special:amdgpu_top, decorate:false")
|
(mkIf isAmdGpuPresent "special:amdgpu_top, decorate:false")
|
||||||
|
|
Loading…
Reference in a new issue