blob: a940e669d4dc3f073db4fa7480ee19f31e9852f3 (
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
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
|
#!/usr/bin/env bash
RED="\e[31m"
GREEN="\e[32m"
BLUE="\e[34m"
RESET="\e[0m"
msg() {
case "$1" in
error)
printf '%s\n' "${RED}[ERROR]:${RESET} $2"
;;
success)
printf '%s\n' "${GREEN}[SUCCESS]:${RESET} $2"
;;
debug)
printf '%s\n' "${BLUE}[DEBUG]:${RESET} $2"
;;
esac
}
package_list=(
# Core
"base-devel"
"sof-firmware"
"networkmanager"
"git"
"stow"
# Fonts
"noto-fonts"
"noto-fonts-cjk"
"noto-fonts-emoji"
"ttf-jetbrains-mono-nerd"
"terminus-font"
# Desktop utilities
"rofi"
"rofimoji"
"kitty"
"pcmanfm"
"librewolf"
"satty"
"slurp"
"grim"
"brightnessctl"
"swww"
"zathura"
"zathura-pdf-mupdf"
"adw-gtk-theme"
"cliphist"
"gum"
"fzf"
"imv"
"libappindicator"
"nwg-look"
"mako"
"wl-clipboard"
"swaylock-effects"
"swayidle"
# System utilities
"xdg-user-dirs"
"xdg-utils"
"xdg-desktop-portal-gtk"
"qt6-wayland"
"qt5-wayland"
"rsync"
"shellcheck"
"ripgrep"
"npm"
"man-db"
# Multimedia
"mpv"
"ffmpeg"
"v4l-utils"
"pipewire"
"pipewire-pulse"
"pipewire-jack"
"wireplumber"
"pipewire-alsa"
# Security
"ufw"
"wireguard-tools"
# GPU/Drivers
"vulkan-intel"
"intel-media-driver"
"intel-ucode"
# Development
"neovim"
"lazygit"
"fastfetch"
"fd"
"eza"
"bat"
"btop"
"age"
"jq"
"gnome-themes-extra"
"7zip"
)
sudo pacman -Sy --needed --noconfirm "${package_list[@]}"
if [ ! -d "$HOME/.config/niri" ]; then
stow -t ~/.config/niri niri
else
msg error "Directory niri doesn't exist."
read -r -p "Make directory? (y/n) " dir_make
select dir_make in "y" "n"; do
if [ "$dir_make" == "y" ]; then
mkdir "$HOME/.config/niri"
stow -t ~/.config/niri niri
msg success "Created directory niri and stowed files"
fi
done
fi
select qs_shell in "noctalia" "dms (Dank Material Shell)" "none"; do
if [ "$qs_shell" == "noctalia" ]; then
systemctl --user add-wants niri.service noctalia.service
systemctl --user enable noctalia.service
break
elif [ "$qs_shell" == "dms (Dank Material Shell)" ]; then
systemctl --user enable dms
systemctl --user start dms
break
elif [ "$qs_shell" == "none" ]; then
break
fi
done
# Bash scripts git repo
msg info "Cloning bash-utils repo"
git clone https://github.com/ryukamish/bash-utils.git ~/.local/bin
msg info "Updating mime database"
update-mime-database ~/.local/share/applications
# Mimetype default settings
msg info "Setting default mime types"
xdg-mime default librewolf.desktop x-scheme-handler/http
xdg-mime default librewolf.desktop x-scheme-handler/https
# pdf reader
xdg-mime default zathura.desktop application/pdf
# image viewer
xdg-mime default imv.desktop image/png
xdg-mime default imv.desktop image/jpeg
xdg-mime default imv.desktop image/gif
xdg-mime default imv.desktop image/webp
xdg-mime default imv.desktop image/bmp
xdg-mime default imv.desktop image/tiff
# video player
xdg-mime default mpv.desktop video/mp4
xdg-mime default mpv.desktop video/x-msvideo
xdg-mime default mpv.desktop video/x-matroska
xdg-mime default mpv.desktop video/x-flv
xdg-mime default mpv.desktop video/x-ms-wmv
xdg-mime default mpv.desktop video/mpeg
xdg-mime default mpv.desktop video/webm
xdg-mime default mpv.desktop video/quicktime
xdg-mime default mpv.desktop video/3gpp
xdg-mime default mpv.desktop video/3gpp2
xdg-mime default mpv.desktop video/x-ms-asf
xdg-mime default mpv.desktop video/x-ogm+ogg
xdg-mime default mpv.desktop video/x-theora+ogg
xdg-mime default mpv.desktop application/ogg
# Start niri without a display manager
shell_chk=$(which "$SHELL")
start_niri(){
tee -a "$1" <<EOF
if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ] && [ -z "$NIRI_LOADED" ]; then
export NIRI_LOADED=1
exec niri-session
fi
EOF
}
case "$shell_chk" in
*bash*)
if [ -f "$HOME/.bash_profile" ]; then
start_niri "$HOME/.bash_profile"
else
touch "$HOME/.bash_profile" && start_niri "$HOME/.bash_profile"
fi
;;
*zsh*)
if [ -f "$HOME/.zshrc" ]; then
start_niri "$HOME/.zprofile"
else
touch "$HOME/.zprofile" && start_niri "$HOME/.zprofile"
fi
;;
esac
|