-
Notifications
You must be signed in to change notification settings - Fork 1
/
qubes-terminal-hotkeys.conf
86 lines (74 loc) · 2.96 KB
/
qubes-terminal-hotkeys.conf
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!/bin/bash
#
# Configuration file for qubes-terminal-hotkeys.
#
# Recommended location: /etc/qubes-terminal-hotkeys.conf
#
# This is a bash file allowing you to add your own code.
#user hotkey/script name --> action to execute
#Available actions: see the qubes-terminal-hotkeys file for action_* and maction_* functions
#maction_* functions support multiple VMs as parameters, action_* functions only a single VM and further non-VM parameters.
#Feel free to write your own actions inside your configuration!
#Changing this array will require a re-installation to reflect the changes.
declare -A HOTKEYS=(
[q]="action_run"
[r]="maction_run"
[rr]="maction_restart_run"
[b]="maction_start"
[br]="maction_restart"
[s]="maction_shutdown"
[m]="action_mute"
[u]="action_unmute"
#[k]="maction_kill"
#[p]="maction_pause"
#[nv]="maction_set_pref netvm sys-fw-vpn" #`nv m` would set the netvm of `e-mail` to `sys-fw-vpn`
#[nr]="maction_set_pref netvm --default" #`nr m` would reset the netvm of `e-mail` to the global default
)
#associative array for VM short names
#VM short name (case insensitive - always use lower case!) -> VM full name (case sensitive)
#A non-existent mapping will resolve to the input (hopefully a VM name).
#Recommendation: use the first letter or if it's not available anymore, the second.
declare -A VM_SHORT_NAMES=(
[d]="surfing-dvm"
[surfing]="surfing-dvm"
[net]="sys-net"
[firewall]="sys-firewall"
[fw]="sys-firewall"
[deb]="debian-11"
[debian]="debian-11"
[u]="sys-usb"
[usb]="sys-usb"
[m]="e-mail"
[mail]="e-mail"
)
#name to represent dom0
DOM_ZERO_ID="dom0"
###################### action_run ######################
#default terminal to be re-used in the other global variables (no other purpose)
VM_DEFAULT_TERMINAL="xfce4-terminal"
VM_DEFAULT_TERMINAL_CMD="bash -ic 'command -v $VM_DEFAULT_TERMINAL &> /dev/null && $VM_DEFAULT_TERMINAL || xterm'"
#associative array for short commands
#short command -> full command
declare -A COMMANDS=(
[t]="$VM_DEFAULT_TERMINAL_CMD"
[f]="firefox"
[c]="chromium"
)
#associative array defining default commands per VM
#VM full name (case sensitive) -> default command
#if you don't want to start the $VM_DEFAULT_COMMAND in that VM, you need to set something different here (or make sure it is blank so that the VM is just started by default and nothing is executed)
declare -A VM_DEFAULT_COMMANDS=(
["e-mail"]="thunderbird"
["surfing-dvm"]="${COMMANDS["f"]}"
)
#associative array defining commands to execute in dom0 before executing the real command for the VM
#syntax: [VM]_[command] --> [pre-command] or [VM] --> [pre-command] depending on whether the pre-command should always be executed for the given VM or only for that specific command
declare -A DOM0_PRE_COMMANDS=(
)
#default command for VMs
VM_DEFAULT_COMMAND="$VM_DEFAULT_TERMINAL_CMD"
#default command to execute in dom0
DOM_ZERO_DEFAULT_COMMAND="$VM_DEFAULT_TERMINAL_CMD"
#command to execute for dom0 shutdown
#leave it empty to disable it
DOM_ZERO_SHUTDOWN=""