Comments (4)
:+1: for this. I often want to windows arrange with one long window on the left with the right split vertically, like:
_____
| | |
| |__|
| | |
|__|__|
And it would be great to be able to do this before I need to start manually arranging frames.
from herbstluftwm.
I second this.
from herbstluftwm.
I would love this as well.
from herbstluftwm.
This depends on ripgrep, because it's what I've been using and I'm too lazy to convert it to sed/awk. It's only used in one place, and it is the only dependency that isn't POSIX (aside from herbstclient, which should be obvious).
#!/bin/bash
# NAME: hlwm_rotate.sh
# SYNOPSIS: Rotate the clients clockwise
# The script dumps the current layout, swaps out the client IDs,
# and loads the results; this effectively rotates the clients
# clockwise in the current layout. If set executable, the script
# can be bound to a key. E.g.:
# herbstclient keybind Mod4+Control+r spawn ${HOME}/hlwm_rotate.sh
# AUTHOR: Sean E. Russell <[email protected]>
# REVISION: v0.0.1
# DATE: 2023-06-15
# Get the currently focused client, so we can re-focus it after rotation
focused=$(herbstclient list_clients --frame=@)
# Get the list of clients
dump=$(herbstclient dump)
clients=($(<<<$dump rg -o '\(clients[^)]+(0x\w+)\)' -r '$1'))
# Rotate the clients IDs in the dump
# First, rename all of the client IDs
rotated=$dump
maxidx=$(expr ${#clients[@]} - 1)
for i in $(seq 0 $maxidx); do
rotated=$(<<<$rotated sed "s/${clients[$i]}/X${i}X/")
done
# Next, replace the renames with the rotated values
rotvalues=("${clients[@]: -1}" "${clients[@]:0:${#clients[@]}-1}")
for i in $(seq 0 $maxidx); do
rotated=$(<<<$rotated sed "s/X${i}X/${rotvalues[$i]}/")
done
# Load the dump
herbstclient load "$rotated"
herbstclient jumpto $focused
from herbstluftwm.
Related Issues (20)
- Window with em-dash in title causes missing `focus_changed` hook (xconnection.cpp: 347: Can not create text list) HOT 2
- Move window to previous tag HOT 2
- rule to close window HOT 2
- Move floating window in single axis only? HOT 2
- focus seems odd after using a flameshot
- Client border not cleared when urgent client is focused
- Unable to move floating window if sent to another tag while still moving
- Typing in unmanaged window HOT 3
- q3terminal script does not show an empty frame HOT 4
- I would like to be able to use non-english letters (German Umlauts) in keybindings HOT 2
- Move client to tag? HOT 2
- Emacs does not show tabs in initial frame HOT 3
- Moving tabbed windows within the tabbed_max layout HOT 1
- Test fail: Mode_switch disappeared HOT 2
- Focus issue with monitor at unusual position HOT 3
- Fullscreen applications (such as games) become minimised after switching between tags, and constantly require use of unminimize.sh HOT 5
- Remove gap when 1 window and 1 frame in the tag or max layout 1 frame. HOT 3
- Can we set theme attribute via rules?
- Default mouse button behavior without clients?
- Proposal for significant overhaul and potential integration of herbstluftwm HOT 18
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from herbstluftwm.