Erstes Fazit zu #sway
Wie geil ist das denn bitte? Doch der Reihe nach: sway ist ein #Windowmanager für #Linux - es ist ein weitverbreteter Irrtum, man würde eine komplette Desktop-Umgebung wie Gnome, KDE usw. brauchen. Nein, braucht man nicht.
sway gehört zur Gattung der Tiling Windomanager, das heißt: Fenster werden grundsätzlich als Kacheln angeordnet, nebeineinander oder übereinander, aber nie überlappend. Die Suche nach dem tollsten Wallpaper erübrigt sich also 😉
Wie üblich gibt es Workspaces. Das erste Programm, das in einem Workspace gestartet wird, nimmt grundsätzlich jeden verfügbaren Platz ein, man nennt diesen Platz Container. Der ist eben so groß wie der Bildschirm ist.
Sagen wir so:
+----------------------+
| |
| |
| |
| |
| |
| |
+----------------------+Nun startet ein zweite Programm in dem Container. Man kann entscheiden, ob der nun verikal oder horizontal gesplittet werden soll, sagen wir vertikal (vertikal heißt: der Container ist vertikal ausgerichtet) Es entsteht dieses Layout:
+----------------------+
| |
| |
| |
|----------------------|
| |
| |
| |
+----------------------+Wir haben nun zwei Container. Jetzt können wir ein drittes Programm im unteren Container starten, nun splitten wir horizontal. Kein Problem:
+----------------------+
| |
| |
| |
|----------------------|
| | |
| | |
| | |
+----------------------+Selbstverständlich lassen sich die Grenzen in jede Richtung verschieben, nur der äußere Rahmen nicht.
Das ist nicht immer praktisch, zum Beispiel bei Gimp nicht, wo jedes neue Palettenfenster fest in einer neuen Kachel wäre. Also kann man definieren, daß ein bestimmtes Programm immer im Fenstermodus ("floating") startet, dann kann man das Fenster frei mit Maus oder Tastatur verschieben und verkleinern/vergrößern. Man kann auch im Nachhinein ein tiled Fenster floating machen und wieder zurück.
Man kann einen kompletten Container tabbed oder stacked machen, so daß die Fenster immer fast im Vollbild laufen, man sieht dann nur noch die Titelleisten der anderen Fenster. Generisches Vollbild geht auch, dann gibts gar keine Titelleisten mehr. Ach ja: Wenn man will (und man will) kann man eine minimalistische Statusleiste haben. Meine sieht so aus momentan:
Ein Startmenü gibt es nicht, dafür aber eine Tastenkombination für einen App Launcher. Apropos Tastenkombinationen: fast alles wird über eine Tastenkombination bedient, manches geht auch mit der Maus, aber die ist eher eine Notalternative. Da bleibt es nicht aus, daß es viele Tastenkombinationen gibt:
❯ grep -P '^\s*bindsym' .config/sway/config
bindsym $mod+Return exec $term
bindsym $mod+Shift+q kill
bindsym $mod+d exec $menu
bindsym $mod+Shift+c reload
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
bindsym $mod+1 workspace $ws1
bindsym $mod+2 workspace $ws2
bindsym $mod+3 workspace $ws3
bindsym $mod+4 workspace $ws4
bindsym $mod+5 workspace $ws5
bindsym $mod+6 workspace $ws6
bindsym $mod+7 workspace $ws7
bindsym $mod+8 workspace $ws8
bindsym $mod+9 workspace $ws9
bindsym $mod+0 workspace $ws10
bindsym $mod+Shift+1 move container to workspace $ws1
bindsym $mod+Shift+2 move container to workspace $ws2
bindsym $mod+Shift+3 move container to workspace $ws3
bindsym $mod+Shift+4 move container to workspace $ws4
bindsym $mod+Shift+5 move container to workspace $ws5
bindsym $mod+Shift+6 move container to workspace $ws6
bindsym $mod+Shift+7 move container to workspace $ws7
bindsym $mod+Shift+8 move container to workspace $ws8
bindsym $mod+Shift+9 move container to workspace $ws9
bindsym $mod+Shift+0 move container to workspace $ws10
bindsym $mod+b splith
bindsym $mod+v splitv
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
bindsym $mod+f fullscreen
bindsym $mod+Shift+space floating toggle
bindsym $mod+space focus mode_toggle
bindsym $mod+a focus parent
bindsym $mod+Shift+minus move scratchpad
bindsym $mod+minus scratchpad show
bindsym $left resize shrink width 10px
bindsym $down resize grow height 10px
bindsym $up resize shrink height 10px
bindsym $right resize grow width 10px
bindsym Left resize shrink width 10px
bindsym Down resize grow height 10px
bindsym Up resize shrink height 10px
bindsym Right resize grow width 10px
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+r mode "resize"
bindsym --locked XF86AudioMute exec pactl set-sink-mute \@DEFAULT_SINK@ toggle
bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume \@DEFAULT_SINK@ -5%
bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume \@DEFAULT_SINK@ +5%
bindsym --locked XF86AudioMicMute exec pactl set-source-mute \@DEFAULT_SOURCE@ toggle
bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
bindsym --locked XF86MonBrightnessUp exec brightnessctl set 5%+
bindsym XF86MonBrightnessUp exec brightnessctl set +10%
bindsym XF86MonBrightnessDown exec brightnessctl set 10%-
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
bindsym $mod+Ctrl+Shift+3 exec grim - | wl-copy && paplay /usr/share/sounds/freedesktop/stereo/camera-shutter.oga
bindsym $mod+Ctrl+Shift+4 exec grim -g "$(slurp)" - | wl-copy && paplay /usr/share/sounds/freedesktop/stereo/camera-shutter.oga
bindsym $mod+t exec sh -c 'nmcli -t -f NAME,TYPE connection show --active | grep -q "^OVPN:vpn" && nmcli connection down OVPN || nmcli connection up OVPN'
bindsym $mod+Tab exec ~/.config/sway/window-switcher.sh
❯ Ne Menge Holz, das erstmal in die Fingerhirne eingetackert werden muß 😉
Und etwas sehr praktisches: Das Scratchpad. Das ist unsichtbar, dorthin kann man Anwendungen verschieben, die ständig laufen, aber nicht stören sollen. Bei mir ist das der Sonos-Controller: Den hole ich mir mit einer Tastenkombination auf den Bilschirm, egal, in welchem Workspace ich bin, und genauso schnell verschwindet er auch wieder. Oder die Notizen-App. Eine Art
git stash.
Das ganze Konzept ist sehr durchdacht. Durchdacht insofern, daß man alles, wirklich alles, frei konfigurieren kann. Das ist knorke, das ist fetzig.
Man mag meinen, nicht für jedermann, weil nerdig..
Da komme ich ins Philosophieren: Ist das wirklich so? Vielleicht für jemanden, der von Windows weg ist zu Linux, es soll sich aber bitte genau so verhalten wie Windows (ohne dessen Fallstricke, das ist aber ein frommer Wunsch, Linux hat halt andere Fallstricke)
Was aber wäre, wenn jemand mit so einem tiling Windowmanager groß geworden wäre und nun sich mit Windows auseinandersetzen müßte? Er würde das ganze Konzept nicht verstehen, übrigens auch das von Gnome/KDE… nicht.
Vor Jahrzehnten ging mal das Gerücht über eine Sekretärin am chemischen Institut der FSU Jena: Die hatte ihre Briefe schon immer in LaTeX geschrieben und bekam nun ein Word mit dem Befehl, ab sofort in Word zu schreiben. Und was machte sie? Schrieb ihre LaTeX-Quellen eben in Word…
Also: probiert mal sway aus, länger als nur ein paar Tage. Einfach installieren und am Login-Manager sway auswählen.
Für vi-Opfer: Man kommt raus mit
Mod-Shift-e - Mod ist in der Regel Alt 😉 Ein Terminal, damit man überhaupt was machen kann, startet man mit Mod-Enter.
Nur Mut!