aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaroline Larimore <caroline@larimo.re>2024-05-11 22:10:32 -0700
committerCaroline Larimore <caroline@larimo.re>2024-05-11 22:10:32 -0700
commit682db9b32f274424c7364880c6d1be625849b259 (patch)
tree179643b5bb3cc0dd86bc21f542edd6e0f59822ce
parent93820527f7dc89e3a3f2e2171d440d2059638944 (diff)
Add addition position to EWW music widget
-rw-r--r--home.nix2
-rw-r--r--modules/home/eww.nix6
-rw-r--r--modules/home/i3.nix3
3 files changed, 6 insertions, 5 deletions
diff --git a/home.nix b/home.nix
index 9effecd..f1f0721 100644
--- a/home.nix
+++ b/home.nix
@@ -95,7 +95,7 @@
if ${pkgs.eww}/bin/eww active-windows | grep $1; then
${pkgs.eww}/bin/eww close $1
else
- ${pkgs.eww}/bin/eww open $1
+ ${pkgs.eww}/bin/eww open $@
fi
'')
diff --git a/modules/home/eww.nix b/modules/home/eww.nix
index 3be22ea..850fc9b 100644
--- a/modules/home/eww.nix
+++ b/modules/home/eww.nix
@@ -95,13 +95,13 @@
'';
xdg.configFile."eww/eww.yuck".text = ''
- (defwindow music
+ (defwindow music [pos]
:monitor 0
:geometry (geometry
- :x "0px"
+ :x { pos == "right" ? "2px" : "0px" }
:y "0px"
:height {128 + 16}
- :anchor "bottom center"
+ :anchor { pos == "right" ? "bottom right" : "bottom center" }
)
:stacking "fg"
:windowtype "dock"
diff --git a/modules/home/i3.nix b/modules/home/i3.nix
index 27556ae..927a813 100644
--- a/modules/home/i3.nix
+++ b/modules/home/i3.nix
@@ -128,7 +128,8 @@
"XF86AudioPrev" = "exec playerctl previous";
# Media controller widget
- "${mod}+m" = "exec --no-startup-id eww-toggle music";
+ "${mod}+m" = "exec --no-startup-id eww-toggle music --arg pos=center";
+ "${mod}+n" = "exec --no-startup-id eww-toggle music --arg pos=right";
# Workspaces
"${mod}+grave" = "workspace number ${ws0}";