Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VIM-like marks (mark/goto) #8319

Open
stablestud opened this issue Aug 29, 2024 · 2 comments
Open

VIM-like marks (mark/goto) #8319

stablestud opened this issue Aug 29, 2024 · 2 comments
Labels
i3-compat Sway doesn't match i3's behavior

Comments

@stablestud
Copy link

stablestud commented Aug 29, 2024

VIM-like marks as described in i3wm docs
do not work as sway has no i3-input counterpart.

While the ground functionality exists for adding marks and jumping to them,
the i3-input is not available thus its not possible in sway.

To my knowledge there is currently no utility which reads a single key and executes a command based on it just like i3-input did. See the examples in the i3wm docs

Are others also having interest in that VIM-like behavior? I currently really miss that in sway.

@stablestud stablestud added the i3-compat Sway doesn't match i3's behavior label Aug 29, 2024
@mcepl
Copy link

mcepl commented Sep 3, 2024

https://github.com/ilya-zlobintsev/sway-marker ?

@ArijanJ
Copy link

ArijanJ commented Oct 11, 2024

You can use anything else, like zenity for example:

i3-goto-mark

#!/usr/bin/env bash
# In the i3 window manager, goes to a mark provided by zenity

# No mark provided as argumentt
if [[ $# -lt 1 ]] ; then
    MARK=$(zenity --title 'i3-goto-mark' --text 'Go to which mark?' --entry)
else
    MARK=$1
fi

i3-msg "[con_mark=$MARK] focus"

i3-mark

#!/usr/bin/env bash
# Mark a window in the i3 window manager using a user-provided string through zenity

# No mark provided as argument
if [[ $# -lt 1 ]] ; then
    MARK=$(zenity --title 'i3-mark' --text 'Mark the current window as what?' --entry)
    # Wait for zenity to go away (Optional)
    # sleep .1
else
    MARK=$1
fi

i3-msg "mark $MARK"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i3-compat Sway doesn't match i3's behavior
Development

No branches or pull requests

3 participants