Compare commits

...

13 Commits

Author SHA1 Message Date
Roma be2b24d26d use only filenames for post scripts 2022-09-18 15:12:36 +02:00
Roma 3b6e886667 move services and timers on user level 2022-09-18 15:12:36 +02:00
Roma 4ff7f7a0b3 start the timers right away 2022-09-18 15:12:36 +02:00
Roma 184bdec3c4 add more accuracy for timers 2022-09-18 15:12:36 +02:00
Roma 5e22263904 use xargs to enable systemd timers 2022-09-18 15:12:36 +02:00
Roma 9a62cf6bf1 add systemd timers for periodic fixes 2022-09-18 15:12:36 +02:00
Tio TROM 496dcd36f7 Update 'PKGBUILD' 2022-09-17 16:39:44 +02:00
Tio TROM 291b1b56da Merge pull request 'sync font for the title of xfce windows' (#1) from rokosun/fixes-package:rokosun-patch-1 into main
Reviewed-on: #1
2022-09-17 16:38:56 +02:00
Rokosun b9163d1c3a sync font for the title of xfce windows
font for the title of xfce windows now sync with the rest of the system
2022-09-17 14:41:12 +02:00
Tio TROM 65367cdb69 added dependencies
xfce4-appfinder
xdotool
rsync
2022-09-17 12:51:55 +02:00
Tio TROM 43b6d31c19 Update 'PKGBUILD' 2022-09-16 17:57:38 +02:00
Tio TROM 084cb192ce Update 'alpm-hooks/chaotic-keyring-refresh.hook' 2022-09-16 17:57:08 +02:00
Tio TROM 301bd1d572 Update 'bin/standalone/fix-chaotic-keyring' 2022-09-16 17:56:38 +02:00
13 changed files with 142 additions and 49 deletions

View File

@ -1,18 +1,21 @@
# Maintainer: TROM <contact@tromsite.com>
pkgname=tromjaro-fixes
pkgver=1.0.0
pkgver=1.1.1
pkgrel=1
pkgdesc="Various fixes for TROMjaro OS"
arch=(any)
url=""
license=(unknown)
depends=()
depends=('xfce4-appfinder'
'xdotool'
'rsync')
provides=('tromjaro-fixes')
backup=()
options=(!strip)
install='fixes-package.install'
prepare() {
cp -R ../bin ../flatpak-overrides ../alpm-hooks .
cp -R ../bin ../flatpak-overrides ../alpm-hooks ../systemd .
}
package() {
@ -21,6 +24,11 @@ package() {
install -Dm755 ${srcdir}/bin/standalone/* ${pkgdir}/usr/bin
install -Dm755 ${srcdir}/bin/periodic/* ${pkgdir}/usr/bin
# copy systemd units
install -d ${pkgdir}/usr/lib/systemd/user
install -Dm644 ${srcdir}/systemd/services/* ${pkgdir}/usr/lib/systemd/user
install -Dm644 ${srcdir}/systemd/timers/* ${pkgdir}/usr/lib/systemd/user
# copy alpm hooks
install -d ${pkgdir}/usr/share/libalpm/hooks
install -Dm644 ${srcdir}/alpm-hooks/* ${pkgdir}/usr/share/libalpm/hooks

View File

@ -8,4 +8,4 @@ Target = *
[Action]
Description = Refreshing the chaotic-aur keyring...
When = PreTransaction
Exec = /usr/bin/chaotic-keyring-refresh
Exec = /usr/bin/fix-chaotic-keyring

View File

@ -1,7 +1,4 @@
#!/bin/sh
while :; do
rm -r ~/.themes/* 2> /dev/null
rsync -av --progress /usr/share/themes/* ~/.themes/ --exclude Windowck
rsync -av --progress ~/.local/share/themes/* ~/.themes/ --exclude Windowck-dark
sleep 600
done
rm -r ~/.themes/* 2> /dev/null
rsync -av --progress /usr/share/themes/* ~/.themes/ --exclude Windowck
rsync -av --progress ~/.local/share/themes/* ~/.themes/ --exclude Windowck-dark

View File

@ -11,7 +11,6 @@ sync_theme() {
# Apply the current theme with gsettings
gsettings set org.gnome.desktop.interface gtk-theme "$theme"
}
sync_icon_theme() {
# Get the current icon theme
icon_theme=$(xfconf-query -c xsettings -p /Net/IconThemeName)
@ -20,20 +19,21 @@ sync_icon_theme() {
sed -i "s/^icon_theme=.*$/icon_theme=$icon_theme/" "$HOME"/.config/qt6ct/qt6ct.conf
}
while :; do
# Get the current system theme
theme_new=$(xfconf-query -c xsettings -p /Net/ThemeName)
# Get the current icon theme
icon_theme_new=$(xfconf-query -c xsettings -p /Net/IconThemeName)
# Get the current system theme
theme_new=$(xfconf-query -c xsettings -p /Net/ThemeName)
# Get the current icon theme
icon_theme_new=$(xfconf-query -c xsettings -p /Net/IconThemeName)
# Get the current font name
font_new=$(xfconf-query -c xsettings -p /Gtk/FontName)
# Run sync_theme if the new system theme doesn't match the previous one
[ "$theme_new" != "$theme_prev" ] && sync_theme
# Run sync_icon_theme if the new icon theme doesn't match the previous one
[ "$icon_theme_new" != "$icon_theme_prev" ] && sync_icon_theme
# Run sync_theme if the new system theme doesn't match the previous one
[ "$theme_new" != "$theme_prev" ] && sync_theme
# Run sync_icon_theme if the new icon theme doesn't match the previous one
[ "$icon_theme_new" != "$icon_theme_prev" ] && sync_icon_theme
# If the new font doesn't match the previous one, apply the new font for the title of xfce windows
[ "$font_new" != "$font_prev" ] && xfconf-query -c xfwm4 -p /general/title_font -n -t string -s "$font_new"
# The new values become the previous values
theme_prev=$theme_new
icon_theme_prev=$icon_theme_new
sleep 3
done
# The new values become the previous values
theme_prev=$theme_new
icon_theme_prev=$icon_theme_new
font_prev=$font_new

View File

@ -66,24 +66,21 @@ fixfiles() {
done
}
while :; do
user_new=$(ls -ad "$user"/*.desktop 2>/dev/null)
flatpak_local_new=$(ls -ad "$flatpak_local"/*.desktop 2>/dev/null)
flatpak_global_new=$(ls -ad "$flatpak_global"/*.desktop 2>/dev/null)
pacman_local_new=$(ls -ad "$pacman_local"/*.desktop 2>/dev/null)
pacman_global_new=$(ls -ad "$pacman_global"/*.desktop 2>/dev/null)
snap_new=$(ls -ad "$snap"/*.desktop 2>/dev/null)
[ "$user_new" != "$user_old" ] && detectfiles
[ "$flatpak_local_new" != "$flatpak_local_old" ] ||
[ "$flatpak_global_new" != "$flatpak_global_old" ] ||
[ "$pacman_local_new" != "$pacman_local_old" ] ||
[ "$pacman_global_new" != "$pacman_global_old" ] ||
[ "$snap_new" != "$snap_old" ] && fixfiles
user_old=$user_new
flatpak_local_old=$flatpak_local_new
flatpak_global_old=$flatpak_global_new
pacman_local_old=$pacman_local_new
pacman_global_old=$pacman_global_new
snap_old=$snap_new
sleep 5
done
user_new=$(ls -ad "$user"/*.desktop 2>/dev/null)
flatpak_local_new=$(ls -ad "$flatpak_local"/*.desktop 2>/dev/null)
flatpak_global_new=$(ls -ad "$flatpak_global"/*.desktop 2>/dev/null)
pacman_local_new=$(ls -ad "$pacman_local"/*.desktop 2>/dev/null)
pacman_global_new=$(ls -ad "$pacman_global"/*.desktop 2>/dev/null)
snap_new=$(ls -ad "$snap"/*.desktop 2>/dev/null)
[ "$user_new" != "$user_old" ] && detectfiles
[ "$flatpak_local_new" != "$flatpak_local_old" ] ||
[ "$flatpak_global_new" != "$flatpak_global_old" ] ||
[ "$pacman_local_new" != "$pacman_local_old" ] ||
[ "$pacman_global_new" != "$pacman_global_old" ] ||
[ "$snap_new" != "$snap_old" ] && fixfiles
user_old=$user_new
flatpak_local_old=$flatpak_local_new
flatpak_global_old=$flatpak_global_new
pacman_local_old=$pacman_local_new
pacman_global_old=$pacman_global_new
snap_old=$snap_new

View File

@ -1,3 +1,2 @@
#!/bin/bash
sudo pacman-key --populate chaotic &
rm ~/.local/bin/fix-chaotic-keyring
pacman-key --populate chaotic

9
fixes-package.install Normal file
View File

@ -0,0 +1,9 @@
post_install() {
find /usr/lib/systemd/user/ -name "fix-*.timer" -type f -printf "%f\0" | xargs -0 systemctl --user enable
find /usr/lib/systemd/user/ -name "fix-*.timer" -type f -printf "%f\0" | xargs -0 systemctl --user start
}
post_upgrade() {
find /usr/lib/systemd/user/ -name "fix-*.timer" -type f -printf "%f\0" | xargs -0 systemctl --user enable
find /usr/lib/systemd/user/ -name "fix-*.timer" -type f -printf "%f\0" | xargs -0 systemctl --user restart
}

View File

@ -0,0 +1,13 @@
# This service unit is for fix-flatpaks-theming script
#
[Unit]
Description=Fix flatpak theming script
Wants=fix-flatpaks-theming.timer
[Service]
Type=oneshot
ExecStart=/usr/bin/fix-flatpaks-theming
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,13 @@
# This service unit is for fix-theming script
#
[Unit]
Description=Fix theming script
Wants=fix-theming.timer
[Service]
Type=oneshot
ExecStart=/usr/bin/fix-theming
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,13 @@
# This service unit is for fix-tweaked-desktop-files script
#
[Unit]
Description=Fix tweaked desktop files script
Wants=fix-tweaked-desktop-files.timer
[Service]
Type=oneshot
ExecStart=/usr/bin/fix-tweaked-desktop-files
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,14 @@
# This timer unit is for fix-flatpaks-theming service unit
#
[Unit]
Description=Run fix flatpaks theming script every 600 seconds
Requires=fix-flatpaks-theming.service
[Timer]
Unit=fix-flatpaks-theming.service
OnBootSec=1
OnUnitActiveSec=600
[Install]
WantedBy=timers.target

View File

@ -0,0 +1,15 @@
# This timer unit is for fix-theming service unit
#
[Unit]
Description=Run fix theming script every 3 seconds
Requires=fix-theming.service
[Timer]
Unit=fix-theming.service
OnBootSec=1
OnUnitActiveSec=3
AccuracySec=1us
[Install]
WantedBy=timers.target

View File

@ -0,0 +1,15 @@
# This timer unit is for fix-tweaked-desktop-files service unit
#
[Unit]
Description=Run fix tweaked desktop files script every 5 seconds
Requires=fix-tweaked-desktop-files.service
[Timer]
Unit=fix-tweaked-desktop-files.service
OnBootSec=1
OnUnitActiveSec=5
AccuracySec=1us
[Install]
WantedBy=timers.target