Skip to content

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WitchScript

Run any script you'd like with the least amount of keystrokes

WitchScript

Motive

I like the keybinds that which-key.nvim allows you to have, and I wanted to have that as a script runner.
I want to branch away from having to remember all my keybinds, and have more real estate to add keybinds, and more control over what I can do.
"Witch" comes from WHICH-key, and choosing "Which Script" to run, and because I want it to feel like we are witches, therefore the name.

Installation

Install WitchScript with go:

go install github.com/dee9c-git/witchscript@latest

Usage

Run WitchScript with witchscript. The first run gives you a feel of what it's like, and creates a starting config file for you.
(You should probably bind witchscript to a key in some way later on.)

WitchScript uses a TOML config file located at your config directory. That is probably:

  • Linux: ~/.config/witchscript/config.toml
  • Windows: C:\Users\<username>\AppData\Roaming\witchscript\config.toml
  • MacOS: ~/Library/Application Support/witchscript/config.toml

Here's the config you'll get on startup:

[main] # Base settings
height = 600                                 # Height of the window
width = 600                                  # Width of the window
title_size = 35                              # Size of the title
title_offset_x = 30                          # Offset of the title from the left
title_offset_y = 530                         # Offset of the title from the top
title_color = '#ffffff'                      # Color of the title
text_size = 30                               # Size of the text
text_offset_x = 30                           # Offset of the text from the left
text_offset_y = 32                           # Offset of the text from the top
text_color = '#d7c9ff'                       # Color of the text
line_count = 10                              # Number of lines to show
line_height = 38                             # Height of each line
background = '#321a57'                       # Background color
title_parse_method = '> %s'                  # Method to parse the title (one %s required)

# Method to parse the text (two %s required, the first one stands for giving it at least 4 spaces aligned to the left)
text_parse_method = '%-4s   %s'

[[groups]] # Groups for keys
keys = "t"                                  # Keys for the group, in this case "t" stands for "test", and so "ta", "tb" cculd be all test related.
desc = "󰙅 Test"                             # Description of the group

[[actions]]
keys = "tw"                                 # Keys to trigger the action
exec = "notify-send 'Testing WitchScript!'" # Command to run
desc = "󰙨 Test WitchScript"                 # Description of the action

I recommend getting some cool icons from Nerd Fonts here! Because it's a script runner, you can do almost anything you want, so long as it's a shell command. Run a game, open an app, run a script, shut down your computer, anything!

Contributing

Open an issue if you have some suggestions!

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages