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

Implementing an Uberischt widget for displaying inline docstrings in skhdrc files #110

Open
strazto opened this issue Feb 11, 2020 · 6 comments
Labels

Comments

@strazto
Copy link

strazto commented Feb 11, 2020

Hi, I'm planning on writing a simple widget that parses inline docstrings (Probably regular comments with a leading character to indicate its a docstring, like #' or something).

I was wondering if, once done, you'd be open to linking to it from the readme?
Also, I was wondering if you had suggestions for the syntax, I was thinking something like:

#' ${cmd} + alt - 1 : Go to workspace 1
#' ${cmd} + alt - n : Go to workspace n

skhd/examples/skhdrc

Lines 170 to 179 in 01722fc

cmd + alt - 1 : chunkc tiling::desktop --focus 1
cmd + alt - 2 : chunkc tiling::desktop --focus 2
cmd + alt - 3 : chunkc tiling::desktop --focus 3
cmd + alt - 4 : chunkc tiling::desktop --focus 4
cmd + alt - 5 : chunkc tiling::desktop --focus 5
cmd + alt - 6 : chunkc tiling::desktop --focus 6
cmd + alt - 7 : chunkc tiling::desktop --focus 7
cmd + alt - 8 : chunkc tiling::desktop --focus 8
cmd + alt - 9 : chunkc tiling::desktop --focus 9
cmd + alt - 0 : chunkc tiling::desktop --focus 10

Displaying as:

⌘ + alt - 1 : Go to workspace 1
⌘ + alt - n : Go to workspace n

Or something, where cmd is escaped one way or another and automatically parsed to ⌘

& perhaps following markdown syntax in all other regards.

@koekeishiya
Copy link
Owner

Is the intention for this to be some kind of "cheat-sheet" to quickly look up configured binds and what they do?

@strazto
Copy link
Author

strazto commented Feb 12, 2020

Is the intention for this to be some kind of "cheat-sheet" to quickly look up configured binds and what they do?

More or less

@deekue
Copy link

deekue commented Jun 14, 2020

looking to do the same thing.

I borrowed the format from Regolith's Remontoire and built an initial skhdrc for Yabai(still a WIP).

Haven't looked at writing the Uberischt widget yet.

@strazto
Copy link
Author

strazto commented Jun 14, 2020

looking to do the same thing.

I borrowed the format from Regolith's Remontoire and built an initial skhdrc for Yabai(still a WIP).

Haven't looked at writing the Uberischt widget yet.

Yeah, regoliths implementation is great- looking forward to seeing what you do!

@deekue
Copy link

deekue commented Jun 15, 2020

first pass is clunky but it works.

it'd be better to get the current config from skhd itself (eg. Remontoire makes an IPC to i3). It would also cover the case of any .load statements

something like
skhd --dump_config

@deekue
Copy link

deekue commented Jul 7, 2020

I changed tack and refactored skhd_parse.py to output HTML directly or a base64 encoded data: URI, which can be passed to Google Chrome.

# ## Launch // This Dialog // <fn><shift> ? ##
fn + shift - 0x2C : open -na "Google Chrome" --args --new-window --app="$(skhd_parse.py -f data)"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants