mirror of
https://github.com/nickolaj-jepsen/nixos.git
synced 2026-01-22 08:06:50 +01:00
feat: more wsl tweaks
This commit is contained in:
parent
50289dcc0d
commit
72a3dc6c5a
10 changed files with 104 additions and 40 deletions
|
|
@ -3,6 +3,8 @@
|
|||
lib,
|
||||
...
|
||||
}: let
|
||||
hasMonitors = config.monitors != [];
|
||||
|
||||
commonBarSettings = {
|
||||
enabled = true;
|
||||
position = 0;
|
||||
|
|
@ -35,11 +37,17 @@
|
|||
maximizeDetection = true;
|
||||
};
|
||||
|
||||
primaryMonitor = builtins.head config.monitors;
|
||||
primaryMonitor =
|
||||
if hasMonitors
|
||||
then builtins.head config.monitors
|
||||
else {};
|
||||
primaryX = primaryMonitor.position.x or 0;
|
||||
|
||||
# Partition secondary monitors into left and right based on their x position relative to primary
|
||||
secondaryMonitors = builtins.tail config.monitors;
|
||||
secondaryMonitors =
|
||||
if hasMonitors
|
||||
then builtins.tail config.monitors
|
||||
else [];
|
||||
leftMonitors = builtins.filter (m: (m.position.x or 0) <= primaryX) secondaryMonitors;
|
||||
rightMonitors = builtins.filter (m: (m.position.x or 0) > primaryX) secondaryMonitors;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue