add workflow section to readme

This commit is contained in:
Almarhoon Ibraheem 2024-06-15 11:36:05 +03:00
parent c5c381ed91
commit 8155a3ee32

View file

@ -14,7 +14,7 @@ I had to migrate to =Wayland= at some point. Being a big fan of =StumpWM=, I tri
*** Query Sway
You can retrieve information about =Sway=, such as list of available =workspaces= or =outputs=. The response will be in Guile records, which you can easily manipulate! (refer to =swayipc/records.scm=)
You can retrieve information about =Sway=, such as list of available =workspaces= or =outputs=. The response will be in Guile records, which you can easily manipulate! (refer to =swayipc/info.scm=)
#+begin_src scheme
;; get focused workspace from a list of workspaces
@ -124,3 +124,45 @@ exec_always "~/.config/sway/init.scm"
(dirname (or (current-filename)
(string-append (getenv "HOME") "/.config/sway/init.scm"))))
#+end_src
** Workflow
*** Workspace Grid
I arrange my workspaces in a grid format. Typically, workspaces are laid out horizontally. With nine workspaces, navigating from workspace 1 to 9 using only horizontal directions can be cumbersome. Assigning a key to each workspace would be efficient but would clutter default mode keybindings. Some might create another mode or submap, but pressing multiple keys to move between workspaces becomes inefficient . I find the optimal solution is organizing workspaces in a grid format, enabling both horizontal and vertical navigation. Currently, I use a 3x3 grid with wraparound navigation.
Horizontal vs Grid 9 workspaces
Horizontal
#+begin_src
1 2 3 4 5 6 7 8 9
#+end_src
Grid (3x3)
#+begin_src
1 2 3
4 5 6
7 8 9
#+end_src
Example navigation in a grid (=cs#idx= is current workspace):
#+begin_src
cs#1> go right
cs#2> go down
cs#5> go down
cs#8> go down (notice wraparound behavior)
cs#2> go right
cs#3> ..
#+end_src
Note: this behavior is achieved via =modules/workspace-grid.scm=
*** Workspace Groups
My workspaces function as groups or tasks that span across all three monitors in my setup. For example, if I switch to my =communication= workspace on one monitor, I want all monitors to switch to their respective =communication= workspaces. This means if I have WhatsApp on monitor #1, Discord on monitor #2, and IRC on monitor #3, they should all align to their designated communication workspace when I switch tasks.
Similarly, this setup extends to projects I work on. If I focus on my dotfiles, I want all monitors to switch to the workspace dedicated to that task. The same principle applies to game development or any other specific task or project workspace I engage with.
Note: this behavior is achieved via =modules/workspace-groups.scm=