summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a7ee3868220e84ac07f9df6422f6fe762c0f03f4 (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
# Maintainer: manilarome <gerome.matilla07@gmail.com>
# Contributor: demostanis worlds <demostanis@protonmail.com>

pkgname=the-glorious-dotfiles
pkgver=0.0.3
pkgrel=1
pkgdesc="A glorified personal dot files"
arch=("x86_64")
url="https://github.com/manilarome/the-glorious-dotfiles"
license=("AGPL3")
depends=(
	"awesome-git"
	"rofi-git"
	"picom-tryone-git"
	"inter-font"
)
optdepends=(
	"light-git: Brightness widget and OSD" 
	"alsa-utils: Volume widget and OSD" 
	"acpi: Power/Battery Widgets" 
	"acpid: Power/Battery Widgets" 
	"acpi_call: Power/Battery Widgets" 
	"mpd: Music widget" 
	"mpc: Music widget" 
	"maim: Screenshot tool" 
	"xclip: Will be used in saving the screenshots to clipboard" 
	"imagemagick: Music widget/Extracts hardcoded album cover from songs" 
	"blueman: Default launch application for bluetooth widget" 
	"redshift: Blue light widget" 
	"xfce4-power-manager: Default launch application for battery widget" 
	"upower: Battery widget" 
	"noto-fonts-emoji: Emoji support for notification center" 
	"nerd-fonts-fantasque-sans-mono: Rofi unicode font" 
	"xdg-user-dirs: xdg-folders widget"
)
makedepends=("git")
source=("git+$url.git")
sha256sums=("SKIP")

package() {
	DEST="${pkgdir}/usr/lib/$pkgname"

	cd "${srcdir}/$pkgname"
	mkdir -p $DEST
	for file in $(find config/awesome -type f)
	do
		install -Dm755 ${file} $DEST/${file}
	done

	echo
	echo "Here's a list of available themes:"
	for t in $(ls config/awesome/)
	do
		echo -e " \033[1m$t\033[0m"
	done
	_ask
}

_ask() {
	echo -n "Please choose one to install: "
	read THEME

	if [[ -d $DEST/config/awesome/$THEME ]]; then
		[[ -d ~/.config/awesome ]] && \
			cp -r ~/.config/awesome ~/.config/awesome.bak && \
			rm -rf ~/.config/awesome && \
			echo "Saved old awesome config to ~/.config/awesome.bak"
		cp -r $DEST/config/awesome/$THEME ~/.config/awesome
		echo "Successfully installed theme"
		echo
	elif [[ ! $THEME = "cancel" ]]; then
		echo "Invalid theme"
		_ask
	fi
}