• Stars
    star
    195
  • Rank 199,374 (Top 4 %)
  • Language
    Rust
  • License
    MIT License
  • Created over 6 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Visually focus windows by label

wmfocus - Visually focus windows by label

CI Crates.io license Stars Lines of Code

This tool that allows you to rapidly choose a specific window directly without having to use the mouse or directional keyboard navigation.

Screen cast

Thanks to cairo, it should work on all kinds of screens and automatically display at the correct size according to your DPI.

Installation

Packaging status

On Arch Linux: pacman -S wmfocus

With Cargo: cargo install --features i3 wmfocus

Usage

Draw labels on the upper-left corner of all windows:

wmfocus

Completely fill out windows and draw the label in the middle (try it with transparency!):

wmfocus --fill

Use a different font (as provided by fontconfig):

wmfocus -f "Droid Sans":100

Change up the default colors:

wmfocus --textcolor red --textcoloralt "#eeeeee" --bgcolor "rgba(50, 50, 200, 0.5)"

wmfocus will make use of a compositor to get real transparency.

Full help

wmfocus 1.4.0

Sven-Hendrik Haase <[email protected]>

Visually focus windows by label

USAGE:
    wmfocus [OPTIONS]

OPTIONS:
        --textcolor <TEXT_COLOR>                          Text color (CSS notation) [default: #dddddd]
        --textcoloralt <TEXT_COLOR_ALT>                   Text color alternate (CSS notation) [default: #666666]
        --bgcolor <BG_COLOR>                              Background color (CSS notation) [default: "rgba(30, 30, 30, 0.9)"]
        --textcolorcurrent <TEXT_COLOR_CURRENT>           Text color current window (CSS notation) [default: #333333]
        --textcolorcurrentalt <TEXT_COLOR_CURRENT_ALT>    Text color current window alternate (CSS notation) [default: #999999]
        --bgcolorcurrent <BG_COLOR_CURRENT>               Background color current window (CSS notation) [default: "rgba(200, 200, 200, 0.9)"]
        --halign <HORIZONTAL_ALIGN>                       Horizontal alignment of the box inside the window [default: left] [possible values: left, center, right]
        --valign <VERTICAL_ALIGN>                         Vertical alignment of the box inside the window [default: top] [possible values: top, center, bottom]
        --fill                                            Completely fill out windows
    -c, --chars <HINT_CHARS>                              Define a set of possbile values to use as hint characters [default: sadfjklewcmpgh]
    -e, --exit-keys <EXIT_KEYS>...                        List of keys to exit application, sequences separator is space, key separator is '+', eg Control_L+g
                                                          Shift_L+f
    -f, --font <FONT>                                     Use a specific TrueType font with this format: family:size [default: Mono:72]
    -h, --help                                            Print help information
    -m, --margin <MARGIN>                                 Add an additional margin around the text box (value is a factor of the box size) [default: 0.2]
    -o, --offset <OFFSET>                                 Offset box from edge of window relative to alignment (x,y) [default: 0,0]
    -p, --print-only                                      Print the window id only but don't change focus
    -V, --version                                         Print version information

Troubleshooting

If there's some funky stuff, you can try to track it down by running wmfocus with RUST_LOG=trace:

RUST_LOG=trace wmfocus

This will print quite some useful debugging info.

Compiling

You need to have recent versions of rust, cargo, xcb-util-keysyms, libxkbcommon-x11 and cairo installed.

Then, just clone it like usual and cargo run to get output:

git clone https://github.com/svenstaro/wmfocus.git
cd wmfocus
cargo run --features i3

Window manager support

While this tool is window manager-independent, an implementation for your favorite window manager might not yet be available. Current support:

  • i3
  • sway (partial, accepting PRs)

If you want to implement support for more window managers, have a look at the i3 implementation.

This tool is heavily inspired by i3-easyfocus.

Releasing

This is mostly a note for me on how to release this thing:

  • cargo release
  • cargo release --execute
  • Release will automatically be deployed by GitHub Actions.
  • Update Arch package.

More Repositories

1

genact

🌀 A nonsense activity generator
Rust
7,449
star
2

miniserve

🌟 For when you really just want to serve some files over HTTP right now!
Rust
4,653
star
3

rofi-calc

🖩 Do live calculations in rofi!
C
756
star
4

upload-release-action

Upload files to a GitHub release
TypeScript
429
star
5

cargo-profiler

Cargo subcommand to profile binaries
Rust
426
star
6

rust-web-boilerplate

Rust web template for modern web backend applications
Rust
286
star
7

bvh

A fast BVH using SAH in rust
Rust
226
star
8

flamejam

A generic game jam application with ratings and comments using Flask
HTML
140
star
9

memefs

Mount your memes using FUSE
Rust
131
star
10

glsl-language-server

Language server implementation for GLSL
C++
104
star
11

proxyboi

A super simple reverse proxy with TLS support
Rust
81
star
12

dwarf_fortress_unfuck

Unfucking Dwarf Fortress
C++
80
star
13

dummyhttp

Super simple HTTP server that replies a fixed body with a fixed response code
Rust
56
star
14

pseudoform

Pseudoform is a community-driven collaboration project that aims to create an involving and brain-melting first-person puzzle-solving game.
C++
38
star
15

trac0r

A fast real time physically based renderer
C++
29
star
16

upx-action

Strips and runs upx on binaries
JavaScript
25
star
17

mt940-rs

A MT940 parser in Rust
Rust
22
star
18

python-web-boilerplate

Python web template for modern web backend applications
Python
21
star
19

keycloak-http-webhook-provider

A Keycloak provider that posts events to a URL via HTTP POST as JSON
Java
20
star
20

derp

The derp game engine in D
D
20
star
21

gamejam

This is a gamejam project for all kinds of jams.
Lua
19
star
22

wiresmith

Auto-config WireGuard clients into a mesh
Rust
17
star
23

lglive

live.linuX-gamers live gaming distro
Shell
16
star
24

site24x7_exporter

A Prometheus compatible exporter for site24x7.com
Rust
13
star
25

crabcluster

A simple integrated container orchestration solution
Rust
12
star
26

pytest-colordots

Colorizes the progress indicators
Python
12
star
27

dotfiles

Various dotfiles from my machines
Vim Script
12
star
28

minimal-examples

A bunch of small standalone programs
C++
11
star
29

proby

📡 Check whether hosts are reachable on certain ports and return result on HTTP
Rust
10
star
30

playgrounds

Just some playing around with physics.
C++
9
star
31

Spacescape

A space skybox tool using Ogre3D
C++
8
star
32

fints-institute-db

A library and CLI tool to access FinTS access information for many German banks
Rust
6
star
33

talks

Talks for conferences and such
HTML
5
star
34

fints-rs

A compliant FinTS implementation
Rust
5
star
35

vulkanology

Test Vulkan compute shaders using Rust
Rust
5
star
36

qponies

Desktop ponies using qml
C++
5
star
37

NoisyHunter

Implementation of http://www.squidi.net/three/entry.php?id=85
C++
5
star
38

Pseudoform-2

C++
4
star
39

piplayer

Receive a command, play a song
Rust
4
star
40

bankthing

💰 A thing that does stuff with banks
Python
3
star
41

instacheer

Instant cheer for your desktop!
C++
3
star
42

benchy

FOSS cross-platform desktop benchmarking tool
C++
3
star
43

MegaGong

School gong for my class
C++
2
star
44

ilswlol

Wer weiss?
Python
2
star
45

arkenon

Stuff with spaceships
C++
2
star
46

pong4p

4-player multiplayer pong
Python
2
star
47

minitraderoute

A Mini Metro-inspired space trading game
Rust
2
star
48

txt2vid

A text to video renderer
2
star
49

windowcrap

Experimental crap for your desktop!
C++
2
star
50

esp32-toys

Just playing around with ESP32
Python
2
star
51

ssl-proxy-docker

Dockerized version of https://github.com/suyashkumar/ssl-proxy
Dockerfile
2
star
52

rust-web-experiments

Various experiments with rust in the web
Rust
2
star
53

overpower

CLI tool to benchmark web servers with nice output
Rust
2
star
54

rust-timescale-sqlx-rocket

A little integration test of Rust, TimescaleDB, sqlx, and Rocket
Rust
2
star
55

lolpi

A simple implementation of Bellard's formula for calculating PI.
C++
2
star
56

uefi-playground

Experiments with UEFI
Makefile
2
star
57

innojam13

IGJam #13
Rust
1
star
58

cargo-sweb

Simple and convenient cargo subcommand to develop web applications
1
star
59

gameservers

Instant game servers for various games
Shell
1
star
60

taxi-simulation

Schizl
Rust
1
star
61

innojam8

InnoGames Game Jam 8
JavaScript
1
star
62

infinerator

Image generator to generate every possible combination of a given resolution and color depth
C++
1
star
63

pink-fluffy-unicorns

Interactive Visual Computing using POVRay
TeX
1
star
64

qemu-espressif-docker

A container image containing espressif-qemu
Dockerfile
1
star
65

caca

Copy And Convert Audio
Python
1
star
66

fredjam2018

Rust
1
star
67

svenstaro

My GitHub profile page
1
star
68

gamedev-starter-packs

Starter packs for various languages
Lua
1
star
69

docker-archlinux-bootstrap

Arch Linux Docker base image that is generated from the official bootstrap
Shell
1
star
70

epaper-frame

A color e-ink-based picture frame driven by an ESP32
Rust
1
star
71

docker-phoronix-test-suite

A Docker image featuring a ready-to-run installation of the Phoronix Test Suite
Dockerfile
1
star
72

uni-projekt

Projekt Mikrocomputer
Python
1
star
73

rust-python-experiment

Experiments involving Rust + Python
Rust
1
star
74

strapon

Modern C++14 helpers for game stuff
C++
1
star