summarylogtreecommitdiffstats
path: root/gamescope.install
blob: c457e086d9805bd9c9391f5963784cc10405d005 (plain)
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
all_off="$(tput sgr0)"
bold="${all_off}$(tput bold)"
blue="${bold}$(tput setaf 4)"
yellow="${bold}$(tput setaf 3)"

msg_blue() {
    printf "${blue}==>${bold} $1${all_off}\n"
}

note() {
    printf "${blue}==>${yellow} Note:${bold} $1${all_off}\n"
}

do_setcap() {
  note "${all_off}\"No CAP_SYS_NICE, falling back to regular-priority compute and threads.\""
  msg_blue 'Use the following command to resolve the above output maybe print by Gamescope, but this probably will cause stutters.'
  msg_blue "${all_off}setcap cap_sys_nice=eip \"\$(realpath \"\$(which gamescope)\")\""
}

post_install() {
  do_setcap
}

post_upgrade() {
  do_setcap
}