From e04c89b57a9014fce79eda2a4891189a68c3b19a Mon Sep 17 00:00:00 2001 From: Bertrand Benjamin Date: Sun, 6 Feb 2022 15:43:56 +0100 Subject: [PATCH] Feat: decoration, all workspace on waybar and kanshi as service --- sway/.config/sway/config | 16 +++++++-------- sway/.config/sway/config.d/misc_autostart | 4 +++- sway/.config/systemd/user/kanshi.service | 11 ++++++++++ sway/.config/systemd/user/sway-session.target | 6 ++++++ .../sway-session.target.wants/kanshi.service | 1 + sway/.config/waybar/config | 20 +++++++++---------- sway/.config/waybar/style.css | 2 +- 7 files changed, 39 insertions(+), 21 deletions(-) create mode 100644 sway/.config/systemd/user/kanshi.service create mode 100644 sway/.config/systemd/user/sway-session.target create mode 120000 sway/.config/systemd/user/sway-session.target.wants/kanshi.service diff --git a/sway/.config/sway/config b/sway/.config/sway/config index 7090c55..3a8671d 100644 --- a/sway/.config/sway/config +++ b/sway/.config/sway/config @@ -128,9 +128,9 @@ bindsym $mod+Shift+Right move right # # Workspaces: # -set $ws1 1:  +set $ws1 1:  set $ws2 2:  -set $ws3 3:  +set $ws3 3:  set $ws4 4:  set $ws5 5:  set $ws6 6:  @@ -155,6 +155,10 @@ bindsym $mod+6 move container to workspace $ws6 bindsym $mod+7 move container to workspace $ws7 bindsym $mod+8 move container to workspace 8 bindsym $mod+9 move container to workspace 9 + + +bindsym $mod+Ctrl+greater move workspace to output right +bindsym $mod+Ctrl+less move workspace to output left # # Layout stuff: # @@ -196,10 +200,6 @@ bindsym $mod+9 move container to workspace 9 # Resizing containers: # mode "resize" { - # left will shrink the containers width - # right will grow the containers width - # up will shrink the containers height - # down will grow the containers height bindsym $left resize shrink width 10px bindsym $down resize grow height 10px bindsym $up resize shrink height 10px @@ -245,8 +245,8 @@ client.focused #d65d0e #be5046 #ffffff #be5046 #be5046 # # Read `man 5 sway-bar` for more information about this section. bar { - position top - output $laptopScreen + # position top + # output $laptopScreen swaybar_command waybar } diff --git a/sway/.config/sway/config.d/misc_autostart b/sway/.config/sway/config.d/misc_autostart index b33a802..4081a1b 100644 --- a/sway/.config/sway/config.d/misc_autostart +++ b/sway/.config/sway/config.d/misc_autostart @@ -9,7 +9,9 @@ exec_always /usr/libexec/goa-daemon --replace exec gammastep-indicator exec mako exec "avizo-service" -exec_always pkill kanshi; exec_always kanshi + +#exec_always pkill kanshi; exec_always kanshi +exec_always "systemctl --user import-environment; systemctl --user start sway-session.target" exec swaymsg "workspace $ws1; exec firefox;" exec swaymsg "workspace $ws2; exec thunderbird;" diff --git a/sway/.config/systemd/user/kanshi.service b/sway/.config/systemd/user/kanshi.service new file mode 100644 index 0000000..8054271 --- /dev/null +++ b/sway/.config/systemd/user/kanshi.service @@ -0,0 +1,11 @@ +[Unit] +Description=Dynamic output configuration for Wayland compositors +Documentation=https://sr.ht/~emersion/kanshi +BindsTo=sway-session.target + +[Service] +Type=simple +ExecStart=/usr/bin/kanshi + +[Install] +WantedBy=sway-session.target diff --git a/sway/.config/systemd/user/sway-session.target b/sway/.config/systemd/user/sway-session.target new file mode 100644 index 0000000..a6dadf9 --- /dev/null +++ b/sway/.config/systemd/user/sway-session.target @@ -0,0 +1,6 @@ +[Unit] +Description=Sway compositor session +Documentation=man:systemd.special +BindsTo=graphical-session.target +Wants=graphical-session-pre.target +After=graphical-session-pre.target diff --git a/sway/.config/systemd/user/sway-session.target.wants/kanshi.service b/sway/.config/systemd/user/sway-session.target.wants/kanshi.service new file mode 120000 index 0000000..ca0a406 --- /dev/null +++ b/sway/.config/systemd/user/sway-session.target.wants/kanshi.service @@ -0,0 +1 @@ +/home/lafrite/.config/systemd/user/kanshi.service \ No newline at end of file diff --git a/sway/.config/waybar/config b/sway/.config/waybar/config index e2a2690..a0085bf 100644 --- a/sway/.config/waybar/config +++ b/sway/.config/waybar/config @@ -1,6 +1,7 @@ { "layer": "top", "output": "eDP-1", + "height": 30, "modules-left": ["sway/workspaces", "sway/mode"], "modules-center": ["sway/window"], "modules-right": ["pulseaudio", "battery", "tray", "clock"], @@ -8,7 +9,7 @@ "max-length": 50 }, "sway/workspaces": { - + "all-outputs": true }, "battery": { "states": { @@ -25,15 +26,8 @@ "format-icons": ["", "", "", "", ""] }, "clock": { - "format": "{:%a, %d. %b %H:%M}" - }, - "network": { - "format-wifi": "{essid} ({signalStrength}%) ", - "format-ethernet": "{ipaddr}/{cidr} ", - "tooltip-format": "{ifname} via {gwaddr} ", - "format-linked": "{ifname} (No IP) ", - "format-disconnected": "Disconnected ⚠", - "format-alt": "{ifname}: {ipaddr}/{cidr}" + "format": "{:%a, %d. %b %H:%M}", + "on-click": "gnome-calendar" }, "pulseaudio": { // "scroll-step": 1, // %, can be a float @@ -54,4 +48,8 @@ }, "on-click": "pavucontrol" }, -} + "tray": { + "icon-size": 21, + "spacing": 10, + } +}, diff --git a/sway/.config/waybar/style.css b/sway/.config/waybar/style.css index fe91a98..6b9c6b0 100644 --- a/sway/.config/waybar/style.css +++ b/sway/.config/waybar/style.css @@ -2,7 +2,7 @@ border: none; border-radius: 0; font-family: Droid Nerd Font Mono; - font-size: 13px; + font-size: 14px; min-height: 0; }