Table of contents

SwayWM

osswindow_manager

%3 cluster_21d188ba_7245_41a3_9af0_3f5871d1eb39 SwayWM cluster_b10a4ff9_1163_4a1d_acbb_a0123c63a865 [2/2] Troubleshoot cluster_d074b8a4_fca1_41ca_b694_4027d45b6c32 Fix waybar _41eeca5b_aec9_45ed_837a_ce625e98d2f0 Fix load $PATH _e9c3f190_3667_48e0_822a_a3947f88943c Get a SSH-agent _e9c3f190_3667_48e0_822a_a3947f88943c->_41eeca5b_aec9_45ed_837a_ce625e98d2f0 _be591e21_dfb5_4a1e_8488_1f6efe957abc Configure Dunst _ef49cdce_6771_4352_aff2_f83fda845bae Crash when swapped two windows _ef03a0e0_bbb4_4939_b5b6_4ff5e0519521 Most state (and apps) are lost on config reload _3aa7a2b9_cbf7_4b45_bfe7_977b29c9d5c4 Go back to latest workspace _817dfc7d_9010_4fa9_afae_2820d85f7118 Remap keybinds for wayland _23a5fd4b_0b57_4caa_835a_c0129dd9d4b5 Install waybar from source _44e428c4_7eee_4f58_abaa_d460057a2730 Add sind to waybar _c8875372_815d_4015_b8b3_137d3565d236 Dynamically change keyboard layout _c39ee6d6_c8c4_4499_a68f_1ef7c4039232 i3 _c041fcc9_72e6_45d4_9023_e9449bbd3f68 Wayland _66def833_11ec_4513_8458_4747c327d4d8 How to rice your SWMO _66def833_11ec_4513_8458_4747c327d4d8->__0:cluster_21d188ba_7245_41a3_9af0_3f5871d1eb39 _cc50945f_462d_4a95_a4c9_e191e99d92c1 How to configure wayland environments _cc50945f_462d_4a95_a4c9_e191e99d92c1->__1:cluster_21d188ba_7245_41a3_9af0_3f5871d1eb39 cluster_d074b8a4_fca1_41ca_b694_4027d45b6c32 cluster_d074b8a4_fca1_41ca_b694_4027d45b6c32 cluster_d074b8a4_fca1_41ca_b694_4027d45b6c32->_23a5fd4b_0b57_4caa_835a_c0129dd9d4b5 __2:cluster_21d188ba_7245_41a3_9af0_3f5871d1eb39->_c39ee6d6_c8c4_4499_a68f_1ef7c4039232 __3:cluster_21d188ba_7245_41a3_9af0_3f5871d1eb39->_c041fcc9_72e6_45d4_9023_e9449bbd3f68

A sort-of Wayland drop-in replacement for i3.

DONE

Remap keybinds for wayland

input  "type:keyboard"  {
	# or input <identifier>
    xkb_layout us,es
    xkb_options caps:escape
}

DONE

Dynamically change keyboard layout

  • US layout

#!/bin/sh
swaymsg 'input * xkb_layout "us"'
  • Spanish layout

#!/bin/sh
swaymsg 'input * xkb_layout "es"'

DONE

Go back to latest workspace

  • Add keybinding

    bindsym $mod+Escape workspace back_and_forth        

DONE

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

DONE

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)"
exec ssh-agent sway

DONE

Add sind to waybar

#!/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

DONE

Fix waybar

DONE

Install waybar from source

  • apt build-dep waybar

  • meson build

  • ninja -C build

DONE

Configure Dunst

  • Program

    Dunst

[ 2/2 ] Troubleshoot

DONE

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

DONE

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