-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yml
61 lines (54 loc) · 2.71 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
### CONFIGURATION
## These are settings used in the script.
## They can all be used on the command-line, with the same name.
config:
# Maximum width/columns and height/lines of Curses window inside terminal.
# Will automatically resize if terminal window is smaller.
width: 47
height: 7
# Shell used to execute keybinding commands, set to 'false' to execute command directly.
shell: '/bin/bash'
# Padding of input for each line.
text-padding: 4
# Execute command in background.
exec-background: 'true'
# Don't draw borders when set to 'true'.
borderless: 'false'
# Redirect stdout and stderr of executed command;
# only applicable when command is run in background.
cmd-stdout: '@SHORTSTROKES_ROOT/.out/cmd_stdout'
cmd-stderr: '@SHORTSTROKES_ROOT/.out/cmd_stderr'
### CONSTANTS
## Variables that can be used with '@' inside this config.
## Constants can be used anywhere in your config, except in this 'constants' section.
## They can also be used in options from the command-line.
constants:
terminal: 'termite'
browser: 'firefox'
editor: 'vim'
scripts: '@SHORTSTROKES_ROOT/scripts'
### KEYBINDINGS
## Here you can define your keybindings.
## The keystroke combination to activate them is their key,
## and their value is the shell script that will be executed.
keybindings:
## BASE
q: 'true' # quit ShortStrokes program, basically do nothing
## OPEN applications
ot: '@terminal' # Open terminal emulator
of: '@browser --new-window' # Open browser
## OPEN web pages
Od: '@browser https://duckduckgo.com/' # Open DuckDuckGo
Ow: '@browser https://wiki.archlinux.org/' # Open Arch Linux Wiki
## EDIT (config) files
ee: '@scripts/run.rb edit "~/.config/shortstrokes/config.yml" --terminal "@terminal" --shell "@SHELL" --editor "@editor"' # Edit config file
eE: '@scripts/run.rb edit "@SHORTSTROKES_ROOT/config.yml" --terminal "@terminal" --shell "@SHELL" --editor "@editor"' # Edit THIS config file
eb: '@scripts/run.rb edit "~/.bashrc" --terminal "@terminal" --shell "@SHELL" --editor "@editor"' # Edit bashrc
ev: '@scripts/run.rb edit "~/.vimrc" --terminal "@terminal" --shell "@SHELL" --editor "@editor"' # Edit vimrc
# This repo includes a scripts directory which currently contains one script:
# scripts/run.rb
# It's for easier use of running commands or edditing files
# in specific shell in new terminal emulator
# so you don't need to play around with the weird syntax and
# escape sequences when writing the shell commands yourself.
# Check scripts/run.rb --help for some more info.