summaryrefslogtreecommitdiffstats
path: root/.config/xsuspender.conf
blob: c514998077764c2ddc262c54387fd8803958e928 (plain) (blame)
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# Configuration file for xsuspender.
#
# Sections represent rules windows are matched with.
# Find full documentation in xsuspender(1) manual.
#
#     [Example]
#     # Window matching rules. Some can be left blank.
#     # Intersection of non-blanks applies.
#     match_wm_class_contains = SomeApplication
#     match_wm_class_group_contains = ...
#     match_wm_name_contains = Part of Some Window Title
#
#     # Seconds to wait before suspending after window loses focus.
#     suspend_delay = 10
#
#     # Resume suspended process every this many seconds …
#     resume_every = 50
#
#     # … for this many seconds.
#     resume_for = 5
#
#     # Before suspending, execute this shell script. If it fails,
#     # abort suspension.
#     exec_suspend = echo "suspending window $XID of process $PID"
#
#     # Before resuming, execute this shell script. Resume the
#     # process regardless script failure.
#     exec_resume = echo resuming ...
#
#     # Whether to send SIGSTOP / SIGCONT signals or not. If false,
#     # just the exec_* scripts are run.
#     send_signals = true
#
#     # Also suspend descendant processes that match this regex.
#     suspend_subtree_pattern = .
#
#     # Whether to apply the rule only when on battery power.
#     only_on_battery = true
#
#     # Whether to auto-apply rules when switching to battery
#     # power even if the window(s) didn't just lose focus.
#     auto_suspend_on_battery = true
#
#     # Limit CPU consumption for this factor when on battery power.
#     # Value 1 means 50% decrease, 2 means 66%, 3 75% etc.
#     downclock_on_battery = 0
#
#
# Values set in the Default section are inherited and overridden
# by other sections below.

[Default]
suspend_delay = 5
resume_every = 50
resume_for = 5
send_signals = true
only_on_battery = true
auto_suspend_on_battery = true
downclock_on_battery = 0

# Preset configuration for some common software.

[Chromium]
suspend_delay = 10
match_wm_class_contains = chromium
suspend_subtree_pattern = chromium

[Firefox]
suspend_delay = 10
match_wm_class_contains = Navigator
match_wm_class_group_contains = Firefox
suspend_subtree_pattern = \/(firefox|plugin-container)

[JetBrains IDEs]
match_wm_class_group_contains = jetbrains-
downclock_on_battery = 1

[VirtualBox]
match_wm_class_contains = VirtualBox
match_wm_name_contains = - Oracle VM
exec_suspend = VBoxManage controlvm "$(ps -o args= -q $PID | sed -E 's/.*--startvm ([^ ]+).*/\1/')" pause
exec_resume  = VBoxManage controlvm "$(ps -o args= -q $PID | sed -E 's/.*--startvm ([^ ]+).*/\1/')" resume
send_signals = false
resume_every = 0
only_on_battery = false
downclock_on_battery = 1

[qBittorrent]
match_wm_class_contains = qbittorrent
resume_every = 5
resume_for = 1
suspend_delay = 60

[Pidgin]
match_wm_class_contains = Pidgin
resume_every = 1
resume_for = 1
downclock_on_battery = 2

[Clementine]
match_wm_class_contains = clementine
downclock_on_battery = 1
send_signals = false

[Rambox]
resume_every = 30
match_wm_class_contains = rambox
suspend_subtree_pattern = .*

#[MyApplication]
#match_wm_name_contains =
#match_wm_class_contains =
#match_wm_class_group_contains =
#suspend_delay = 10
#resume_every = 50
#resume_for = 5
#exec_suspend =
#exec_resume =
#suspend_subtree_pattern =
#send_signals = true
#only_on_battery = true
#auto_suspend_on_battery = true
#downclock_on_battery = 0
remember that computers suck.