TROMjaro 2022.09.23
This commit is contained in:
tromjaro/xfce
Packages-Desktop.profile
desktop-overlay
etc
pacman.d
skel
.config
.local
share
Theme-Switcher
applications
desktop-directories
xfce-accessories.directoryxfce-development.directoryxfce-education.directoryxfce-games.directoryxfce-graphics.directoryxfce-multimedia.directoryxfce-network.directoryxfce-office.directoryxfce-other.directoryxfce-screensavers.directoryxfce-settings.directoryxfce-system.directory
icons
tromjaro-layoutsusr
bin
app-finderchaotic-keyring-refreshfix-chaotic-keyringfix-flatpaks-themingfix-themingfix-tweaked-desktop-fileslayout-switcherrefresh-xfcereinstall-for-qttheme-switcher
share
applications
icons
hicolor
scalable
libalpm
var
lib
flatpak
overrides
live-overlay
@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
xdotool search --onlyvisible --class xfce4-appfinder windowkill || setsid -f xfce4-appfinder
|
||||
|
@ -1,2 +0,0 @@
|
||||
#!/bin/bash
|
||||
pacman-key --populate chaotic
|
@ -1,3 +1,2 @@
|
||||
#! /bin/bash
|
||||
sudo pacman-key --populate chaotic &
|
||||
rm ~/.local/bin/fix-chaotic-keyring
|
||||
pacman-key --populate chaotic
|
@ -1,7 +0,0 @@
|
||||
#!/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
|
@ -1,37 +0,0 @@
|
||||
#!/bin/sh
|
||||
sync_theme() {
|
||||
# Get the current system theme
|
||||
theme=$(xfconf-query -c xsettings -p /Net/ThemeName)
|
||||
# Find the best match for the xfwm4 theme that corresponds with the current system theme
|
||||
xfwm4_theme=$(find /usr/share/themes/ /usr/local/share/themes/ "$HOME"/.themes/ "$HOME"/.local/share/themes/ -mindepth 2 -maxdepth 2 -type d -name xfwm4 -printf '%h\n' 2>/dev/null | grep -o "/${theme}[^/]*$" | sort | head -n1)
|
||||
# If a match is not found then use the Default theme
|
||||
[ -z "$xfwm4_theme" ] && xfwm4_theme='Default'
|
||||
# Apply the xfwm4 theme
|
||||
xfconf-query -c xfwm4 -p /general/theme -n -t string -s "${xfwm4_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)
|
||||
# Apply the same theme in qt5ct and qt6ct configuration
|
||||
sed -i "s/^icon_theme=.*$/icon_theme=$icon_theme/" "$HOME"/.config/qt5ct/qt5ct.conf
|
||||
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)
|
||||
|
||||
# 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
|
||||
|
||||
# The new values become the previous values
|
||||
theme_prev=$theme_new
|
||||
icon_theme_prev=$icon_theme_new
|
||||
|
||||
sleep 3
|
||||
done
|
@ -1,89 +0,0 @@
|
||||
#!/bin/bash
|
||||
pidof -sq -o %PPID -x "$(basename "$0")" && exit
|
||||
data="$HOME"/.local/share/applications/tweaked-desktop-files
|
||||
data2="$HOME"/.local/share/applications/bakkedup-desktop-files
|
||||
|
||||
# Directories where desktop files are stored
|
||||
user="$HOME"/.local/share/applications
|
||||
flatpak_local="$HOME"/.local/share/flatpak/exports/share/applications
|
||||
flatpak_global=/var/lib/flatpak/exports/share/applications
|
||||
pacman_local=/usr/local/share/applications
|
||||
pacman_global=/usr/share/applications
|
||||
snap=/var/lib/snapd/desktop/applications
|
||||
|
||||
detectfiles() {
|
||||
for file in "$user"/*.desktop; do
|
||||
name=$(basename "$file") || continue
|
||||
[ -d "$file" ] || grep -xq "\(flatpak-local\|flatpak-global\|pacman-local\|pacman-global\|snap\)/$name" "$data" && continue
|
||||
if [ -f "$flatpak_local/$name" ]; then
|
||||
echo "flatpak-local/$name" >> "$data"
|
||||
elif [ -f "$flatpak_global/$name" ]; then
|
||||
echo "flatpak-global/$name" >> "$data"
|
||||
elif [ -f "$pacman_local/$name" ]; then
|
||||
echo "pacman-local/$name" >> "$data"
|
||||
elif [ -f "$pacman_global/$name" ]; then
|
||||
echo "pacman-global/$name" >> "$data"
|
||||
elif [ -f "$snap/$name" ]; then
|
||||
echo "snap/$name" >> "$data"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
fixfiles() {
|
||||
lastmod=$(stat -c "%Y" "$data")
|
||||
tmp="$(mktemp)"
|
||||
trap 'rm $tmp' EXIT
|
||||
[ -f "$data" ] && cp "$data" "$tmp" && copied='true'
|
||||
lineno=0
|
||||
[ "$copied" = 'true' ] && while IFS= read -r line; do
|
||||
((lineno++))
|
||||
name=${line#*/}
|
||||
file="$user/$name"
|
||||
# shellcheck disable=2015 # To disable shellcheck error here, line below is intended to work this way
|
||||
echo "$line" | grep -xq '\(flatpak-local\|flatpak-global\|pacman-local\|pacman-global\|snap\)/.\+' && [ -f "$file" ] || { sed -i "${lineno}d" "$tmp" && ((lineno--)) ; continue; }
|
||||
[ -f "$flatpak_local/$name" ] ||
|
||||
[ -f "$flatpak_global/$name" ] ||
|
||||
[ -f "$pacman_local/$name" ] ||
|
||||
[ -f "$pacman_global/$name" ] ||
|
||||
[ -f "$snap/$name" ] ||
|
||||
{ mv "$file" "$file.bak" && echo "$line" >> "$data2"; }
|
||||
done < "$data"
|
||||
|
||||
[ "$copied" = 'true' ] && [ "$(stat -c '%Y' "$data")" = "$lastmod" ] && sort "$tmp" | uniq > "$data"
|
||||
|
||||
[ -n "$(sort "$data2" | uniq -d)" ] && cp "$data2" "$tmp" && sort "$tmp" | uniq > "$data2"
|
||||
|
||||
for bakfile in "$user"/*.desktop.bak; do
|
||||
origfile="${bakfile%.bak}"
|
||||
[ -f "$origfile" ] && continue
|
||||
name=$(basename "$origfile") || continue
|
||||
[ -f "$flatpak_local/$name" ] ||
|
||||
[ -f "$flatpak_global/$name" ] ||
|
||||
[ -f "$pacman_local/$name" ] ||
|
||||
[ -f "$pacman_global/$name" ] ||
|
||||
[ -f "$snap/$name" ] &&
|
||||
mv "$bakfile" "$origfile"
|
||||
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
|
@ -1,65 +0,0 @@
|
||||
#! /bin/bash
|
||||
data="$HOME"/.local/share/tromjaro-layouts
|
||||
icons=$data/icons
|
||||
profiles=$data/profiles
|
||||
enable-top-bar-integration() {
|
||||
# Enable global menus
|
||||
pacman -Qq vala-panel-appmenu-registrar-git ||
|
||||
zensu SKIP_AUTOSNAP= pacman -S --noconfirm vala-panel-appmenu-registrar-git ||
|
||||
{ notify-send 'Error' 'failed installing vala-panel-appmenu-registrar-git !\nmake sure you type the correct password\nEnabling the internet connection might solve the issue'; exit; }
|
||||
pacman -Qq vala-panel-appmenu-registrar-git || exit
|
||||
|
||||
# Hide window borders when maximized
|
||||
xfconf-query -c xfwm4 -p /general/borderless_maximize -n -t bool -s true &
|
||||
# Hide top bar of windows when maximized
|
||||
xfconf-query -c xfwm4 -p /general/titleless_maximize -n -t bool -s true &
|
||||
# Put window buttons on left side
|
||||
xfconf-query -c xfwm4 -p /general/button_layout -n -t string -s "CMH|" &
|
||||
}
|
||||
disable-top-bar-integration() {
|
||||
# Disable global menus
|
||||
! pacman -Qq vala-panel-appmenu-registrar-git ||
|
||||
zensu SKIP_AUTOSNAP= pacman -R --noconfirm vala-panel-appmenu-registrar-git ||
|
||||
{ notify-send 'Error' 'failed removing vala-panel-appmenu-registrar-git !\nmake sure you type the correct password'; exit; }
|
||||
pacman -Qq vala-panel-appmenu-registrar-git && exit
|
||||
killall appmenu-registrar &
|
||||
|
||||
# Hide window borders when maximized
|
||||
xfconf-query -c xfwm4 -p /general/borderless_maximize -n -t bool -s true &
|
||||
# Don't hide top bar of windows when maximized
|
||||
xfconf-query -c xfwm4 -p /general/titleless_maximize -n -t bool -s false &
|
||||
# Put window buttons on right side
|
||||
xfconf-query -c xfwm4 -p /general/button_layout -n -t string -s "|HMC" &
|
||||
}
|
||||
choice=$(
|
||||
yad --no-buttons --center --keep-icon-size --separator='' --use-interp --title 'Layout Switcher' --text-align=center --text 'Changing to or from any layout that has global menus, will require your admin password' --form --columns 3 \
|
||||
--field=!"$icons/windows.png"!'Windows-Like':BTN "kill -USR1 \$YAD_PID; echo -n 'Windows-Like'" \
|
||||
--field=!"$icons/macos.png"!'MacOS-Like':BTN "kill -USR1 \$YAD_PID; echo -n 'MacOS-Like'" \
|
||||
--field=!"$icons/mx.png"!'MX-Like':BTN "kill -USR1 \$YAD_PID; echo -n 'MX-Like'" \
|
||||
--field=!"$icons/gnome.png"!'Gnome-Like':BTN "kill -USR1 \$YAD_PID; echo -n 'Gnome-Like'" \
|
||||
--field=!"$icons/unity.png"!'Unity-Like (default)':BTN "kill -USR1 \$YAD_PID; echo -n 'Unity-Like (default)'" \
|
||||
--field=!"$icons/topx.png"!'TopX-Like':BTN "kill -USR1 \$YAD_PID; echo -n 'TopX-Like'"
|
||||
)
|
||||
case "$choice" in
|
||||
'Windows-Like')
|
||||
disable-top-bar-integration
|
||||
xfce4-panel-profiles load "$profiles"/Windows-Like.tar.bz2 & ;;
|
||||
'Unity-Like (default)')
|
||||
enable-top-bar-integration
|
||||
xfce4-panel-profiles load "$profiles"/Unity-Like.tar.bz2 & ;;
|
||||
'MX-Like')
|
||||
disable-top-bar-integration
|
||||
xfce4-panel-profiles load "$profiles"/MX-Like.tar.bz2 & ;;
|
||||
'MacOS-Like')
|
||||
enable-top-bar-integration
|
||||
xfce4-panel-profiles load "$profiles"/MacOS-Like.tar.bz2 & ;;
|
||||
'Gnome-Like')
|
||||
disable-top-bar-integration
|
||||
xfce4-panel-profiles load "$profiles"/Gnome-Like.tar.bz2 & ;;
|
||||
'TopX-Like')
|
||||
disable-top-bar-integration
|
||||
xfce4-panel-profiles load "$profiles"/TopX-Like.tar.bz2 & ;;
|
||||
*) exit ;;
|
||||
esac
|
||||
|
||||
sleep 5 && notify-send "$choice layout was enabled"
|
@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
xfce4-panel -r && xfwm4 --replace && xfce4-panel
|
||||
xfce4-panel -r && xfwm4 --replace
|
||||
|
||||
|
@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
rm /var/lib/pacman/db.lck
|
||||
pacman --noconfirm -S qt5-styleplugins qt6gtk2
|
@ -1,62 +0,0 @@
|
||||
#!/bin/bash
|
||||
icons="$HOME"/.local/share/Theme-Switcher
|
||||
|
||||
set_icon_theme() {
|
||||
# Change icon theme in XFCE
|
||||
xfconf-query -c xsettings -p /Net/IconThemeName -n -t string -s "$1"
|
||||
# Change icon theme in qt5ct configuration
|
||||
sed -i "s/^icon_theme=.*$/icon_theme=$1/" "$HOME"/.config/qt5ct/qt5ct.conf
|
||||
}
|
||||
|
||||
set_theme() {
|
||||
if [ "${1##*-}" = 'Light' ]; then
|
||||
yad --image "dialog-question" --title '' --buttons-layout=center --text-align=center --button='DARK':1 --button='LIGHT':0 --text "Select the panels theme\n\nNote: dark panels may result in light icons over a light 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 theme
|
||||
set_icon_theme zafiro-dark
|
||||
;;
|
||||
0)
|
||||
# Disable dark panels
|
||||
xfconf-query -c xfce4-panel -p /panels/dark-mode -n -t bool -s false
|
||||
# Use the light icon theme
|
||||
set_icon_theme zafiro
|
||||
;;
|
||||
*) exit ;;
|
||||
esac
|
||||
else
|
||||
# Use the dark icon theme
|
||||
set_icon_theme zafiro-dark
|
||||
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_icon_theme set_theme
|
||||
|
||||
yad --no-buttons --center --keep-icon-size --use-interp --title 'TROMjaro Theme Switcher' --text-align=center --text "A Theme Switcher for TROMjaro's default theme-set (Skeuos) and icon-set (Zafiro)." --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'"
|
Reference in New Issue
Block a user