add mcrcon aliases
This commit is contained in:
parent
54c863c4a7
commit
42edb52b80
2 changed files with 19 additions and 3 deletions
|
@ -721,9 +721,9 @@ window:
|
||||||
#
|
#
|
||||||
# If the same trigger is assigned to multiple actions, all of them are executed
|
# If the same trigger is assigned to multiple actions, all of them are executed
|
||||||
# in the order they were defined in.
|
# in the order they were defined in.
|
||||||
#key_bindings:
|
key_bindings:
|
||||||
#- { key: Paste, action: Paste }
|
- { key: Paste, action: Paste }
|
||||||
#- { key: Copy, action: Copy }
|
- { key: Copy, action: Copy }
|
||||||
#- { key: L, mods: Control, action: ClearLogNotice }
|
#- { key: L, mods: Control, action: ClearLogNotice }
|
||||||
#- { key: L, mods: Control, mode: ~Vi|~Search, chars: "\x0c" }
|
#- { key: L, mods: Control, mode: ~Vi|~Search, chars: "\x0c" }
|
||||||
#- { key: PageUp, mods: Shift, mode: ~Alt, action: ScrollPageUp, }
|
#- { key: PageUp, mods: Shift, mode: ~Alt, action: ScrollPageUp, }
|
||||||
|
|
16
.xonshrc
16
.xonshrc
|
@ -75,6 +75,20 @@ def _alias():
|
||||||
else:
|
else:
|
||||||
print(alias + " =", " ".join(aliases[alias]))
|
print(alias + " =", " ".join(aliases[alias]))
|
||||||
|
|
||||||
|
def _mcrcon(args: list):
|
||||||
|
if p"~/.mcrcon".exists():
|
||||||
|
source "~/.mcrcon"
|
||||||
|
else:
|
||||||
|
raise FileNotFoundError("~/.mcrcon")
|
||||||
|
$(mcrcon @(" ".join(args)))
|
||||||
|
|
||||||
|
def _mcterm():
|
||||||
|
if p"~/.mcrcon".exists():
|
||||||
|
source "~/.mcrcon"
|
||||||
|
else:
|
||||||
|
raise FileNotFoundError("~/.mcrcon")
|
||||||
|
mcrcon -t
|
||||||
|
|
||||||
# aliases
|
# aliases
|
||||||
aliases.update({
|
aliases.update({
|
||||||
'bwg': _bwc,
|
'bwg': _bwc,
|
||||||
|
@ -83,6 +97,8 @@ aliases.update({
|
||||||
'config': '/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME',
|
'config': '/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME',
|
||||||
'debug': _debug,
|
'debug': _debug,
|
||||||
'ls': 'ls -alhs --color=auto',
|
'ls': 'ls -alhs --color=auto',
|
||||||
|
'mc': _mcrcon,
|
||||||
|
'mct': _mcterm,
|
||||||
':q': 'exit',
|
':q': 'exit',
|
||||||
'owo': 'echo uwu',
|
'owo': 'echo uwu',
|
||||||
'ensure-tmux': _ensure_tmux,
|
'ensure-tmux': _ensure_tmux,
|
||||||
|
|
Loading…
Reference in a new issue