summaryrefslogtreecommitdiff
path: root/sliceweasel
blob: f9df2c8d906fbf6a8250d9822b4b36cec86f85d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh
. sliceweasel.lib.sh

set -e
IO_ROOT_DIR=$HOME/.cache/mozilla/firefox/
[ -d "$IO_ROOT_DIR" ]
[ "$(id -un)" = 0 ] && AS_ROOT= || AS_ROOT='sudo --'

group=/sys/fs/cgroup/user.slice/user-$(id -u).slice/firefox
join_group "$group"
set_max_ratio "$group" memory 1/2
set_max_ratio "$group" io 7/10
exec firefox "$@"