summaryrefslogtreecommitdiff
path: root/raveos-gnome-theme/raveos-gnome-theme.install
blob: 796b2b48a09d1843310c6bd789a9e7106f541578 (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
27
28
29
30
31
32
33
34
_update_system_configs() {
    if command -v dconf >/dev/null 2>&1; then
        dconf update >/dev/null 2>&1 || true
    fi
    if command -v glib-compile-schemas >/dev/null 2>&1; then
        glib-compile-schemas /usr/share/glib-2.0/schemas >/dev/null 2>&1 || true
    fi
}

_enable_apply_service() {
    if command -v systemctl >/dev/null 2>&1; then
        systemctl enable raveos-gnome-theme-apply.service >/dev/null 2>&1 || true
    fi
}

_restart_idle_blank() {
    pkill -f '/usr/lib/raveos-gnome-theme/idle-blank' >/dev/null 2>&1 || true
}

post_install() {
    _update_system_configs
    _enable_apply_service
    _restart_idle_blank
}

post_upgrade() {
    _update_system_configs
    _enable_apply_service
    _restart_idle_blank
}

post_remove() {
    _update_system_configs
}