From b50c5bc131e700c048d049047cf7a7c3fbb657f5 Mon Sep 17 00:00:00 2001 From: Lizzy Hunt Date: Mon, 8 May 2023 19:08:29 -0700 Subject: [PATCH] Add sway env vars, waybar spotifyd updates --- .config/sway/config | 11 ++++++----- .config/waybar/config | 14 +++++++++----- .config/waybar/style.css | 2 +- scripts/machine-specific-zsh/yagami.zsh | 4 ++++ 4 files changed, 20 insertions(+), 11 deletions(-) diff --git a/.config/sway/config b/.config/sway/config index 894c9c1..eda4712 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -33,10 +33,10 @@ output HEADLESS-1 { # # Example configuration: # -#exec swayidle -w \ -# timeout 600 'swaylock -f -c 000000' \ -# timeout 900 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \ -# before-sleep 'swaylock -f -c 000000' +exec swayidle -w \ + timeout 600 'swaylock -f -c 000000' \ + timeout 900 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \ + before-sleep 'swaylock -f -c 000000' # This will lock your screen after 300 seconds of inactivity, then turn off # your displays after another 300 seconds, and turn your screens back on when @@ -228,5 +228,6 @@ include /etc/sway/config.d/* include ~/.config/sway/local.d/* # Display target has started -exec systemctl --user import-environment +exec systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP +exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway exec systemctl start --user display.target diff --git a/.config/waybar/config b/.config/waybar/config index 143ccf9..9f90f16 100644 --- a/.config/waybar/config +++ b/.config/waybar/config @@ -56,13 +56,17 @@ "format-alt": "{time} {icon}", "format-icons": ["", "", "", "", ""] }, - "custom/waybar-mpris": { - "return-type": "json", - "exec": "waybar-mpris --position --autofocus --play ▶ --pause ", + "mpris": { + "player-icons": { + "default": "▶" + }, + "status-icons": { + "paused": "" + }, "on-click": "waybar-mpris --send toggle", "on-click-right": "waybar-mpris --send player-next", - "escape": true, "max-length": 45, - "scroll-step": 1 + "format": "{player_icon} {title} | {artist}", + "ignored-players": ["firefox"] }, } diff --git a/.config/waybar/style.css b/.config/waybar/style.css index 1e2efdc..acf604e 100644 --- a/.config/waybar/style.css +++ b/.config/waybar/style.css @@ -23,7 +23,7 @@ window#waybar { /* Modules */ -#clock, #battery, #cpu, #memory, #disk, #temperature, #backlight, #network, #pulseaudio, #custom-media, #custom-launcher, #custom-power, #tray, #mode, #idle_inhibitor , #mpd, #custom-waybar-mpris, #custom-aggietimed { +#clock, #battery, #cpu, #memory, #disk, #temperature, #backlight, #network, #pulseaudio, #custom-media, #custom-launcher, #custom-power, #tray, #mode, #idle_inhibitor , #mpd, #mpris, #custom-aggietimed { padding: 0 10px; margin: 0px 5px; background: #fbf1c7; diff --git a/scripts/machine-specific-zsh/yagami.zsh b/scripts/machine-specific-zsh/yagami.zsh index 9ebf0ce..6bcc7c5 100644 --- a/scripts/machine-specific-zsh/yagami.zsh +++ b/scripts/machine-specific-zsh/yagami.zsh @@ -8,3 +8,7 @@ eval $(thefuck --alias) # ghcup-env [ -f "$HOME/.ghcup/env" ] && source "$HOME/.ghcup/env" + +export XDG_CURRENT_DESKTOP=sway +export XDG_SESSION_DESKTOP=sway +export QT_QPA_PLATFORM=wayland