All Projects → sainathadapa → I3 Wm Multi Disp Scripts

sainathadapa / I3 Wm Multi Disp Scripts

Licence: mit
Scripts to navigate a multi-monitor setup in I3 WM

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to I3 Wm Multi Disp Scripts

I3 And Kde Plasma
How to install the i3 window manager on KDE
Stars: ✭ 279 (+564.29%)
Mutual labels:  i3wm
I3 Gnome
Use i3wm/i3-gaps with GNOME Session infrastructure.
Stars: ✭ 677 (+1511.9%)
Mutual labels:  i3wm
Swaynagmode
swaynag wrapper for the love of keybindings
Stars: ✭ 21 (-50%)
Mutual labels:  i3wm
Direwolf Arch Rice
🐺🍚 A guide to replicating my riced Arch Linux set-up.
Stars: ✭ 501 (+1092.86%)
Mutual labels:  i3wm
I3ipc Python
🐍 An improved Python library to control i3wm and sway.
Stars: ✭ 634 (+1409.52%)
Mutual labels:  i3wm
Win3wm
A Tiling Window Manager for windows 10, Inspired by i3wm
Stars: ✭ 770 (+1733.33%)
Mutual labels:  i3wm
i3-workspace-handler
Create i3 workspaces on the fly and call them by name
Stars: ✭ 23 (-45.24%)
Mutual labels:  i3wm
I3blocks Airpods
i3blocks script for managing airpods and airpods pro.
Stars: ✭ 36 (-14.29%)
Mutual labels:  i3wm
Dotfiles
i3 + Plasma: using the i3 window manager on the top of KDE Plasma and other dotfiles, configurations, scripts, workarounds and practises from my Debian Sid machines.
Stars: ✭ 651 (+1450%)
Mutual labels:  i3wm
Dotfiles
archlinux + i3wm + polybar + mpd(ncmpcpp)
Stars: ✭ 26 (-38.1%)
Mutual labels:  i3wm
I3
A fork of the i3 window manager with gaps and some other features
Stars: ✭ 5,512 (+13023.81%)
Mutual labels:  i3wm
Customarch
Arch Linux Based Custom ISOs Made With "Archiso"
Stars: ✭ 606 (+1342.86%)
Mutual labels:  i3wm
Bumblebee Status
bumblebee-status is a modular, theme-able status line generator for the i3 window manager.
Stars: ✭ 780 (+1757.14%)
Mutual labels:  i3wm
I3ass
A collection of shell scripts to ease the use of i3wm
Stars: ✭ 318 (+657.14%)
Mutual labels:  i3wm
Dotfiles
Get ready for dotfiles. Contains i3, i3blocks, rofi, dunst, picom, vim, tmux, and zsh.
Stars: ✭ 985 (+2245.24%)
Mutual labels:  i3wm
dotfiles
My dotfiles
Stars: ✭ 16 (-61.9%)
Mutual labels:  i3wm
Dotfiles
🐲 My Arch Linux config [i3-gaps + i3blocks + Zsh + Spacemacs + Rofi + Alacritty + Neofetch]
Stars: ✭ 725 (+1626.19%)
Mutual labels:  i3wm
Matrixlock
Replace i3's lock screen by the Matrix.
Stars: ✭ 42 (+0%)
Mutual labels:  i3wm
Nmcli Rofi
A simple manager for network connections using rofi and nmcli
Stars: ✭ 39 (-7.14%)
Mutual labels:  i3wm
Py3status
py3status is an extensible i3status wrapper written in python
Stars: ✭ 797 (+1797.62%)
Mutual labels:  i3wm

Demo video showing the capabilities

At my workplace, I have a dual monitor setup, with Ubuntu, and I3 as the window manager. Being a tiling window manager, I3 allows me to effectively use all the display space, and arrange the windows quickly in different shapes and sizes.

Typically, I have a browser and a terminal (or multiple terminals) on one monitor, and IDE on another. I also generally have multiple such sets of workspaces. Each such set (one workspace for each monitor) represents a project that I am working on.

This is how the I3 bar looks for me on a typical day:

Monitor 1: 1:projectA | 3:projectB | 5:projectC

Monitor 2: 2:projectA | 4:projectB | 6:projectC

Now, to switch from working on Project A to Project B, I need to invoke three commands -

(Workspace 1 is focused, Workspace 2 is in a focused inactive state on the other monitor)

  1. $mod+3 to switch to Workspace 3 from Workspace 1 on the first monitor
  2. $mod+2 to focus Workspace 2 on the second monitor
  3. $mod+4 to switch to Worspace 4 from Workspace 2 on the second monitor

Three commands is an inefficient way to do such a simple & regular task. So, I wrote a script, using which I can achieve the above with one command. This was back in September 2015. Since then, I wrote more scripts to easily navigate and move windows in a multi-monitor setup with I3. And yes, it also works with more than two monitors.

How to install

  1. Install zenity, in case if it is not present. This utility is present on most gnome based linux systems.
  2. Download the scripts individually or clone the repo
  3. Install the python dependencies as specified in requirements.txt
  4. Bind the scripts to shortcut keys in the I3 config file

Terminology

A project is defined as a set of workspaces, one workspace for each display/monitor available.

Usage

create_new_project.py

To create a new project, run the create_new_project.py script. This will display a dialog box asking for the project name. Names of the workspaces will contain the project name.

Dialog box: New project dialog box

After: New set of workspaces

rename_project.py

To rename a project, run rename_project.py. This will display a dialog box asking for the new project name.

Dialog box: Rename project dialog box

After: After rename

switch_to_next_project.py

To switch to the next project, run switchNextProject.py

switch_to_next_wk_in_project.py

To cycle the focus between the workspaces in a project, run switch_to_next_wk_in_project.py

move_workspaces_in_project_to_next_output.py

To shift all the workspaces in a project to each one's respective next display, run move_workspaces_in_project_to_next_output.py. For example, if the initial state of the workspaces is {Wksp 1 - Disp 1}, {Wksp 2 - Disp 2}, {Wksp 3 - Disp 3}, after running the script, the final state will be {Wksp 1 - Disp 2}, {Wksp 2 - Disp 3}, {Wksp 3 - Disp 1}.

Initial state: Initial state

After running the script: After workspace switch

move_current_container_to_next_workspace_in_project.py

To switch the focused container to the next workspace in the project, run move_current_container_to_next_workspace_in_project.py.

Initial state: Initial state

After running the script: Gvim moved

Sample I3 config

To use the scripts, add these lines to your I3 config:

set $i3multipath ~/.i3/i3_wm_multi_disp_scripts

# project workflow bindings
bindsym $mod+Shift+p         exec $i3multipath/.env/bin/python $i3multipath/create_new_project.py
bindsym $mod+p               exec $i3multipath/.env/bin/python $i3multipath/switch_to_next_project.py
bindsym $mod+Shift+Tab       exec $i3multipath/.env/bin/python $i3multipath/move_workspaces_in_project_to_next_output.py
bindsym $mod+Control+Tab     exec $i3multipath/.env/bin/python $i3multipath/move_current_container_to_next_workspace_in_project.py
bindsym $mod+o               exec $i3multipath/.env/bin/python $i3multipath/rename_project.py
bindsym F8                   exec $i3multipath/.env/bin/python $i3multipath/bring_container_to_current_workspace.py
bindsym $mod+Tab             exec $i3multipath/switcher.sh

# create a initial project on startup with project name 'default'
exec --no-startup-id $i3multipath/.env/bin/python $i3multipath/create_new_project.py default
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].