This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

sway: run waybar as a user service

+20 -9
+20 -9
2configs/desktops/sway/default.nix
··· 1 - { pkgs, ... }: 1 + { pkgs, lib, ... }: 2 2 let 3 3 4 4 term = "/run/current-system/sw/bin/alacritty"; ··· 121 121 programs.sway = { 122 122 enable = true; 123 123 wrapperFeatures.gtk = true; 124 + extraSessionCommands = '' 125 + export SWAYSOCK=/run/user/$(id -u)/sway-ipc.sock 126 + ''; 127 + }; 128 + 129 + systemd.user.services.waybar = { 130 + description = "Highly customizable Wayland bar for Sway"; 131 + documentation = [ "man:waybar(5)" ]; 132 + partOf = [ "sway-session.target" ]; 133 + wantedBy = [ "sway-session.target" ]; 134 + serviceConfig = { 135 + Type = "simple"; 136 + ExecStart = "${pkgs.waybar}/bin/waybar -c ${waybarConfig} -s ${waybarStyle}"; 137 + Restart = "on-failure"; 138 + RestartSec = 1; 139 + }; 124 140 }; 125 141 126 142 environment.etc."sway/config".text = '' ··· 281 297 } 282 298 bindsym $mod+r mode "resize" 283 299 284 - # 285 - # Status Bar: 286 - # 287 - exec_always pkill waybar; exec ${pkgs.waybar}/bin/waybar -c ${waybarConfig} -s ${waybarStyle} 288 - 289 300 default_border pixel 1 290 301 default_floating_border none 291 302 smart_borders on ··· 338 349 # theme and env specific stuff 339 350 exec_always ${pkgs.writers.writeDash "dbus-sway-environment" '' 340 351 set -efux 341 - dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway 342 - systemctl --user import-environment DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP 343 - systemctl --user start --no-block sway-session.target 352 + dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP=sway 353 + systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP 354 + systemctl --user restart --no-block sway-session.target 344 355 systemctl --user stop xdg-desktop-portal xdg-desktop-portal-wlr 345 356 systemctl --user start xdg-desktop-portal xdg-desktop-portal-wlr 346 357 ''}