-
Notifications
You must be signed in to change notification settings - Fork 19
/
sway.sh
executable file
·148 lines (114 loc) · 5.31 KB
/
sway.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
#!/usr/bin/bash
################################################
##### Sway
################################################
# Install Sway
# https://wiki.archlinux.org/title/sway
pacman -S --noconfirm \
sway \
swaylock \
swayidle \
swaybg
# Import Sway configs
# https://github.com/swaywm/sway/wiki#configuration
mkdir -p /home/${NEW_USER}/.config/sway
curl https://raw.githubusercontent.com/gjpin/arch-linux/main/configs/sway/appearance -o /home/${NEW_USER}/.config/sway/appearance
curl https://raw.githubusercontent.com/gjpin/arch-linux/main/configs/sway/applications -o /home/${NEW_USER}/.config/sway/applications
curl https://raw.githubusercontent.com/gjpin/arch-linux/main/configs/sway/bar -o /home/${NEW_USER}/.config/sway/bar
curl https://raw.githubusercontent.com/gjpin/arch-linux/main/configs/sway/config -o /home/${NEW_USER}/.config/sway/config
curl https://raw.githubusercontent.com/gjpin/arch-linux/main/configs/sway/idle -o /home/${NEW_USER}/.config/sway/idle
curl https://raw.githubusercontent.com/gjpin/arch-linux/main/configs/sway/input -o /home/${NEW_USER}/.config/sway/input
curl https://raw.githubusercontent.com/gjpin/arch-linux/main/configs/sway/key_bindings -o /home/${NEW_USER}/.config/sway/key_bindings
curl https://raw.githubusercontent.com/gjpin/arch-linux/main/configs/sway/output -o /home/${NEW_USER}/.config/sway/output
curl https://raw.githubusercontent.com/gjpin/arch-linux/main/configs/sway/startup -o /home/${NEW_USER}/.config/sway/startup
curl https://raw.githubusercontent.com/gjpin/arch-linux/main/configs/sway/variables -o /home/${NEW_USER}/.config/sway/variables
################################################
##### Thunar (file manager)
################################################
# References:
# https://wiki.archlinux.org/title/thunar
# Install thunar
pacman -S --noconfirm thunar
# Install Thunar Archive Plugin and achiver
pacman -S --noconfirm \
thunar-archive-plugin \
xarchiver
# Install Thunar Volume Manager and GVFS
pacman -S --noconfirm \
thunar-volman \
gvfs \
gvfs-mtp
# Install Tumbler (thumbnails)
pacman -S --noconfirm tumbler ffmpegthumbnailer
# Disable GVFS network mounts
# https://wiki.archlinux.org/title/thunar#Solving_problem_with_slow_cold_start
sed -i "s|^AutoMount=true|AutoMount=false|g" /usr/share/gvfs/mounts/network.mount
################################################
##### Common desktop applications
################################################
# Install ristretto (picture viewer)
pacman -S --noconfirm ristretto
################################################
##### tuigreet (login manager)
################################################
# References:
# https://github.com/apognu/tuigreet
# Install tuigreet
pacman -S --noconfirm greetd-tuigreet
# Enable greetd service
systemctl enable greetd.service
# Import tuigreet configs
# https://git.sr.ht/~kennylevinsen/greetd/tree/master/item/config.toml
# https://github.com/apognu/tuigreet
mkdir -p /etc/greetd
curl https://raw.githubusercontent.com/gjpin/arch-linux/main/configs/greetd-tuigreet/config.toml -o /etc/greetd/config.toml
################################################
##### Foot (terminal)
################################################
# References:
# https://codeberg.org/dnkl/foot#index
# https://wiki.archlinux.org/title/Foot
# Install foot
pacman -S --noconfirm foot
# Import foot configs
mkdir -p /home/${NEW_USER}/.config/foot
curl https://raw.githubusercontent.com/gjpin/arch-linux/main/configs/foot/foot.ini -o /home/${NEW_USER}/.config/foot/foot.ini
################################################
##### Yambar (status bar)
################################################
# References:
# https://codeberg.org/dnkl/yambar
# https://codeberg.org/dnkl/yambar/src/branch/master/examples/configurations
# Install Yambar
sudo -u ${NEW_USER} paru -S --noconfirm yambar
# Import Yambar configs and styles
mkdir -p /home/${NEW_USER}/.config/yambar
curl https://raw.githubusercontent.com/gjpin/arch-linux/main/configs/yambar/config.yaml -o /home/${NEW_USER}/.config/yambar/config.yaml
################################################
##### Fuzzel (application launcher)
################################################
# References:
# https://codeberg.org/dnkl/fuzzel
# https://codeberg.org/dnkl/fuzzel/src/branch/master/doc/fuzzel.ini.5.scd
# Install fuzzel
pacman -S --noconfirm fuzzel
# Import fuzzel configs
mkdir -p /home/${NEW_USER}/.config/fuzzel
curl https://raw.githubusercontent.com/gjpin/arch-linux/main/configs/fuzzel/fuzzel.ini -o /home/${NEW_USER}/.config/fuzzel/fuzzel.ini
################################################
##### Power profile cycle
################################################
# Install 'Power profile cycle'
# https://gitlab.com/lassegs/powerprofilecycle
curl https://raw.githubusercontent.com/gjpin/arch-linux/main/apps/powerprofilecycle.sh -o /usr/local/bin/powerprofilecycle.sh
chmod +x /usr/local/bin/powerprofilecycle.sh
################################################
##### ssh-agent
################################################
# Start ssh-agent with systemd user
# https://wiki.archlinux.org/title/SSH_keys#Start_ssh-agent_with_systemd_user
chown -R ${NEW_USER}:${NEW_USER} /home/${NEW_USER}
sudo -u ${NEW_USER} systemctl --user enable ssh-agent.service
tee /home/${NEW_USER}/.config/environment.d/90-SSH_AUTH_SOCK << 'EOF'
SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/ssh-agent.socket
EOF