SwayWM
osswindow_managerUrl
Comparable with
AwesomeWM
On ArchLinux wiki
Remap keybinds for wayland
See
Add to .config/sway/config
input "type:keyboard" {
# or input <identifier>
xkb_layout us,es
xkb_options caps:escape
}
Dynamically change keyboard layout
US layout
#!/bin/sh
swaymsg 'input * xkb_layout "us"'
Spanish layout
#!/bin/sh
swaymsg 'input * xkb_layout "es"'
Fix load $PATH
User $PATH might fail to load after some time ¯\_(ツ)_/¯
Quick & dirty fix
Add wrapper file
#!/bin/sh
export PATH="$PATH:$HOME/.local/bin:$HOME/.cargo/bin"
exec sway
Mark as executable
sudo chmod +x usrbin/ssway
Find sway desktop file
/usr/share/wayland-sessions/sway.desktop
Update command
Exec=ssway
Get a SSH-agent
If it's enough to have it on shell, add this to ~/.bashrc:
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
Add invoke sway
in the ssway
from Fix load $PATH as:
exec ssh-agent sway
Add sind to waybar
Colorization can be done in HTML-like
Result
#!/bin/bash
set -eu
FILE=/tmp/indicators.json
PROCESS() {
DATA=$(cat "$FILE" || true)
if [ -z "$DATA" ];then
continue
fi
text=""
for key in $(echo "$DATA" | jq 'keys' |grep '^ "'|cut -d\" -f2);do
value=$(echo "$DATA"| jq -r ".$key")
text="$text<span background='$value'> $key </span>"
done
result="{\"text\": \"$text\", \"class\":\"\", \"tooltip\":\"\"}"
echo "$result"
}
PROCESS
inotifywait -m -e modify "$FILE" | while read ;do
PROCESS
done
Fix waybar
Install waybar from source
apt build-dep waybar
meson build
ninja -C build
Configure Dunst
Program
Dunst
[ 2/2 ] Troubleshoot
Most state (and apps) are lost on config reload
Crash around
Mar 07 21:56:05 yamv /usr/libexec/gdm-wayland-session[4668]: 02:31:34.661 [ERROR] [wlr] [render/swapchain.c:97] No free output buffer slot
Mar 07 21:56:05 yamv /usr/libexec/gdm-wayland-session[4668]: 02:31:34.661 [ERROR] [wlr] [types/wlr_output.c:1342] Failed to render cursor buffer
Mar 07 21:56:06 yamv /usr/libexec/gdm-wayland-session[4668]: 02:31:34.961 [ERROR] [wlr] [render/swapchain.c:97] No free output buffer slot
Mar 07 21:56:06 yamv /usr/libexec/gdm-wayland-session[4668]: 02:31:34.961 [ERROR] [wlr] [types/wlr_output.c:1342] Failed to render cursor buffer
Mar 07 21:56:13 yamv /usr/libexec/gdm-wayland-session[4668]: 02:31:42.919 [ERROR] [wlr] [render/swapchain.c:97] No free output buffer slot
Mar 07 21:56:13 yamv /usr/libexec/gdm-wayland-session[4668]: 02:31:42.919 [ERROR] [wlr] [types/wlr_output.c:1342] Failed to render cursor buffer
Mar 07 21:56:14 yamv /usr/libexec/gdm-wayland-session[4668]: 02:31:43.264 [ERROR] [wlr] [render/swapchain.c:97] No free output buffer slot
Mar 07 21:56:14 yamv /usr/libexec/gdm-wayland-session[4668]: 02:31:43.265 [ERROR] [wlr] [types/wlr_output.c:1342] Failed to render cursor buffer
Mar 07 21:56:14 yamv /usr/libexec/gdm-wayland-session[9279]: [2022-03-07 21:56:14.360] [warning] Requested height: 17 is less than the minimum height: 24 required by the>
Mar 07 21:56:14 yamv /usr/libexec/gdm-wayland-session[9279]: [2022-03-07 21:56:14.360] [info] Bar configured (width: 1366, height: 24) for output: LVDS-1
Mar 07 21:56:14 yamv org.kde.kdeconnect[4927]: kdeconnect.plugin.contacts: handleResponseVCards: Unable to open "/home/kenkeiras/.local/share/kpeoplevcard/kdeconnect-365>
Mar 07 21:56:36 yamv /usr/libexec/gdm-wayland-session[4668]: 02:32:05.452 [ERROR] [wlr] [render/swapchain.c:97] No free output buffer slot
Mar 07 21:56:36 yamv /usr/libexec/gdm-wayland-session[4668]: 02:32:05.452 [ERROR] [wlr] [types/wlr_output.c:1342] Failed to render cursor buffer
Mar 07 21:56:36 yamv /usr/libexec/gdm-wayland-session[4668]: 02:32:05.452 [ERROR] [sway/config/output.c:685] socketpair failed: Too many open files
Mar 07 21:56:36 yamv /usr/libexec/gdm-wayland-session[12778]: The XKEYBOARD keymap compiler (xkbcomp) reports:
Mar 07 21:56:36 yamv /usr/libexec/gdm-wayland-session[12778]: > Warning: Unsupported maximum keycode 708, clipping.
Mar 07 21:56:36 yamv /usr/libexec/gdm-wayland-session[12778]: > X11 cannot support keycodes above 255.
Mar 07 21:56:36 yamv /usr/libexec/gdm-wayland-session[12778]: Errors from xkbcomp are not fatal to the X server
Mar 07 21:56:36 yamv /usr/libexec/gdm-wayland-session[12780]: The XKEYBOARD keymap compiler (xkbcomp) reports:
Mar 07 21:56:36 yamv /usr/libexec/gdm-wayland-session[12780]: > Warning: Unsupported maximum keycode 708, clipping.
Suspect of
Mar 07 21:56:36 yamv /usr/libexec/gdm-wayland-session[4668]: 02:32:05.452 [ERROR] [sway/config/output.c:685] socketpair failed: Too many open files
Can happen with one display or with two
Same sympthons as
[ 2022-03-08 Mar 23:45 ] trying to upgrade sway to 1.7
Compiled and installed (not yet started)
[ 2022-03-11 Ven 15:43 ]
running 1.7
[ 2022-03-15 Mar 10:44 ]
still working (after running 1.7 from git)
Crash when swapped two windows
Just happened once, maybe related to time jump?
[ +0,008629] wlp3s0: Limiting TX power to 23 (23 - 0) dBm as advertised by 00:11:32:b3:7e:36
[ +6,574702] systemd-journald[386]: Time jumped backwards, rotating.
[Mar28 12:16] show_signal_msg: 13 callbacks suppressed
[ +0,000009] sway[5219]: segfault at 10 ip 000055aca0612466 sp 00007ffff456c590 error 4 in sway[55aca05e7000+6a000]
[ +0,000029] Code: 50 10 48 8b 45 d8 48 83 c0 18 48 39 c2 0f 85 75 ff ff ff b8 00 00 00 00 c9 c3 55 48 89 e5 48 83 ec 20 48 89 7d e8 48 8b 45 e8 <0f> b6 40 10 83 f0 01 84 c0 74 07 b8 00 00 00 00 eb 56 48 8b 45 e8
[ +0,543557] wlp3s0: deauthenticating from 00:11:32:b3:7e:36 by local choice (Reason: 3=DEAUTH_LEAVING)
[ +0,143370] iwlwifi 0000:03:00.0: Radio type=0x1-0x2-0x0
[ +0,204234] code[6224]: segfault at 0 ip 00007f5f6324bff9 sp 00007ffc53891240 error 4 in watcher.node[7f5f63238000+4a000]
[ +0,000014] Code: f6 eb 23 4c 89 f0 4c 09 e0 48 c1 e8 20 74 0d 4c 89 f0 31 d2 49 f7 f4 48 89 d6 eb 0a 44 89 f0 31 d2 41 f7 f4 89 d6 49 8b 45 00 <48> 8b 04 f0 48 85 c0 0f 84 99 01 00 00 44 0f b6 2b 41 f6 c5 01 74
[ +0,092745] iwlwifi 0000:03:00.0: Radio type=0x1-0x2-0x0
[ +2,221821] rfkill: input handler disabled
[ +4,311703] iwlwifi 0000:03:00.0: Radio type=0x1-0x2-0x0
[ +0,288152] rfkill: input handler enabled
Not repeated as of [ 2022-04-05 Mar 23:51 ]
[ 2023-05-21 dom 23:05 ] no more errors