fiskhest / sxhkd-helper-menu Goto Github PK
View Code? Open in Web Editor NEWParse and display sxhkd keybindings for piping to fzf, rofi, dmenu, ag etc.
License: BSD 2-Clause "Simplified" License
Parse and display sxhkd keybindings for piping to fzf, rofi, dmenu, ag etc.
License: BSD 2-Clause "Simplified" License
sxhkd
supports multiple expansions, like the following:
super + {_,shift + }{1-9,0}
bspc {desktop -f, node -d} ^{1-9,10}
which, as a first "intermediate" expansion might resemble the following pair:
super + {1-9,0}
bspc desktop -f ^{1-9,10}
super + shift + {1-9,0}
bspc node -d ^{1-9,10}
Which this project is then typically capable of handling. But the first form, having compounding expansions doesn't seem to be supported. This project does seem like it performs the first-order expansion currently, but not any subsequent ones
Thanks for this helper menu, exactly what I was looking for.
I had this config where the $id var was between curly braces
# Move and follow window to desktop until 11
ctrl + super + shift + {1-9,0,minus}
id=$(bspc query -N -n); bspc node -d ^{1-9,0,11}; bspc node -f ${id}
This breaks hkhelper.py:
Traceback (most recent call last):
File "/home/s/tmp/hkhelper.py", line 285, in <module>
main()
File "/home/s/tmp/hkhelper.py", line 267, in main
config = sxhkd_helper(args.file, args.descriptor, args.category_descriptor)
File "/home/s/tmp/hkhelper.py", line 22, in __init__
self.keybinds = self._get_keybinds()
File "/home/s/tmp/hkhelper.py", line 38, in _get_keybinds
for parsed_keybind in self._parse_keybinds():
File "/home/s/tmp/hkhelper.py", line 77, in _parse_keybinds
unchained_lines = self._unchain_lines(lines)
File "/home/s/tmp/hkhelper.py", line 110, in _unchain_lines
return_lines.append(self._unchain(chain.group(0), line, index))
File "/home/s/tmp/hkhelper.py", line 147, in _unchain
end_of_range = int(re.sub(r',.*', '', copy_keys[-1]))
ValueError: invalid literal for int() with base 10: 'f ${id'
I just removed the curlies from my config as a workaround.
That's me again :D
This doesn't get expanding correctly:
{XF86Display,super + m}
$HOME/.config/rofi/monitor.sh
Instead of display super + m
, it shows superm
here.
Can you reproduce?
Cheers!
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.