Skip to content

Commit

Permalink
Merge branch 'master' of github.com:chmln/screens
Browse files Browse the repository at this point in the history
  • Loading branch information
chmln committed Apr 12, 2020
2 parents 1c5bb10 + 5729de2 commit f9c9a4f
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish

on:
push:
tags:
- '*'

jobs:
publish:
name: Publish for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
asset_name: enact

steps:
- uses: hecrj/setup-rust-action@v1
with:
rust-version: stable
- uses: actions/checkout@v1
- name: Build
run: cargo build --release --locked
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/enact
asset_name: ${{ matrix.asset_name }}
tag: ${{ github.ref }}
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# `enact`

`enact` will detect the proper resolution of your secondary monitor (if any) and automatically set it up as soon as you plug it in (or out).

It uses `xrandr` under the hood and works great with window managers like i3, bspwm, and others.

Use cases:
- a laptop and an abritrary secondary monitor (e.g. at work, home, etc.)
- a desktop with two monitors

## Usage

Test it out then place this in your `.xinitrc`.

```sh
# Set up second monitor above laptop
enact --pos top
```

Or to do the same, but also watch for changes and allow hotplugging

```sh
enact --pos top --watch &
```

0 comments on commit f9c9a4f

Please sign in to comment.