Git Product home page Git Product logo

Comments (13)

aaronjanse avatar aaronjanse commented on September 13, 2024 2

I'm one or two days away from config files being implemented 👍

from 3mux.

hugohabicht01 avatar hugohabicht01 commented on September 13, 2024 1

I doubt that a pattern with esc would be a good idea, because many people use vim and then it would result in loads of conflicts. I would suggest further expanding the tmux compatibility and adding a config file, so that users can remap keys themselves. This would probably resolve this issue the best, because most people using i3 don't have default bindings, mostly they customized them a bit. If you have a config file you can make 3mux work together with you configuration of i3.

from 3mux.

aaronjanse avatar aaronjanse commented on September 13, 2024 1

I would automatically generate a config file on first run

Oh, perfect. I'll make sure to include documentation in the (small) generated config file to make things easy.

perhaps with a commandline option for a non-default location

Sure, and I'll make sure to use $XDG_CONFIG_HOME by default. Maybe hiding the prompt should simply ask the user if they want to hide it forever? I can't imagine anyone using the bar past their first few minutes of moving panes around for fun.

Thanks for the feedback!

from 3mux.

aaronjanse avatar aaronjanse commented on September 13, 2024 1

Is this mode config syntax too confusing?

add-pane  = ['Alt+N', 'Alt+Enter']
kill-pane = ['Alt+Shift+Q']

toggle-fullscreen = ['Alt+Shift+F']
toggle-search = ['Alt+/']

show-help = ['Alt+Shift+?']

move-pane-up    = ['Alt+Shift+Up',    'Alt+Shift+K']
move-pane-down  = ['Alt+Shift+Down',  'Alt+Shift+J']
move-pane-left  = ['Alt+Shift+Left',  'Alt+Shift+H']
move-pane-right = ['Alt+Shift+Right', 'Alt+Shift+L']

move-selection-up    = ['Alt+Up',    'Alt+K']
move-selection-down  = ['Alt+Down',  'Alt+J']
move-selection-left  = ['Alt+Left',  'Alt+H']
move-selection-right = ['Alt+Right', 'Alt+L']

# NAME has no meaning apart from what may be displayed in a status bar
# [modes.NAME]
# mode-starter = ['KEYCODE'] # type KEYCODE to start this mode
# sticky = STICKY
# # if STICKY:
# #   stay in this mode until we see an unrecognized key
# # else:
# #   exit this mode after the first keypress
#
# # do ACTION when we see KEYCODE while in this mode
# ACTION = ['KEYCODE']

[modes.resize]
mode-starters = ['Alt+R']
sticky = true

resize-up    = ['Up',    'j']
resize-down  = ['Down',  'k']
resize-left  = ['Left',  'h']
reisze-right = ['Right', 'l']

[modes.tmux]
mode-starters = ['Ctrl+B']
sticky = false

split-pane-vert  = ['%']
split-pane-horiz = ['"']
move-pane-left   = ['{']
move-pane-right  = ['}']

from 3mux.

aaronjanse avatar aaronjanse commented on September 13, 2024 1

Fixed in v0.3.0

from 3mux.

aaronjanse avatar aaronjanse commented on September 13, 2024

This is tough. I'm pretty sure ctrl+arrow bindings are already used by many shells.

But I do want 3mux to work on i3. Do you have any ideas for keybindings? Maybe a vim-like escape-then-shortcut pattern?

from 3mux.

pepa65 avatar pepa65 commented on September 13, 2024

Configurable key bindings are a must for any kind of adoption beyond the inner circle I think. Will the config files allow for that?

from 3mux.

aaronjanse avatar aaronjanse commented on September 13, 2024

from 3mux.

pepa65 avatar pepa65 commented on September 13, 2024

For me the help bar is something I'll immediately turn off, but that's me. I am more interested in the config file, and if it's easy to edit, great! What format were you thinking? TOML is easy, fairly small implementations in golang, but there might be much smaller ones that suffice.

from 3mux.

pepa65 avatar pepa65 commented on September 13, 2024

There is gopkg.in/go-ini/ini.v0 (and there is also a more extensive v1...)

from 3mux.

aaronjanse avatar aaronjanse commented on September 13, 2024

TOML is easy, fairly small implementations in golang, but there might be much smaller ones that suffice.

I'd love if 3mux could use TOML. The config would probably look something like this (with lots of leniency for shortcut capitalization)

new-pane = ['Alt+N', 'Alt+Enter']

[move-pane]
up = ['Alt+Shift+Up']
down = ['Alt+Shift+Down']
left = ['Alt+Shift+Left', 'Ctrl+B {']
right = ['Alt+Shift+Right', 'Ctrl+B }']

If you have any suggestions, I'd love to hear.

For me the help bar is something I'll immediately turn off, but that's me.

I definitely want to cater to people who don't want the help bar.

To generate the config, you'd either do something like 3mux --generate-config or run 3mux and hide the help bar (Alt+\?) which would prompt the user to create a config. This is my prototype so far:

image

Any thoughts?

from 3mux.

pepa65 avatar pepa65 commented on September 13, 2024

Looks reasonable! I would automatically generate a config file on first run (perhaps with a commandline option for a non-default location), If you want to offer the option of not automatically create it, users can use a commandline option for that.

from 3mux.

pepa65 avatar pepa65 commented on September 13, 2024

Looks great to me!

from 3mux.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.