OSDN Git Service

Initial commit
[rebornos/cnchi-gnome-osdn.git] / TEST_FILE.sh
1 #  Copyright © 2016-2019 RebornOS
2 #
3 #  This file is part of RebornOS.
4 #
5 #  Reborn OS is free software; you can redistribute it and/or modify
6 #  it under the terms of the GNU General Public License as published by
7 #  the Free Software Foundation; either version 3 of the License, or
8 #  (at your option) any later version.
9 #
10 #  Reborn OS is distributed in the hope that it will be useful,
11 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
12 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 #  GNU General Public License for more details.
14 #
15 #  The following additional terms are in effect as per Section 7 of the license:
16 #
17 #  The preservation of all legal notices and author attributions in
18 #  the material or in the Appropriate Legal Notices displayed
19 #  by works containing it is required.
20 #
21 #  You should have received a copy of the GNU General Public License
22 #  along with Reborn OS; If not, see <http://www.gnu.org/licenses/>.
23
24 gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout '0' && gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout '0'
25 WM=`wmctrl -m | grep Name | awk '{print $2}'`
26 echo $WM
27 LINE=$(grep -o "B" <<<"$WM" | wc -l)
28 echo $LINE
29 if [[ $LINE == 1 ]]; then
30 dconf write /org/gnome/desktop/background/picture-uri "'file:///usr/share/backgrounds/abstract1-reborn2.png'"
31 dconf write /org/gnome/desktop/interface/gtk-theme "'Evo-Pop'"
32 dconf write /org/gnome/desktop/interface/icon-name "'Flat-Remix'"
33 fi
34 if [ $LINE -eq "0" ]; then
35 dconf write /org/gnome/desktop/background/picture-uri "'file:///usr/share/backgrounds/elementary.jpg'"
36 dconf write /org/gnome/shell/extensions/user-theme/name "'Arctic-Apricity'"
37 dconf write /org/gnome/desktop/interface/gtk-theme "'Arc'"
38 dconf write /org/gnome/desktop/interface/icon-name "'Apricity-Icons'"
39 fi
40 wget --spider www.google.com
41 if [ "$?" = 0 ]; then
42   sudo rm -rf /etc/pacman.d/gnupg
43   sudo pacman -Syy
44   sudo pacman-key --init
45   sudo pacman-key --populate archlinux rebornos
46   sudo pacman-key --refresh-keys
47   sudo pacman -Syy
48   reflector --verbose --latest 10 --sort rate --save /etc/pacman.d/mirrorlist
49 # if [ ! -z $(grep "eu" "etc/pacman.d/mirrorlist") ]; then 
50 # sudo cp /usr/bin/cnchi/pacman.conf /etc/
51 # sudo mv /usr/bin/cnchi/reborn-mirrorlist2 /etc/pacman.d/reborn-mirrorlist
52 # fi
53 else exec /usr/bin/internet.sh
54 fi