-
Notifications
You must be signed in to change notification settings - Fork 24
/
instantutils.sh
executable file
·77 lines (72 loc) · 2.1 KB
/
instantutils.sh
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
#!/bin/bash
# wrapper script for other installation scripts
USAGE="usage: instantutils [action]
root execute postinstall steps for root owned files
user execute postinstall steps for user owned files
repo add instantOS repos to the system
alttab launch alttab with instantOS theming
default create symlinks for default applications
open open default application \$2
dotfiles restore deleted default dotfiles
conky launch conky with instantOS tooltips
rangerplugins install instantOS ranger plugins
help show this message"
if [ -z "$1" ]; then
echo "$USAGE"
exit
fi
case "$1" in
root)
sudo /usr/share/instantutils/rootinstall.sh
;;
default)
/usr/share/instantutils/setup/defaultapps
;;
alttab)
alttab -fg "#ffffff" -bg "#121212" -frame "#89B3F7" -d 0 -s 1 -t 128x150 -i 127x64 -w 1 -vp pointer &
;;
user)
/usr/share/instantutils/userinstall.sh
;;
repo)
/usr/share/instantutils/repo.sh
;;
open)
if [ -z "$2" ]; then
echo "usage: instantutils open defaultappname"
exit
fi
if ! [ -e ~/.config/instantos/default/"$2" ]; then
instantutils default
chmod +x ~/.config/instantos/default/"$2"
fi
APP="$2"
shift 2
~/.config/instantos/default/"$APP" "$@"
;;
dotfiles)
imosid apply /usr/share/instantdotfiles/dotfiles
;;
rangerplugins)
cd || exit 1
mkdir instantos &>/dev/null
echo "installing ranger plugins"
mkdir -p ~/.config/ranger/plugins
cp -r /usr/share/rangerplugins/* ~/.config/ranger/plugins/
if [ "$2" = '-f' ]
then
cat /usr/share/instantdotfiles/dotfiles/ranger/commands.py > ~/.config/ranger/commands.py
cat /usr/share/instantdotfiles/dotfiles/ranger/rc.conf > ~/.config/ranger/rc.conf
fi
;;
conky)
shuf /usr/share/instantwidgets/tooltips.txt | head -1 >~/.cache/tooltip
conky -c /usr/share/instantwidgets/tooltips.conf &
;;
hide)
/usr/share/instantutils/setup/hideapps
;;
*)
echo "$USAGE"
;;
esac