Giter VIP home page Giter VIP logo

i3-wm-scripts's Introduction

i3-wm-scripts

i3 Window Manager Scripts

These are python scripts that read/write to i3 using i3-msg. By using regular expressions it is possible to search for windows with particular names and jump to them.

Dependencies: i3, i3-msg (distributed with i3), dmenu

There are 4 scripts: nextmatch, nextfind, goto, mark

nextmatch

Syntax: nextmatch <regex>

This script takes one regular expression input e.g. '(fire|chrom)' and searches for that name in the list of available windows. If there is a match then it jumps to the match. If you are already at a match it goes to the next match (or stays if there is only one)

Example Binding:

bindsym $mod+q exec python ~/bin/nextmatch vim # cycle through vim sessions
bindsym $mod+w exec python ~/bin/nextmatch '(chromium|firefox)' # cycle through browsers using regex

nextfind

Syntax: nextfind

This script works similarly to the previous but takes no arguments and instead provides a dmenu list of arguments. If you select one a window that is active and there are multiple with the same name then it jumps to the next one, otherwise it stays at the current.

Example Binding:

bindsym $mod+e exec python ~/bin/nextfind # use dmenu to select an open window

mark/goto/unmark

These scripts mark and jump to a specified script. I rarely use them, because I prefer the other two, but they can be useful if you are jumping to a lot of windows with the same name (like terminals). Basically you can mark the current window by calling mark (or binding it them using the key-combination). Then you can get a list of marked windows (similar to nextfind, but only with marked windows included) to jumpt to.

Example bindings:

bindsym $mod+Shift+grave exec ~/bin/unmark # unmark the current window
bindsym $mod+grave exec ~/bin/mark # mark the current window
bindsym $mod+Tab exec exec ~/bin/goto # get dmenu of marked windows

Install

To install just put the scripts in your path, or bind the scripts in you config file. I installed mine in ~/bin/, then made the bindings in my config file.

i3-wm-scripts's People

Contributors

micahcc avatar rdpate avatar eeemsi avatar nathantypanski avatar jarnob avatar stanipintjuk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.