• tal@lemmy.today
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    1 month ago

    Tier 1: Linux virtual consoles. Switch among these with Alt-F1 through Alt-F8. Control-Alt instead of Alt if in Wayland. I have seven with a text terminal and Wayland on the eighth. This tier supports showing only one virtual console at once.

    Tier 2: Inside the Wayland virtual terminal, Sway managing virtual desktops. I use nonstandard keybindings here: Super-1 and -2 to cycle left and right, and Super-Q n to go to the n-th desktop. Beyond the first ten desktops, I can use Super-R to rename a desktop to a “named” desktop. For cycling purposes, these come after the first ten. This tier supports showing only one desktop at once.

    Tier 3: Inside a Sway virtual desktop, windows managed by Sway. This tier supports splitting, showing multiple windows at once. I use nonstandard emacs-style keybindings, Super-F/B/N/P to move among those. These are often running a virtual terminal program, foot. I don’t use a multiplexing terminal with multiple “tabs”, because I favor a more minimalist setup with fewer tiers.

    Tier 4: Inside a Sway-managed window, mosh. This tier isn’t always present; I only use this tier if I’m using a remote system. Mosh has its own concept of sessions. These can be used in conjunction with Tmux’s sessions — mosh’s system is designed to smooth over connectivity issues. Lose network connectivity and mosh will display a message. Hibernate a laptop for a month with a mosh connection open to another machine, open the lid, and mosh will transparently re-establish its connections as if there had been no interruption. I mostly use mosh to reduce perceived latency, but the connectivity stuff is neat. Not much interaction with this tier, short of force-exiting with Control-^ . and this tier only supports showing one session in a terminal at once.

    Tier 5: Inside a mosh session, tmux sessions. Tmux has its own set of sessions, which one can attach to with tmux attach. This tier only supports showing one session at once.

    Tier 6: Inside a tmux session, tmux windows. I use a nonstandard prefix key for tmux (and GNU screen) to reduce friction with emacs — Control-O. I use emacs-style keybindings to cycle among windows — Control-O Control-N/Control-P. This tier does support splitting to show multiple tmux windows at once, though I don’t use that functionality.

    Tier 7: Inside a tmux window, I run a bash shell process. Bash supports job control. Control-Z to suspend the current job and return to bash, jobs to list jobs, fg %n to activate the nth job.

    Tier 8: Inside a bash job, I might be running emacs, and that has emacs frames. If you’re using graphical emacs, each frame corresponds to a window in your windowing environment. In terminal emacs, each is basically another invisible layer that you can switch among. C-x 5 2 to create a new frame, C-x 5 o to cycle, C-x 5 0 to destroy. This tier does not support showing multiple frames at once.

    Tier 9: Emacs buffers. Each “buffer” might be a text file, a email client with mu4e, an LLM chat session with ellama, a “spreadsheet” with an org-mode table, whatever. One can show multiple emacs windows and assign a buffer to each emacs window (emacs has its own concept of windows, which kinda correspond to “panes” in most programs). Emacs has many systems for switching among these, but I mostly use one of two fairly vanilla add-on packages, either C-x b for ido-switch-buffer to switch among buffers using tab-completing names, or C-x C-b to use ibuffer, which provides menu-based selection.

    Tier 10: Usually not something I use in conjunction with emacs, but if one is running a bash instance in an emacs shell-mode buffer (M-x shell), then bash’s job control comes into the picture. Emacs shell-mode requires one to prefix each bash control key sequence with C-c, so C-c C-z to suspend the current job, and return to shell, jobs to list current jobs, and fg %n to activate the n-th job. Can only show one job at once.

    EDIT: You could maybe make an argument that there’s another tier between Tier 7 and Tier 8, because I use an emacs feature called desktop.el that persists an emacs session, including its frames and windows and open buffers and all across invocations of emacs for a given project. But I rarely use this, so it’s not normally in the stack. If it’s there, you can only have one active at once, no “split desktop.el” functionality.

    EDIT2: I take it back. I had workspace renaming set up in i3, but never pulled that configuration over when I switched to sway. So just the basic 10 workspaces.

    • Riskable@programming.dev
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 month ago

      Crank that knob up to 11: Using multiple computers simultaneously to manage all your shit—with some having special hardware dedicated to the task!