Init 1.0.0-1 version
This commit is contained in:
commit
5699cf6687
12
Makefile
Normal file
12
Makefile
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
# makefile for theme-switcher
|
||||||
|
build:
|
||||||
|
makepkg
|
||||||
|
|
||||||
|
install:
|
||||||
|
pamac-installer theme-switcher-*.tar.xz
|
||||||
|
|
||||||
|
remove:
|
||||||
|
pamac-installer --remove theme-switcher
|
||||||
|
|
||||||
|
clean:
|
||||||
|
$(RM) -rf src/ pkg/ *.tar.xz
|
27
PKGBUILD
Normal file
27
PKGBUILD
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
# Maintainer: Your Name <youremail@domain.com>
|
||||||
|
pkgname=theme-switcher
|
||||||
|
pkgver=1.0.0
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="Theme switcher application"
|
||||||
|
arch=(any)
|
||||||
|
url=""
|
||||||
|
license=(unknown)
|
||||||
|
depends=('yad',
|
||||||
|
'zafiro-icon-theme-git',
|
||||||
|
'skeuos-gtk')
|
||||||
|
provides=('theme-switcher')
|
||||||
|
backup=()
|
||||||
|
options=(!strip)
|
||||||
|
install='theme-switcher.install'
|
||||||
|
source=("theme-switcher"
|
||||||
|
"theme-switcher.desktop",
|
||||||
|
"theme-switcher-icons.tar.gz")
|
||||||
|
|
||||||
|
package() {
|
||||||
|
# copy icons
|
||||||
|
install -Dm644 ${srcdir}/icons/* ${pkgdir}/usr/share/theme-switcher/icons
|
||||||
|
|
||||||
|
# copy executables
|
||||||
|
install -Dm644 ${srcdir}/theme-switcher.desktop ${pkgdir}/usr/share/applications/theme-switcher.desktop
|
||||||
|
install -Dm755 ${srcdir}/theme-switcher ${pkgdir}/usr/bin/theme-switcher
|
||||||
|
}
|
21
README.md
Normal file
21
README.md
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
# Theme switcher package
|
||||||
|
|
||||||
|
Theme switcher application
|
||||||
|
|
||||||
|
## Building the package
|
||||||
|
|
||||||
|
Open Terminal and issue the command:
|
||||||
|
|
||||||
|
`make`
|
||||||
|
|
||||||
|
To install the package right after the building, use:
|
||||||
|
|
||||||
|
`make install`
|
||||||
|
|
||||||
|
To remove just installed package, use:
|
||||||
|
|
||||||
|
`make remove`
|
||||||
|
|
||||||
|
To cleanup the project, use:
|
||||||
|
|
||||||
|
`make clean`
|
58
theme-switcher
Normal file
58
theme-switcher
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
#!/bin/bash
|
||||||
|
icons=/usr/share/theme-switcher/icons
|
||||||
|
|
||||||
|
set_theme() {
|
||||||
|
# Check for Zafiro icon pack, icon packs won't be changed if Zafiro is not in use
|
||||||
|
current_icon_theme=$(xfconf-query -c xsettings -p /Net/IconThemeName)
|
||||||
|
[ "${current_icon_theme%-Icons-Light-Black-f}" = 'Zafiro' ] && Zafiro='True'
|
||||||
|
|
||||||
|
if [ "${1##*-}" = 'Light' ]; then
|
||||||
|
yad --image "dialog-question" --title '' --button='DARK':1 --button='LIGHT':0 --text 'Select the panels theme:'
|
||||||
|
case $? in
|
||||||
|
1)
|
||||||
|
# Enable dark panels
|
||||||
|
xfconf-query -c xfce4-panel -p /panels/dark-mode -n -t bool -s true
|
||||||
|
# Use the dark icon pack
|
||||||
|
[ "$Zafiro" = 'True' ] && xfconf-query -c xsettings -p /Net/IconThemeName -n -t string -s Zafiro
|
||||||
|
;;
|
||||||
|
0)
|
||||||
|
# Disable dark panels
|
||||||
|
xfconf-query -c xfce4-panel -p /panels/dark-mode -n -t bool -s false
|
||||||
|
# Use the light icon pack
|
||||||
|
[ "$Zafiro" = 'True' ] && xfconf-query -c xsettings -p /Net/IconThemeName -n -t string -s Zafiro-Icons-Light-Black-f
|
||||||
|
;;
|
||||||
|
*) exit ;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
# Use the dark icon pack
|
||||||
|
[ "$Zafiro" = 'True' ] && xfconf-query -c xsettings -p /Net/IconThemeName -n -t string -s Zafiro
|
||||||
|
fi
|
||||||
|
# Change the main theme to the chosen one
|
||||||
|
xfconf-query -c xsettings -p /Net/ThemeName -n -t string -s "Skeuos-$1"
|
||||||
|
xfconf-query -c xfwm4 -p /general/theme -n -t string -s "Skeuos-$1-XFWM"
|
||||||
|
gsettings set org.gnome.desktop.interface gtk-theme "Skeuos-$1"
|
||||||
|
notify-send "Skeuos-$1 theme was enabled"
|
||||||
|
}
|
||||||
|
export -f set_theme
|
||||||
|
|
||||||
|
yad --no-buttons --center --keep-icon-size --use-interp --title 'Theme Switcher' --text-align=center --text "A Theme Switcher for TROMjaro's default theme-set (Skeuos)" --form --columns 5 \
|
||||||
|
--field=!"$icons/Blue-Dark.png"!'Blue-Dark':FBTN "set_theme 'Blue-Dark'" \
|
||||||
|
--field=!"$icons/Violet-Dark.png"!'Violet-Dark':FBTN "set_theme 'Violet-Dark'" \
|
||||||
|
--field=!"$icons/Blue-Light.png"!'Blue-Light':FBTN "set_theme 'Blue-Light'" \
|
||||||
|
--field=!"$icons/Violet-Light.png"!'Violet-Light':FBTN "set_theme 'Violet-Light'" \
|
||||||
|
--field=!"$icons/Teal-Dark.png"!'Teal-Dark':FBTN "set_theme 'Teal-Dark'" \
|
||||||
|
--field=!"$icons/Orange-Dark.png"!'Orange-Dark':FBTN "set_theme 'Orange-Dark'" \
|
||||||
|
--field=!"$icons/Teal-Light.png"!'Teal-Light':FBTN "set_theme 'Teal-Light'" \
|
||||||
|
--field=!"$icons/Orange-Light.png"!'Orange-Light':FBTN "set_theme 'Orange-Light'" \
|
||||||
|
--field=!"$icons/Green-Dark.png"!'Green-Dark (default)':FBTN "set_theme 'Green-Dark'" \
|
||||||
|
--field=!"$icons/Brown-Dark.png"!'Brown-Dark':FBTN "set_theme 'Brown-Dark'" \
|
||||||
|
--field=!"$icons/Green-Light.png"!'Green-Light':FBTN "set_theme 'Green-Light'" \
|
||||||
|
--field=!"$icons/Brown-Light.png"!'Brown-Light':FBTN "set_theme 'Brown-Light'" \
|
||||||
|
--field=!"$icons/Magenta-Dark.png"!'Magenta-Dark':FBTN "set_theme 'Magenta-Dark'" \
|
||||||
|
--field=!"$icons/Yellow-Dark.png"!'Yellow-Dark':FBTN "set_theme 'Yellow-Dark'" \
|
||||||
|
--field=!"$icons/Magenta-Light.png"!'Magenta-Light':FBTN "set_theme 'Magenta-Light'" \
|
||||||
|
--field=!"$icons/Yellow-Light.png"!'Yellow-Light':FBTN "set_theme 'Yellow-Light'" \
|
||||||
|
--field=!"$icons/Red-Dark.png"!'Red-Dark':FBTN "set_theme 'Red-Dark'" \
|
||||||
|
--field=!"$icons/Grey-Dark.png"!'Grey-Dark':FBTN "set_theme 'Grey-Dark'" \
|
||||||
|
--field=!"$icons/Red-Light.png"!'Red-Light':FBTN "set_theme 'Red-Light'" \
|
||||||
|
--field=!"$icons/Grey-Light.png"!'Grey-Light':FBTN "set_theme 'Grey-Light'"
|
BIN
theme-switcher-icons.tar.gz
Normal file
BIN
theme-switcher-icons.tar.gz
Normal file
Binary file not shown.
10
theme-switcher.desktop
Normal file
10
theme-switcher.desktop
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Type=Application
|
||||||
|
Name=Theme switcher
|
||||||
|
Comment=Theme switcher application
|
||||||
|
Icon=system-software-install
|
||||||
|
Categories=System;
|
||||||
|
Exec=theme-switcher
|
||||||
|
Terminal=false
|
||||||
|
X-Desktop-File-Install-Version=0.1
|
2
theme-switcher.install
Normal file
2
theme-switcher.install
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
pre_install() {
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user