blob: af831777c494e2e2bb462dd1cf00e55611162893 (
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
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
|
#!/bin/sh
#interactiveopt() {
# # Usage: interactiveopt "options" "prompt"
# echo "$1" | nl -s': ' 1>&2
# # Parse user input
# read -p "$2" choices 1>&2 \
# && choices="$(echo $choices | cut -d' ' -f1-)"
# for choice in $choices; do
# case "$choice" in
# [0-9]*) opt="$opt $(echo "$1" | head -"$(echo $choice | tr -cd '[:digit:]')" | tail -1)";;
# *) echo "Invalid option \"$opt\"" 1>&2 ;;
# esac
# done
# echo "$opt"
#}
# Open as root in pcmanfm
pcmanfmconf() {
pcmanfmroot=~/.local/share/file-manager/actions
mkdir -p $pcmanfmroot
echo " [Desktop Entry]
Type=Action
Tooltip=Open Folder As Root
Name=Open Folder As Root
Profiles=profile-zero;
Icon=gtk-dialog-authentication
[X-Action-Profile profile-zero]
MimeTypes=inode/directory;
Exec=/usr/bin/doas /usr/bin/pcmanfm %u
Name=Default profile" > $pcmanfmroot/root.desktop
}
minticons() {
gitdir="/tmp/mint-y-icons"
iconsdir="$gitdir/usr/share/icons"
git clone https://github.com/linuxmint/mint-y-icons.git "$gitdir"
#iconsets="$(interactiveopt "$(ls "$iconsdir")" "Choose icon sets (if using dark theme, COPY THE NON-DARK THEME TOO): ")"
#iconsets="$iconset Mint-Y"
#for iconset in $iconsets; do
# mv "$iconsdir/$iconset" $iconsdestdir
#done
mv $iconsdir/* $iconsdestdir
gtk-update-icon-cache
}
mintthemes() {
gitdir="/tmp/mint-themes"
themesdir="$gitdir/usr/share/themes"
#iconsdir="$gitdir/usr/share/icons"
git clone https://github.com/linuxmint/mint-themes.git "$gitdir"
curdir="$(pwd)"
cd $gitdir
make
#themes="$(interactiveopt "$(ls "$themesdir")" "Choose themes: ")"
##iconset="$iconset Mint-Y"
#for theme in $themes; do
# mv "$themesdir/$theme" $themesdestdir
#done
#iconsets="$(interactiveopt "$(ls "$iconsdir")" "Choose icon set (if using dark theme, COPY THE NON-DARK THEME TOO): ")"
#iconset="$iconset Mint-Y"
#for iconset in $iconsets; do
# mv "$iconsdir/$iconset" $iconsdestdir
#done
#gtk-update-icon-cache
mv $themesdir/* $themesdestdir
}
iconsdestdir=/usr/share/icons
themesdestdir=/usr/share/themes
mkdir -p $iconsdestdir $themesdestdir
pcmanfmconf
minticons
mintthemes
|