Comments (8)
Theoretically we can implement move_previous
, but I don't see a need (i.e. an application) for it. So if you need it, just say so and please describe why you need it. (Just saying "use_index
has its very best friend move_index
, please also give such a friendship experience to use_previous
" is not enought ;-))
from herbstluftwm.
Good point. I forgot to mention that I need move_previous
because I often use use_previous
without memorizing or knowing the tag index that I came from. I may not always have a panel to show me.
My use case for move_previous
goes hand-in-hand with my use of use_previous
. Which is that I sometimes must move windows between two tags, and sometimes they are not sequential (+1, -1). The use_previous
option would make my workflow easier.
from herbstluftwm.
So if I get it correctly, you want to switch to the previous tag and bring your focused window with you.
You can do that easily with a one-liner script. For example fish:
set winid (herbstclient attr clients.focus.winid); and herbstclient use_previous; and herbstclient bring $winid
In bash it would probably look like this:
winid=$(herbstclient attr clients.focus.winid) && herbstclient use_previous && herbstclient bring $winid
Would this be a solution to your problem?
from herbstluftwm.
Right, if you want to go to the previous tag and take the focused window with you, then you can do that with this herbstclient command
herbstclient substitute ID clients.focus.winid chain , use_previous , bring ID
from herbstluftwm.
No, I don't want to switch to my previous tag. I only want my focused window to move to my previous tag.
Is there a way to get the previous tag index from herbstclient
to so that I may use the use_index
command? Such as:
herbstclient substitute INDEX tags.focus.previous.index move_index INDEX
from herbstluftwm.
Sorry, that's not possible. If you can live with the flickering for the time being, you can do
herbstclient substitute ID clients.focus.winid chain , lock , use_previous , bring ID , use_previous , unlock
from herbstluftwm.
You can also take the more complicated route and have a script running alongside herbstluftwm. It can either store the previous tag or the previously focused client. I would do it with the tag if I were you.
Several examples exist on how to listen for hooks (in this case tag_changed
and move_previous
); you can then bind a key to emit_hook more_previous
and in your script do the deed.
For inspiration, here is a perl script of mine that listens to hooks and performs stuff: https://github.com/ypnos/hlwm/blob/master/redecorate.pl
from herbstluftwm.
Thank you for your help. I will use the chain command.
from herbstluftwm.
Related Issues (20)
- Floating windows are always on top HOT 3
- Running old HLWM on ubuntu 20/ dependencies HOT 4
- Tests fail with GCC 12 (maybe change in error strings for regex library or similar?) HOT 3
- smart_window_surroundings and tabbed_max settings conflict with each other HOT 4
- `settings.focus_follows_mouse` should be called `settings.sloppy_focus` HOT 3
- Placing float windows in the middle of its parent HOT 3
- option to make `smart_window_surroundings` only hide if there is only one window on a tag
- Numpad keys binding ? HOT 4
- How do I use conky/any desktop widgets? HOT 2
- 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
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.