Skip to content

Commit 04f0a71

Browse files
committed
optional dependencies
1 parent 4262cd4 commit 04f0a71

File tree

5 files changed

+69
-47
lines changed

5 files changed

+69
-47
lines changed

Makefile

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ WORKFILE := $(shell sudo mktemp -t 'dotfiles-XXXXX.tar')
77
SRCDIR := $(shell realpath ./src/)
88
MAKEFILE := $(shell realpath ./Makefile)
99

10-
.PHONY: dependencies symlink
10+
.PHONY: dependencies optional-dependencies symlink
1111

1212
copy: .bootstrap .type-copy .configure .prepare-copy .rename-copy .save-config .chown .package .install .cleanup .docs .post-install
1313
symlink: .bootstrap .type-symlink .configure .prepare-symlink .rename-symlink .save-config .chown .package .install .cleanup .docs .post-install
@@ -40,9 +40,25 @@ dependencies: .bootstrap
4040
true; \
4141
fi
4242
@paru -Syu
43-
@paru -S --needed - < pkglist.txt
43+
@paru -S --needed - < pkglist.required.txt
4444
@paru -S aur/qt5-styleplugins aur/qt6gtk2
4545

46+
optional-dependencies: .bootstrap
47+
$(eval OPT_DEPS_CMD=$(shell awk -F'\t' ' \
48+
BEGIN { \
49+
printf("dialog --title \"Optional dependencies\" --checklist \"Selection of apps not required for basic functionality\" 0 0 0 "); \
50+
} \
51+
{ \
52+
name = $$1; \
53+
$$1 = ""; \
54+
printf("%s \"%s\" on ", name, $$0); \
55+
} \
56+
END { \
57+
printf(" --output-fd 1\n"); \
58+
}' pkglist.optional.txt))
59+
@$(eval OPT_DEPS=$(shell ${OPT_DEPS_CMD}))
60+
@paru -S --needed ${OPT_DEPS}
61+
4662
.prepare-copy:
4763
@cp -Rpd ${SRCDIR}/* ${WORKDIR}/
4864

@@ -149,8 +165,10 @@ dependencies: .bootstrap
149165
@sudo systemctl enable --now cronie
150166
@sudo systemctl enable --now NetworkManager
151167
@sudo systemctl enable --now avahi-daemon
152-
@sudo systemctl enable --now "syncthing@${USERNAME}"
153-
@sudo systemctl enable --now syncthing-resume
168+
@if test -f /etc/systemd/system/[email protected]; then \
169+
sudo systemctl enable --now "syncthing@${USERNAME}"; \
170+
sudo systemctl enable --now syncthing-resume; \
171+
else true; fi
154172
@sudo systemctl enable --now systemd-resolved
155173
@sudo systemctl enable --now systemd-timesyncd
156174
@sudo systemctl enable --now ufw
@@ -165,6 +183,8 @@ dependencies: .bootstrap
165183
@sudo usermod -aG input,kvm,optical,rfkill,uucp "${USERNAME}"
166184
@test -e /usr/bin/vi || sudo ln -s /usr/bin/vim /usr/bin/vi
167185
@test -e /usr/bin/firefox || sudo ln -s /usr/bin/firefox-developer-edition /usr/bin/firefox
168-
@sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
169-
@sudo flatpak override --env GTK_THEME=Adwaita:dark
186+
@if command -v flatpak &>/dev/null; then \
187+
sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo; \
188+
sudo flatpak override --env GTK_THEME=Adwaita:dark; \
189+
else true; fi
170190
@gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ git clone https://github.com/filiparag/dotfiles.git && cd dotfiles
2020
# Install dependencies
2121
make dependencies
2222

23+
# Choose and install optional dependencies
24+
make optional-dependencies
25+
2326
# Install dotfiles for your user (pick one)
2427
make symlink # place symlinks to files (recommended)
2528
make copy # place copies of files

pkglist.optional.txt

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
auto-cpufreq Automatic CPU speed & power optimizer
2+
bat Cat clone with syntax highlighting
3+
code Visual Studio Code editor
4+
code-features Unblock some features in Code OSS
5+
croc Send things from one computer to another
6+
dino Modern XMPP (Jabber) chat client
7+
ethtool Utility for controlling network hardware
8+
fcitx Context-aware Input Tool
9+
fcitx-configtool GTK based config tool for Fcitx
10+
fcitx-googlepinyin Fcitx Wrapper for googlepinyin
11+
flameshot Simple to use screenshot software
12+
flatpak Linux application sandboxing
13+
gromit-mpx On-screen annotation tool
14+
htop Interactive process viewer
15+
kdeconnect Communication between KDE and smartphones
16+
keepassxc Port of Keepass password manager
17+
libinput-gestures Actions gestures on touchpad
18+
neofetch System information tool
19+
otf-latin-modern Computer Modern fonts
20+
otf-latinmodern-math Computer Modern fonts (math component)
21+
peek Simple screen recorder
22+
pulseaudio-bluetooth Bluetooth support for PulseAudio
23+
pulseaudio-zeroconf Zeroconf support for PulseAudio
24+
python-pip Tool for installing Python packages
25+
qbittorrent An advanced BitTorrent client
26+
redshift-qt Screen temperature changer
27+
rsync Fast and versatile file copying tool
28+
safeeyes Reduce and prevent repetitive strain injury
29+
signal-desktop Signal Private Messenger
30+
syncthing Continuous replication / synchronization tool
31+
thunderbird Standalone mail and news reader
32+
tmux Terminal multiplexer
33+
ttf-font-awesome Iconic font designed for Bootstrap
34+
ttf-ms-fonts Microsoft Windows TrueType fonts
35+
ttf-roboto-mono A monospaced addition to the Roboto type family
36+
unclutter Hide the mouse cursor
37+
wikiman Offline search engine for manual pages and documentation
38+
wireguard-tools Tools for WireGuard configuration
39+
yt-dlp Download videos from YouTube and a few more sites

pkglist.txt renamed to pkglist.required.txt

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -3,51 +3,34 @@ adobe-source-code-pro-fonts
33
alacritty
44
alsa-utils
55
arandr
6-
auto-cpufreq
76
base
87
base-devel
9-
bat
108
bc
119
binutils
1210
bspwm
1311
ccache
14-
code
15-
code-features
16-
croc
1712
cronie
1813
dash
1914
ddcutil
20-
dino
2115
dnsmasq
2216
dunst
2317
eog
24-
ethtool
2518
evince
26-
fcitx
27-
fcitx-configtool
28-
fcitx-googlepinyin
2919
feh
3020
ffmpeg
3121
file-roller
3222
firefox-developer-edition
3323
fish
34-
flameshot
35-
flatpak
3624
fzf
3725
git
3826
git-lfs
39-
gromit-mpx
4027
gst-plugin-viper4linux-git
4128
gvfs
4229
gvfs-mtp
4330
gvfs-nfs
44-
htop
4531
i3lock
4632
imagemagick
4733
jq
48-
kdeconnect
49-
keepassxc
50-
libinput-gestures
5134
libnotify
5235
linux
5336
linux-firmware
@@ -60,7 +43,6 @@ matcha-gtk-theme
6043
moreutils
6144
mpv
6245
mpv-mpris
63-
neofetch
6446
networkmanager
6547
nfs-utils
6648
noto-color-emoji-fontconfig
@@ -71,67 +53,46 @@ numlockx
7153
openresolv
7254
openssh
7355
openssl-1.1
74-
otf-latin-modern
75-
otf-latinmodern-math
7656
p7zip
7757
paper-icon-theme
7858
paprefs
7959
paru-bin
8060
pavucontrol
8161
pcmanfm
82-
peek
8362
perl
8463
picom
8564
playerctl
8665
polybar
8766
pulseaudio
8867
pulseaudio-alsa
89-
pulseaudio-bluetooth
90-
pulseaudio-zeroconf
91-
python-pip
92-
qbittorrent
9368
qt5ct
9469
qt5-styleplugins
9570
qt6ct
9671
qt6gtk2
97-
redshift-qt
9872
ripgrep
9973
rofi
10074
rofi-calc
101-
rsync
102-
safeeyes
103-
signal-desktop
10475
starship
10576
sudo
10677
sxhkd
107-
syncthing
10878
sysstat
109-
thunderbird
11079
tigervnc
111-
tmux
11280
tree
11381
ttf-dejavu
114-
ttf-font-awesome
11582
ttf-iosevka-nerd
11683
ttf-material-design-icons-webfont
117-
ttf-ms-win11-auto
11884
ttf-roboto
119-
ttf-roboto-mono
12085
ttf-sourcecodepro-nerd
12186
ttf-twemoji-color
12287
ufw
123-
unclutter
12488
unp
12589
unrar
12690
unzip
12791
usbutils
12892
vim
12993
viper4linux-git
130-
vlc
13194
wget
13295
which
133-
wikiman
134-
wireguard-tools
13596
wmrc
13697
wpa_supplicant
13798
x11-ssh-askpass
@@ -162,4 +123,3 @@ xorg-xrandr
162123
xorg-xset
163124
xorg-xwininfo
164125
xprintidle
165-
yt-dlp

src/HOME/.local/bin/dotfiles

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ print_usage() {
180180
add <path> add file or directory to project
181181
rm <path> remove file or directory from project
182182
reload rerun project installation
183-
deps reinstall all package dependencies
183+
deps reinstall all required package dependencies
184184
docs open dotfiles manual
185185
help print help
186186
\n'

0 commit comments

Comments
 (0)