Skip to content

Updated binds with descriptions, modified bind parse logic#1605

Closed
hurlbutt wants to merge 3 commits into
mylinuxforwork:lua-migrationfrom
hurlbutt:keybind-descriptions
Closed

Updated binds with descriptions, modified bind parse logic#1605
hurlbutt wants to merge 3 commits into
mylinuxforwork:lua-migrationfrom
hurlbutt:keybind-descriptions

Conversation

@hurlbutt
Copy link
Copy Markdown
Contributor

Description

This change makes bind descriptions a property of the bind object instead of a lua comment. In addition, created a (temporary) new script file for keybind descriptions that uses hyprctl binds and jq to create the keybind string.

Changes

  • Improved
  • Bug Fixes
  • Feature
  • Documentation
  • Other

How Has This Been Tested?

  • Tested on Arch Linux/Based Distro.
  • Tested on Fedora Linux/Based Distro.
  • Tested on openSuse.

Checklist

Please ensure your pull request meets the following requirements:

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my code.
  • I have commented on my code, particularly in hard-to-understand areas.
  • My changes do not introduce new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have made corresponding changes to the documentation
  • New and existing unit tests pass locally with my changes.

@mylinuxforwork
Copy link
Copy Markdown
Owner

Can you check the latest commit to the lua-migration branch? I have added already the description to all binds. Will update today the rofi keybinding overview script.

@hurlbutt
Copy link
Copy Markdown
Contributor Author

@mylinuxforwork - I can look through them to see if there are any functional differences and resolve them. Style-wise do you prefer just a single space between parameters or do you want the parameters indented to match vertically?

Single space

hl.bind(mainMod .. " + B", hl.dsp.exec_cmd("~/.config/ml4w/settings/browser.sh"), { description = "Open the browser" })
hl.bind(mainMod .. " + E", hl.dsp.exec_cmd("~/.config/ml4w/settings/filemanager"), { description = "Open the filemanager" })
hl.bind(mainMod .. " + CTRL + E", hl.dsp.exec_cmd("~/.config/ml4w/settings/emojipicker.sh"), { description = "Open the emoji picker" })
hl.bind(mainMod .. " + CTRL + C", hl.dsp.exec_cmd("~/.config/ml4w/settings/calculator.sh"), { description = "Open the calculator" })

Vertically aligned

hl.bind(mainMod .. " + B", hl.dsp.exec_cmd("~/.config/ml4w/settings/browser.sh"),            { description = "Open the browser" })
hl.bind(mainMod .. " + E", hl.dsp.exec_cmd("~/.config/ml4w/settings/filemanager"),           { description = "Open the filemanager" })
hl.bind(mainMod .. " + CTRL + E", hl.dsp.exec_cmd("~/.config/ml4w/settings/emojipicker.sh"), { description = "Open the emoji picker" })
hl.bind(mainMod .. " + CTRL + C", hl.dsp.exec_cmd("~/.config/ml4w/settings/calculator.sh"),  { description = "Open the calculator" })

@mylinuxforwork
Copy link
Copy Markdown
Owner

I have implemented both already in the lua-migration branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants