HOME | DD

mitoXD — A Sway Temptation

#ricing #tilingwm #swaywm #archlinux #customization #linuxdesktop #screenshot
Published: 2020-09-25 15:21:43 +0000 UTC; Views: 3233; Favourites: 24; Downloads: 0
Redirect to original
Description Contents
  • Specs
  • What’s this all about …
    2.1  Master Tiling
    2.2  Likes and Struggles
  • Links and References




  • 1.  Specs
    • OS: Arch Linux
    • kernel: 5.8.10-ARCH, 32 Bit (pentium4, single core)
    • window manager: SwayWM v. 1:1.4-9
    • compositing protocol: wayland
    • screen resolution: 1024 × 768 px
    • running apps: swaybar, fish running in xfce4-terminal, neofetch listing additional styles, pywal custom terminal coloring tool, Thunar file manager, gotop, electricsheep, vlc media player, and others; screenshot taken with grim -c

           [ ^ ]     [ Contents ]
                   
    2.  What’s this all about …
    Due to the persisting mentioned desktop troubles related to X/libinput and I still want tiling, I am going to permanently switch to wayland and SwayWM (or sway in short) including xwayland on that machine.  So let's see how well this brand new GUI runs on my twenty year old ThinkPad veteran.

    And as I always just can't get productive on a desktop which hasn't been tweaked to my likings, this might become a journey in several stages.  For this I have to dig deeper not only into this kind of compositor/window manager matters, but also the i3-universe, to which I am also (almost) a newbie.  So far I've been learning a great deal from sway's wiki as well as others' configs. But since I have been heavily testing stuff yet my config file is pretty chaotic and currently not being worth being posted for now.

    This initial shot then shows sway almost in its default settings, after copying /etc/sway/config to ~/.config/sway/config.  So is the swaybar at the top, which includes a system tray currently inhabited by vlc.  Then I added nice gaps (a standard option taken from i3-gaps), and edited bar and border colors to match the skin, and also assigned a couple of apps to certain workspaces.  Further besides of defining some hotkeys, without Windows keys on my box I had to re-map the modifier key $mod to .

           [ ^ ]     [ Contents ]


    2.1  Master TilingTiling window managers are for users, who prefer a workflow based on key combinations rather than (extended) mouse usage, and also don't like their screen wasted either by clutter and obtrusive gadgets.  In sway, horizontal and vertical tiling is done by toggling <$mod+e>, switching to tabbed by <$mod+w>, or toggling fullscreen by <$mod+f>, respectively.  Further you can also have your windows arranged in a stack as well as in nested split sub-layouts (see below), or make things floating.


    To achieve an arrangement with four windows as depicted (for the absence of the X.org server, can we still speak of “window clients” btw.?), it would take about the following key strokes and actions:


  • On an empty workspace, hit <$mod+Return> to open terminal #1, and enter “neofetch”.
  • Start thunar by hotkey or app launcher.
  • Make both windows tile horizontally (if they already aren't) by toggling with <$mod+e>.
  • Make thunar the “parent container” by focusing it; hit <$mod+v> to prepare vertical splitting.
  • Hit <$mod+Return> again to open terminal #2; it appears below thunar, but in half height.
  • Toggle the tiling with <$mod+e>, the terminal moves to the right. Enter “gotop”.
  • Now re-focus terminal #1, hit <$mod+v> for vertical splitting again.
  • <$mod+Return> for terminal #3, which appears on the upper right with half of the width – thus forcing neofetch into ugly line breaks!
  • For correction, either focus on terminal #1 or #3 and hit <$mod+r> to enter resize mode; a visual indicator appears.
  • Adjust the width easily by pressing the or arrow key accordingly; when done confirm by . – Alternatively drag a window's border by mouse while pressing <$mod>; can be tricky though.
  • In terminal #3, (Assuming it's already installed) invoke “electricsheep” – which does its power consuming magic usually fullscreen. Force it into tiling by <$mod+f>, and it appears on the right of terminal #3. (FYI, quit it with , and configure it with electricsheep-preferences.)
  • Move terminal #3 e.g. to workspace #1 by <$mod+Shift+1> – and “yet” you're done! (You might of course try starting electricsheep via app-launcher or so.)

  • Nifty, huh?  But try this one by mouse clicking and menus! – In X and i3, there are even ways to back up any individual complex tiling layouts and make them relatively easy accessible.  Whether to re-implement such a feature into sway at all is disputed though.


    Due to my small screen, I personally made tabbing my default, i. e. the focused one of multiple windows  covers fullscreen-alike the others, while all are having their own titles in tabs next to each other to choose from. Actually, the above window composition has been of no other use for me than just for practicing and demonstration!


           [ ^ ]     [ Contents ]


    2.2  Likes and StrugglesSo far I like sway, it's doing its job very well, and it's sleek and fast and light on resources, and itself seems stable (except for a couple of desktop freezes with sound still on). – Nonetheless for making friends with it, there are still many issues to solve, for which I have to figure out, whether it's a problem related to sway, wlroots, the xwayland compatibility layer, something else (like system limitations), or simply stupid me that has been missing something ...


    So while on the other hand, libreoffice runs smoothly, I yet can't make an input method such as ibus to work.  Alas, I am still at the beginning of my exploration!

    Then I would rather like to have the focused window's title displayed in the bar, too, instead as a window decoration (default when [single] tiled, can be hidden by <$mod+e>).  Further individual workspace wallpapers as well as popular drop shadows for dialog and tiled windows would definitely be great features for this wayland “flagship”; or rounded corners. – Regarding bars, I will be re-designing mine and have a look at all the available swaybar modules, consult i3status docs, and optionally how to include additional stuff. It's about leet time.


           [ ^ ]     [ Contents ]


    3.  Links and References

    • Wallpaper based on my work [ Talisman ] .
    • The SwayWM homepage: [link]
    • Drew announces sway version 1.0 (March 2019): [link]
    • official sway wiki: [link]
    • sway in the Arch wiki: [link]
    • The SwayWM compared to i3: [link]
    • SwayWM show case on Reddit: [link]
    • An ongoing discussion on Github on drop shadows and other bling: [link]
    • Another discussion giving insights on tracing xwayland bugs and the continuing development of sway/wayland: [link]
    • Insights on the development of the ibus-wayland program library: [link]
    • Discussion on implementing ibus input method support in sway: [link]
    • Layout saving will not be an official feature of sway for the time being: [link]
    • The popular and OS independent Electricsheep app in the Arch User Repo: [link]


           [ ^ ]     [ Contents ]




    .: { Crispy Arch Linux Pr0n } :: next deviation ⟩ :.



    Comments welcome!

    Related content
    Comments: 1

    Gann4Life [2022-06-02 01:24:36 +0000 UTC]

    👍: 1 ⏩: 0