Code Monkey home page Code Monkey logo

i3-autodisplay's Introduction

i3-autodisplay

i3-autodisplay is a i3wm display auto-configuration for multiple monitors

Go Report Card GitHub release (latest SemVer)

Installation

Pre requisites

xrandr program

Pre built binary

Fetch the latest release.

Archlinux AUR

From sources

git clone https://github.com/lpicanco/i3-autodisplay.git
cd i3-autodisplay
go build cmd/i3-autodisplay/i3-autodisplay.go

Usage

i3-autodisplay requires a configuration file to work. The configuration file can be loaded from these locations:

  • $XDG_HOME/i3-autodisplay/config.yml
  • $HOME/.config/i3-autodisplay/config.yml
  • Specified via -config parameter

In your i3wm configuration add the following line:

exec --no-startup-id <path to i3-autodisplay>

Usage via command line:

./i3-autodisplay -config sample_config.yml

Sample configuration file:

displays:
  - name: eDP1
    workspaces: [1,2,3,4,5,6,7,8,9,0]
  - name: HDMI1
    workspaces: [2,4,6,8]
    randr_extra_options: "--left-of eDP1"
  - name: DP1
    workspaces: [1,3,5,7,9]
    randr_extra_options: "--left-of HDMI1"

i3-autodisplay's People

Contributors

bgounon avatar brianmay avatar glitchcrab avatar lpicanco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

i3-autodisplay's Issues

Error: no such file or directory

Am I the only one who cant run the 0.6 version?
I downloaded it from the release page, made it executable and ran it.

./i3-autodisplay-0.6-linux-amd64
zsh: no such file or directory: ./i3-autodisplay-0.6-linux-amd64

0.5 run fine, but it does not exit.

Adding this to the AUR

Hey, I made a PKGBUILD to add this to the AUR, its here.

Could you add it there? It would make installing it and keeping up-to-date a lot easier for arch users. I can probably submit it too if you prefer.

Different actions for different displays (on the same connector)

Hello, I would like to request a feature.

USE CASE:
In my office, I work on a big monitor connected to my laptop through HDMI (my machine and i3-autodisplay see it as HDMI-1). I use it as my main monitor, and the laptop's screen as just extra real state.
However, when giving a presentation, it is common to be given "an HDMI to connect to". If I connect it, i3-autodisplay will think it is my office's monitor, which is a problem. When I present, I want to have all my workspaces and windows in my laptop's screen, rather than project them to the audience.

HOW TO IDENTIFY EACH DISPLAY:
In order to identify different displays, one could use the EDID of a display, rather than just the connector name. This info can be obtained from xrandr too:

xrandr --verbose | awk '{if(p==1){if($1 ~ /[0-9a-f]{32}/){printf("%s",$1)}else{output=""; p=0; printf "\n"}}}  /^HDMI-1 connected .*/{output=$1}  /\tEDID:/{if(output != ""){printf("%s=",output); p=1};}'

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.