Posts tagged: linux

All posts with the tag "linux"

127 posts latest post 2026-04-18
Publishing rhythm
Mar 2026 | 1 posts

notify-send

xinput float $(xinput list --id-only "AT Translated Set 2 keyboard") | notify-send "laptop keeb floated" -i ~/Pictures/8bitcc.png

tmux attach

https://youtu.be/JQ0yDCVu44E attach is one of the most useful features of tmux. If you have no interest in tmux for pane and window management, you should use tmux for this. It can be a life saver if you ever get disconnected from the host machine or accidently close your terminal you can connect right back into the session you were just in using attach. attach # [1] tmux attach this command will simply attach back to tmux if you are ever disconnected If you ever run long running tasks on a remote machine by sshing into this you should be doing it inside tmux, or something like tmux so that you do not loose your work. attach to a specific session # [2] If you have multiple sessions running you can select the session that you want to attach to by passing -t <name-of-session>. tmux attach -t scratch How I navigate tmux in 2021 [3] for more information on how I navigate tmux, check out this full post Also check out the full YouTube tmux-playlist [4] to see all of the videos i...

tmux ls

https://youtu.be/LY41GLn_DGg tmux ls will list the sessions that you have running within the tmux server if tmux is currently running. This is handy to combine with commands such as attach. tmux ls tmux attach [1] How I navigate tmux in 2021 [2] for more information on how I navigate tmux, check out this full post Also check out the full YouTube tmux-playlist [3] to see all of the videos in this series. References: [1]: /tmux-attach/ [2]: /tmux-nav-2021/ [3]: https://www.youtube.com/playlist?list=PLTRNG6WIHETB4reAxbWza3CZeP9KL6Bkr

tmux command line

https://youtu.be/SNu-4IrkjAs So far we have covered a lot of tmux commands and how they map to keybindings but these same commands can be executed at the command line. From the command line # [1] Let’s make a popup that displays our git [2] status for 5s or until we close it manually. We can run the following command at the command line, in a split. tmux display-popup -E -d '#{pane_current_path}' 'git status && sleep 5' From the tmux command line # [3] Or we can open the tmux command line and run it from tmux’s built in command line, which is very similar to bim EX mode. By default the tmux command line can be opened with prefix+[. display-popup -E -d '#{pane_current_path}' 'git status && sleep 5' πŸ—’οΈ note that the tmux command is called by default when inside of tmux. Make it a keybinding # [4] Finally we can make it a keybinding by adding a bind command ahead of our tmux command, then we can execute this in the tmux command line or add it to our ~/.tmux.conf. bind s displ...

tmux copy-mode

https://youtu.be/-ypY_-VmBKk tmux copy-mode is a tmux mode that lets you scroll, search, copy, and jump your way through a pane. There are a ton of keybindings for copy-mode, the main ones you will need to know are / for searching down ? for searching up, n for next item, space for starting a selection, and enter to copy the selection. Arrow keys will be used for navigation unless you have specified vi mode, then it will be hjkl. Default keybinding to get into copy mode is prefix+[. bind-key [ copy-mode If you are a vim user you will likely want to use vi style keys, add this to your ~/.tmux.conf file to enable vi mode. setw -g mode-keys vi full list of copy-mode keybindings from the man page. Command vi emacs append-selection append-selection-and-cancel A back-to-indentation ^ M-m begin-selection Space C-Space bottom-line L cancel q Escape clear-selection Escape C-g copy-end-of-line [<prefix>] D C-k copy-line [<prefix>] copy-pipe [<command>] [<prefix>] copy-pipe-no...

tmux join-pane

https://youtu.be/Vm5rRtcVXLw Join-pane allows you to join panes that you have broken away from your window, or created in a different window to the window you want it in. As far as I know there is not a default keybinding for it. Before you can join a pane you must first have a pane marked to join. Once you mark a pane, go back to the window you want to join it to and join-pane. My keybindings, you must add this to your ~/.tmux.conf file to use them. # Mark and swap panes #―――――――――――――――――――――――――――――――――――――――――――― bind -n M-m select-pane -m # mark bind -n M-M select-pane -M # unmark bind -n M-< join-pane How I navigate tmux in 2021 [1] for more information on how I navigate tmux, check out this full post Also check out the full YouTube tmux-playlist [2] to see all of the videos in this series. References: [1]: /tmux-nav-2021/ [2]: https://www.youtube.com/playlist?list=PLTRNG6WIHETB4reAxbWza3CZeP9KL6Bkr

tmux break-pane

https://youtu.be/ICL609F2xnc Break-pane is a handy tmux command when your layout gets too cramped and you want to just move a split into its own window. Calling break-pane does exactly that, it creates a new-window for you and moves your currently selected split into that window Default key binding for break-pane bind-key ! break-pane How I navigate tmux in 2021 [1] for more information on how I navigate tmux, check out this full post References: [1]: /tmux-nav-2021/

tmux zoom

https://youtu.be/Rn6mOarCQ-Y Zooming into the current split in tmux is a valuable tool to give yourself some screen real estate. These days I am almost always presenting, streaming, or pairing up with a co-worker over a video call. Since I am always sharing my screen I am generally zoomed in to a level that is just a bit uncomfortable, so anytime I make a split it is really uncomfortable, being able to zoom into the split I am focused on is a big help, and also help anyone watching follow where I am currently working. Default key bindings for zooming the current split bind-key z resize-pane -Z I have rebound this to match the default binding with mod+z rather so that I get that single keystroke experience. bind -n M-z resize-pane -Z How I navigate tmux in 2021 [1] for more information on how I navigate tmux, check out this full post References: [1]: /tmux-nav-2021/

tmux new-window

https://youtu.be/YRPZBv-iYyE New window as it sounds makes new windows in tmux. Windows are kind of like tabs. They are another screen within your sessions that you can name and make new panes in. Default key bindings for creating and navigating windows in tmux. bind-key c new-window bind-key p previous-window bind-key n next-window As always I have rebound these keys because I generally prefer a single keystroke over the prefix plus keybinding approach that tmux gives by default. #――windows―――――――――――――――――――――――――――――――――――――― bind -n M-c new-window -c '#{pane_current_path}' bind -n M-p previous-window bind -n M-n next-window When I started using tmux I did almost everything in one giant session with many panes and windows. It became a nightmare to manage and quickly get between two sets work efficiently. This year I leaned in on sessions quite heavily. Checkout this πŸ‘‡ post to see that workflow in depth. How I navigate tmux in 2021 [1] for more information on how I navigate ...

tmux slect-pane

https://youtu.be/CPZJZjN9YTY These are my MOST often used keybindings that I use in tmux. They allow me to jump between splits with ease with a vim style layout. I can hold mod and jump between panes with a familiar arrow key. bind -n M-h select-pane -L bind -n M-l select-pane -R bind -n M-k select-pane -U bind -n M-j select-pane -D How I navigate tmux in 2021 [1] for more information on how I navigate tmux, check out this full post References: [1]: /tmux-nav-2021/

tmux rotate-window

https://youtu.be/06z5qf81ofo Rotate window is the main way that I navigated tmux before I learned select-pane. It allows you to change your focused pane, or rotate the position of the panes easily. Default keybindings bind-key C-o rotate-window bind-key o select-pane -t :.+ My keybindings look just a bit different than the default ones, I do not like needing to hit prefix for every command, especially for repeated commands. I set a similar keybinding to the default one that uses mod instead of prefix. bind -n M-o select-pane -t :.+ bind -n M-O rotate-window How I navigate tmux in 2021 [1] for more information on how I navigate tmux, check out this full post References: [1]: /tmux-nav-2021/

tmux select-layout

https://youtu.be/F0mHnwTrNNc When you get many splits going in tmux sometimes its time for a new layout. There are four layout strategies that I use, main-vertical, main-horizontal, even-vertical, even-horizontal. Almost always I am useing the main ones with mod plus a or mod plus shift a keybindings. # Select Layouts #――――――――――――――――― bind -n M-a select-layout main-vertical bind -n M-A select-layout main-horizontal bind -n M-E select-layout even-vertical bind -n M-V select-layout even-horizontal How I navigate tmux in 2021 [1] for more information on how I navigate tmux, check out this full post References: [1]: /tmux-nav-2021/

tmux resize-panes

https://youtu.be/hpFYE2LU7xc Resizing panes in tmux can be quite difficult in default tmux, I use a set of keybingings to help resize panes in the rare occasions that I do need just a bit more space. I set the keybinding to the same as my split navigation bindings but shifted. They are very vim like (h,j,k,l). # resize panes #――――――――――――――――――――――――――――― bind -n M-H resize-pane -L 2 bind -n M-L resize-pane -R 2 bind -n M-K resize-pane -U 2 bind -n M-J resize-pane -D 2 Most often when I need to resize panes I just grab the edge of the pane with my mouse. Yes the mouse, its not that often that I actually need to change the size of a pane. # Enable mouse control (clickable windows, panes, resizable panes) set -g mouse on How I navigate tmux in 2021 [1] for more information on how I navigate tmux, check out this full post References: [1]: /tmux-nav-2021/

tmux choose-tree

https://youtu.be/79Y-kqAiMpw Choose tree is a powerful tmux utility that provides a graphical interface to preview all sessions, windows, and panes, move between them kill them, move them and much more. The default keybinding bind-key -T prefix s choose-tree -s my preferred keybinding to open sessions and windows collapsed and Zoomed in. bind-key j choose-tree -swZ From the man page. choose-tree [-GNrswZ] [-F format] [-f filter] [-K key-format] [-O sort-order] [-t target-pane] [template] Put a pane into tree mode, where a session, window or pane may be chosen interactively from a tree. Each session, window or pane is shown on one line. A shortcut key is shown on the left in brackets allowing for immediate choice, or the tree may be navigated and an item chosen or otherwise manipulated using the keys below. -s starts with sessions collapsed and -w with windows collapsed. -Z zooms the pane. The follow‐ ing keys may be used in tree mode: Key Function Enter Choose selected i...

tmux prefix

https://youtu.be/BMkpbfhbkKM The prefix key is an essential part of tmux, by default all of tmux’s key-bindings sit behind a prefix. This prefix is very similar to vim’s leader key. It is common for folks to change the default C-b (control b) to C-a or if they are a vim user something to match their vim leader key. set -g prefix C-Space bind Space send-prefix A few of the essential default key-bindings. % vertical split " horizontal split d detach up select up one pane down select down one pane right select right one pane left select left one pane t clock o swap panes c create window n next window p previous window A more complete list of key-bindings can be found in this gist https://gist.github.com/mzmonsour/8791835. How I navigate tmux in 2021 [1] for more information on how I navigate tmux, check out this full post References: [1]: /tmux-nav-2021/

tmux splitting panes

https://youtu.be/kzgyiHap1nQ splitting panes is a core feature of tmux. It allows us to split the terminal vertically or horizontally into new panes. bind -n M-s split-window -c '#{pane_current_path}' bind -n M-v split-window -h -c '#{pane_current_path}' bind -n M-X kill-pane πŸ—’οΈ note that β€˜#{pane_current_path}β€˜will keep the split in the same directory as it’s parent, without this it will default to your home directory. How I navigate tmux in 2021 [1] for more information on how I navigate tmux, check out this full post References: [1]: /tmux-nav-2021/

tmux last session

https://youtu.be/RB87EEnnMnU An ultimate productivity key-binding in tmux is one to switch to the last session. I use this to quickly get between sessions really quick. Often I am working and need to lookup a quick note, or copy something into my notes, then get back to where I was quickly. bind -n M-b switch-client -l I think of this hub and spoke model, and use last-session to quickly drive it. [1] How I navigate tmux in 2021 [2] for more information on how I navigate tmux, check out this full post References: [1]: https://images.waylonwalker.com/tmux-nav-hub-spoke.png [2]: /tmux-nav-2021/

tmux floating popups

https://youtu.be/2ZqFDsJywt8 Tmux popups are actually floating windows that you can drag around the screen. They always open in the middle (by default) when you open them, no matter where you leave them. Here are a couple of keybindings I use to open up popup windows. bind C-g display-popup -E "ta ~/git" bind -n M-g display-popup -E "tmux new-session -A -s scratch" How I navigate tmux in 2021 [1] for more information on how I navigate tmux, check out this full post References: [1]: /tmux-nav-2021/

tmux popups

https://youtu.be/2I8fB28zfB4 Tmux-popups are a great feature that is relatively new to tmux, many repos such as the standard ubuntu repos do not have it. Popups came in 3.2a, if your package manager does not have it, you can follow the tmux’s install instructions [1] to build from source. # open a popup scratchpad bind -n M-g display-popup -E "tmux new-session -A -s scratch" How I navigate tmux in 2021 [2] for more information on how I navigate tmux, check out this full post I use popups quite a bit in my workflow to ssh into another machine for a short period, or make a new project with a template. References: [1]: https://github.com/tmux/tmux#installation [2]: /tmux-nav-2021/

Copy and Paste on Linux

These are the notes that I used as I set up my first ever ubuntu desktop. gnome-tweaks # [1] sudo apt install gnome-tweaks nordix gtk theme # [2] I ran this, but have no idea if it had any effect as the theme did not show up until I relogged. gsettings set org.gnome.desktop.wm.preferences theme Nordic What I think actuagnome terminal showing scrollbar in tmuxlly worked was emoji support # [3] One thing that I really missed quite early from windows was the emoji virtual keyboard. I like being able to quickly toss in those emoji that give just a bit of a visual cue πŸ”₯, ⚠️,, πŸŽ‰, πŸ¦„, πŸ’œ. installation # [4] I found an application called emote. that seems to do everything I need it to in the snap store. Installation is a typicall snap install. sudo snap install emote default keybinding # [5] The application came with a default keybinding ctrl+alt+e, but I could never remember it. ctrl+alt+e Windows keybinding # [6] Old habits are hard to break, I opened up the gnome settings a...