cornerman / i3-easyfocus Goto Github PK
View Code? Open in Web Editor NEWFocus and select windows in i3
License: GNU General Public License v3.0
Focus and select windows in i3
License: GNU General Public License v3.0
I'm curious if this could be adopted to show the marks for each window that has one.
I don't use window decoration, so only the title of the focused window is shown in the status bar. Therefore I "can't" activate show_marks
. I'm using this tiny script to search for marks interactively with DMenu. But this does not help if I don't know the mark, especially when using my standard marks for quick assignment which are numbers. On the other hand using easyfocus
all the time is also not a solution I like to use, since new windows cause unstable labels and comes with some overhead of shortcuts.
So sometimes I have this situation where I know I've marked the window, but just don't remember its mark. So I have to switch to it manually and remark it with a new mark, which is maybe already used. Or I search through all marks with the mentioned script, hoping I remember it later on.
So I imagine the usage that I can display the same labels as now with easyfocus
but showing the mark, if such exist for the window. Of cause this works only for all windows for the current visible workspace(s). Also interesting are tabbed containers which contain split windows again. 🤔
Is this hard to implement? What would be necessary?
If a floating window is visible and the current focus is on a tiled window when i3-easyfocus is invoked, the floating window is also labeled like the tiled windows but results in an error if selected.
Debug output of case here: https://gist.github.com/mtalexan/ff39ee4fc1ff86d6f519a499e9f0c631
Occurs with commit 3631d5a (master as of now)
This appears to be an issue with jumping between tiled focus and floating focus using only i3-easyfocus. The IPC doesn't seem to allow that. The same issue occurs if current focus is in a floating window and you try to jump to a tiled window.
It would be great if this worked to jump between tiled and floating windows, but a temporary solution might be to identify the current mode and filter out the windows that don't match the current focus mode from labeling. Regardless, filtering of floating vs tiled windows has to happen either for processing during focus jump or to avoid labeling windows that can't be reached.
Thanks for the great script!
Question: How hard it would be to extend i3-easyfocus so that it can also show all the click-able GUI elements on the current screen?
I use vimium to eliminate mouse use in my browser. It displays little letters over each button, link, and click-able element to quickly focus or click on. It's a life-saver for my carpel tunnel. I'd love to have the same functionality in i3!
I like this app and I used this app most on i3. Recently, I'm trying to switch from i3 to sway.
Do you have plans to support this app on the sway?
Would it be possible to make i3-easyfocus take a string argument with the specific keys it should use to mark the windows?
something like $i3-easyfocus -k "12345"
would put '1' on the first window, '2' on the second and so on.
This would be really usefull in rapid mode, so it doesn't cover the keys you need to use in the different windows.
what do you think?
Just cloned the repo, and built this tool. Running ./i3-easyfocus
prints cannot focus window
and does nothing.
I'm running 1f3274c with altdesktop/i3ipc-glib@8261412.
$ uname -a
Linux bendem-fedora-acer 4.4.6-300.fc23.x86_64 #1 SMP Wed Mar 16 22:10:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/os-release
NAME=Fedora
VERSION="23 (Workstation Edition)"
ID=fedora
VERSION_ID=23
PRETTY_NAME="Fedora 23 (Workstation Edition)"
ANSI_COLOR="0;34"
CPE_NAME="cpe:/o:fedoraproject:fedora:23"
HOME_URL="https://fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=23
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=23
PRIVACY_POLICY_URL=https://fedoraproject.org/wiki/Legal:PrivacyPolicy
VARIANT="Workstation Edition"
VARIANT_ID=workstation
$ i3 --moreversion
Binary i3 version: 4.12 (2016-03-06, branch "4.12") © 2009 Michael Stapelberg and contributors
Running i3 version: 4.12 (2016-03-06, branch "4.12") (pid 1720)
Loaded i3 config: /home/bendem/.config/i3/config (Last modified: Wed 06 Apr 2016 03:25:34 PM CEST, 169108 seconds ago)
The i3 binary you just called: /usr/bin/i3
The i3 binary you are running: i3
A continuation of #8, allow for more than just hard coded key maps.
I'm not experienced with X11, so I didn't realize there was XStringToKeysym()
as an option.
Instead of hard coding values from keysym.h to define a map, require a minimum sized map be provided on the command line if they specifiy --keymap=custom
(or something similar), and allow a user to specify the names of keys that can be passed to XSTringToKeysym()
as a comma-separated list (or something like that?).
This would require the map function to allow for a dynamically determined map size rather than a pre-defined map size, which is currently a non-trivial task.
Being an AceJump user, I do love this project. Thank you.
Just wonder of the letter can be made larger. It seems that only the font name can be changed, not the size.
Any hints?
Hi
Great tool !
I thought about a small improvement with the ability to filter window.
I have some windows I do not want to be focusable with easyfocus (tilda for instance). I would be great if I could give a filter criteria to easyfocus to ignore some windows and to not display a label on it.
Currently we only support single keys as labels ('a', 'b', 'c', ...). It would be great to also have key sequences for selecting windows. This is helpful when you have more windows than available keys.
Getting the following error running i3-easyfocus:
$ make clean debug
Cleaning
CC src/win.c
CC src/i3-easyfocus.c
CC src/ipc.c
CC src/xcb.c
CC src/map.c
Link i3-easyfocus
$ ./i3-easyfocus
./i3-easyfocus: error while loading shared libraries: libi3ipc-glib-1.0.so.0: cannot open shared object file: No such file or directory
but...
$ locate libi3ipc-glib-1.0.so.0
/usr/local/lib/libi3ipc-glib-1.0.so.0
/usr/local/lib/libi3ipc-glib-1.0.so.0.0.0
is there another location that i should be linking that lib to?
avy
, the equivalent mode to this in emacs, tries to use keys on the home row and under ones hand, if possible.
Its key order preference is something like: a s d f j k l g h ...
. This can very easily be achieved by reordering the keys in config.h
. Should this be the default?
I would like to package this tool for a Linux distro. It would be nice if there were a release.
Upon updating the system including xorgproto 2018.1-1 which replaces [bigreqsproto, compositeproto, damageproto, dmxproto, dri2proto, dri3proto, fixesproto, fontsproto, glproto, inputproto, kbproto, presentproto, printproto, randrproto, recordproto, renderproto, resourceproto, scrnsaverproto, videoproto, xcmiscproto, xextproto, xf86dgaproto, xf86driproto, xf86miscproto, xf86vidmodeproto, xineramaproto, xproto], easyfocus no longer functions.
The package detail can be found here: https://www.archlinux.org/packages/extra/any/xorgproto/
The error received is:
tunc@BEER ~/.i3/easyfocus$ ./i3-easyfocus
error initializing xcb
Any ideas on how to resolve this?
Thanks
When a window is reconfigured (resize, move), the label does not update its position.
This should be something easy to change, since every screen resolution will require a different size.
Select multiple windows until escape is pressed.
As already mentioned here, this should work for other window manager as well. Then have adapters for special behaviour (like the current i3 implementation).
I think I got all the libs installed (I checked with pkg-config --list-all and I got i3ipc-python working with i3ip-glib) but when compiling on Ubuntu i3-easyfocus:
Link i3-easyfocus
src/ipc.o: dans la fonction « con_to_window »:
ipc.c:(.text+0x27): référence indéfinie vers « g_object_get »
ipc.c:(.text+0x46): référence indéfinie vers « g_object_get »
ipc.c:(.text+0x6d): référence indéfinie vers « g_object_get »
ipc.c:(.text+0x8c): référence indéfinie vers « g_object_get »
ipc.c:(.text+0xc5): référence indéfinie vers « g_object_get »
ipc.c:(.text+0xe4): référence indéfinie vers « i3ipc_rect_free »
ipc.c:(.text+0x110): référence indéfinie vers « g_object_get »
ipc.c:(.text+0x137): référence indéfinie vers « g_object_get »
ipc.c:(.text+0x167): référence indéfinie vers « i3ipc_rect_free »
ipc.c:(.text+0x173): référence indéfinie vers « g_object_unref »
ipc.c:(.text+0x17f): référence indéfinie vers « i3ipc_rect_free »
src/ipc.o: dans la fonction « con_get_focused_id »:
ipc.c:(.text+0x1f9): référence indéfinie vers « g_object_get »
ipc.c:(.text+0x21f): référence indéfinie vers « g_list_free »
src/ipc.o: dans la fonction « con_get_visible_container »:
ipc.c:(.text+0x24f): référence indéfinie vers « g_object_get »
ipc.c:(.text+0x25b): référence indéfinie vers « i3ipc_con_descendents »
ipc.c:(.text+0x2ab): référence indéfinie vers « g_object_get »
ipc.c:(.text+0x2db): référence indéfinie vers « g_list_free »
src/ipc.o: dans la fonction « visible_windows »:
ipc.c:(.text+0x2f9): référence indéfinie vers « i3ipc_con_get_nodes »
ipc.c:(.text+0x301): référence indéfinie vers « g_list_copy »
ipc.c:(.text+0x311): référence indéfinie vers « i3ipc_con_get_floating_nodes »
ipc.c:(.text+0x319): référence indéfinie vers « g_list_copy »
ipc.c:(.text+0x330): référence indéfinie vers « g_list_concat »
ipc.c:(.text+0x373): référence indéfinie vers « g_object_get »
ipc.c:(.text+0x3ef): référence indéfinie vers « g_object_get »
ipc.c:(.text+0x502): référence indéfinie vers « g_free »
ipc.c:(.text+0x50e): référence indéfinie vers « g_list_free »
ipc.c:(.text+0x51a): référence indéfinie vers « g_list_free »
src/ipc.o: dans la fonction « visible_windows_on_curr_output »:
ipc.c:(.text+0x538): référence indéfinie vers « i3ipc_con_find_focused »
ipc.c:(.text+0x556): référence indéfinie vers « i3ipc_con_workspace »
src/ipc.o: dans la fonction « visible_windows_on_all_outputs »:
ipc.c:(.text+0x5ad): référence indéfinie vers « i3ipc_connection_get_workspaces »
ipc.c:(.text+0x5bd): référence indéfinie vers « i3ipc_con_workspaces »
ipc.c:(.text+0x612): référence indéfinie vers « i3ipc_con_get_name »
ipc.c:(.text+0x698): référence indéfinie vers « i3ipc_workspace_reply_free »
ipc.c:(.text+0x6a0): référence indéfinie vers « g_slist_free_full »
ipc.c:(.text+0x6ac): référence indéfinie vers « g_list_free »
src/ipc.o: dans la fonction « visible_windows_in_curr_con »:
ipc.c:(.text+0x6ca): référence indéfinie vers « i3ipc_con_find_focused »
ipc.c:(.text+0x6fb): référence indéfinie vers « g_object_get »
src/ipc.o: dans la fonction « ipc_visible_windows »:
ipc.c:(.text+0x738): référence indéfinie vers « i3ipc_connection_get_tree »
ipc.c:(.text+0x7a7): référence indéfinie vers « g_object_unref »
src/ipc.o: dans la fonction « ipc_focus_window »:
ipc.c:(.text+0x801): référence indéfinie vers « i3ipc_connection_command »
ipc.c:(.text+0x82f): référence indéfinie vers « i3ipc_command_reply_free »
ipc.c:(.text+0x837): référence indéfinie vers « g_slist_free_full »
ipc.c:(.text+0x847): référence indéfinie vers « i3ipc_command_reply_free »
ipc.c:(.text+0x84f): référence indéfinie vers « g_slist_free_full »
src/ipc.o: dans la fonction « ipc_init »:
ipc.c:(.text+0x877): référence indéfinie vers « i3ipc_connection_new »
ipc.c:(.text+0x893): référence indéfinie vers « g_error_free »
src/ipc.o: dans la fonction « ipc_finish »:
ipc.c:(.text+0x8b4): référence indéfinie vers « g_object_unref »
src/xcb.o: dans la fonction « request_failed »:
xcb.c:(.text+0x1f): référence indéfinie vers « xcb_request_check »
src/xcb.o: dans la fonction « grab_keycode_with_mod »:
xcb.c:(.text+0x8c): référence indéfinie vers « xcb_grab_key_checked »
src/xcb.o: dans la fonction « predict_text_width »:
xcb.c:(.text+0x1d1): référence indéfinie vers « xcb_query_text_extents »
xcb.c:(.text+0x1ed): référence indéfinie vers « xcb_query_text_extents_reply »
src/xcb.o: dans la fonction « draw_text »:
xcb.c:(.text+0x28d): référence indéfinie vers « xcb_generate_id »
xcb.c:(.text+0x2d9): référence indéfinie vers « xcb_create_gc_checked »
xcb.c:(.text+0x334): référence indéfinie vers « xcb_image_text_8_checked »
xcb.c:(.text+0x365): référence indéfinie vers « xcb_free_gc »
src/xcb.o: dans la fonction « xcb_create_text_window »:
xcb.c:(.text+0x3c4): référence indéfinie vers « xcb_generate_id »
xcb.c:(.text+0x47f): référence indéfinie vers « xcb_create_window_checked »
xcb.c:(.text+0x4c6): référence indéfinie vers « xcb_change_window_attributes »
xcb.c:(.text+0x4fa): référence indéfinie vers « xcb_map_window_checked »
xcb.c:(.text+0x529): référence indéfinie vers « xcb_flush »
xcb.c:(.text+0x538): référence indéfinie vers « xcb_poll_for_event »
src/xcb.o: dans la fonction « xcb_keysym_to_string »:
xcb.c:(.text+0x5c3): référence indéfinie vers « XKeysymToString »
src/xcb.o: dans la fonction « xcb_grab_keysym »:
xcb.c:(.text+0x628): référence indéfinie vers « xcb_get_setup »
xcb.c:(.text+0x63e): référence indéfinie vers « xcb_get_setup »
xcb.c:(.text+0x668): référence indéfinie vers « xcb_key_symbols_get_keysym »
src/xcb.o: dans la fonction « xcb_wait_for_key_event »:
xcb.c:(.text+0x6de): référence indéfinie vers « xcb_key_press_lookup_keysym »
xcb.c:(.text+0x718): référence indéfinie vers « xcb_wait_for_event »
src/xcb.o: dans la fonction « xcb_init »:
xcb.c:(.text+0x741): référence indéfinie vers « xcb_connect »
xcb.c:(.text+0x757): référence indéfinie vers « xcb_connection_has_error »
xcb.c:(.text+0x774): référence indéfinie vers « xcb_generate_id »
xcb.c:(.text+0x799): référence indéfinie vers « xcb_open_font_checked »
xcb.c:(.text+0x7be): référence indéfinie vers « xcb_disconnect »
xcb.c:(.text+0x7dc): référence indéfinie vers « xcb_query_font »
xcb.c:(.text+0x7f8): référence indéfinie vers « xcb_query_font_reply »
xcb.c:(.text+0x80e): référence indéfinie vers « xcb_get_setup »
xcb.c:(.text+0x816): référence indéfinie vers « xcb_setup_roots_iterator »
xcb.c:(.text+0x82c): référence indéfinie vers « xcb_key_symbols_alloc »
src/xcb.o: dans la fonction « xcb_finish »:
xcb.c:(.text+0x864): référence indéfinie vers « xcb_close_font »
xcb.c:(.text+0x873): référence indéfinie vers « xcb_key_symbols_free »
xcb.c:(.text+0x882): référence indéfinie vers « xcb_disconnect »
collect2: error: ld returned 1 exit status
make: *** [i3-easyfocus] Erreur 1
We could even have urgent/focused windows labelled with a different background color :)
This is a nice tool for jumping tabs. But there are scenarios that "Ctrl+tab/Ctrl+Shift+tab" fits better.
Configure a modifier, so all bound keybindings use this modifier. This allows to always leave easyfocus open with --rapid
and then use it for focus together with a specific modifier like, e.g., alt
or super+shift
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.