2022.06.14
This commit is contained in:
@ -46,11 +46,13 @@ fixfiles() {
|
||||
[ -f "$pacman_local/$name" ] ||
|
||||
[ -f "$pacman_global/$name" ] ||
|
||||
[ -f "$snap/$name" ] ||
|
||||
mv "$file" "$file.bak" && echo "$line" >> "$data2"
|
||||
{ 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
|
||||
@ -84,4 +86,4 @@ while :; do
|
||||
pacman_global_old=$pacman_global_new
|
||||
snap_old=$snap_new
|
||||
sleep 5
|
||||
done
|
||||
done
|
@ -1,67 +0,0 @@
|
||||
#! /bin/bash
|
||||
data="$HOME"/.local/share/tromjaro-layouts
|
||||
icons=$data/icons
|
||||
profiles=$data/profiles
|
||||
enable-global-menus() {
|
||||
pacman -Qq vala-panel-appmenu-registrar ||
|
||||
zensu SKIP_AUTOSNAP= pacman -S --noconfirm vala-panel-appmenu-registrar ||
|
||||
{ notify-send 'Error' 'failed installing vala-panel-appmenu-registrar !\nmake sure you type the correct password\nEnabling the internet connection might solve the issue'; exit; }
|
||||
pacman -Qq vala-panel-appmenu-registrar || exit
|
||||
}
|
||||
disable-global-menus() {
|
||||
! pacman -Qq vala-panel-appmenu-registrar ||
|
||||
zensu SKIP_AUTOSNAP= pacman -R --noconfirm vala-panel-appmenu-registrar ||
|
||||
{ notify-send 'Error' 'failed removing vala-panel-appmenu-registrar !\nmake sure you type the correct password'; exit; }
|
||||
pacman -Qq vala-panel-appmenu-registrar && exit
|
||||
killall appmenu-registrar &
|
||||
}
|
||||
choice=$(
|
||||
yad --no-buttons --center --keep-icon-size --separator='' --use-interp --title 'Layout Switch' --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-global-menus
|
||||
xfconf-query -c xfwm4 -p /general/borderless_maximize -n -t bool -s true &
|
||||
xfconf-query -c xfwm4 -p /general/titleless_maximize -n -t bool -s false &
|
||||
xfconf-query -c xfwm4 -p /general/button_layout -n -t string -s "|HMC" &
|
||||
xfce4-panel-profiles load "$profiles"/Windows-Like.tar.bz2 & ;;
|
||||
'Unity-Like /default/')
|
||||
enable-global-menus
|
||||
xfconf-query -c xfwm4 -p /general/borderless_maximize -n -t bool -s true &
|
||||
xfconf-query -c xfwm4 -p /general/titleless_maximize -n -t bool -s true &
|
||||
xfconf-query -c xfwm4 -p /general/button_layout -n -t string -s "CMH|" &
|
||||
xfce4-panel-profiles load "$profiles"/Unity-Like.tar.bz2 & ;;
|
||||
'MX-Like')
|
||||
disable-global-menus
|
||||
xfconf-query -c xfwm4 -p /general/borderless_maximize -n -t bool -s true &
|
||||
xfconf-query -c xfwm4 -p /general/titleless_maximize -n -t bool -s false &
|
||||
xfconf-query -c xfwm4 -p /general/button_layout -n -t string -s "|HMC" &
|
||||
xfce4-panel-profiles load "$profiles"/MX-Like.tar.bz2 & ;;
|
||||
'MacOS-Like')
|
||||
enable-global-menus
|
||||
xfconf-query -c xfwm4 -p /general/borderless_maximize -n -t bool -s true &
|
||||
xfconf-query -c xfwm4 -p /general/titleless_maximize -n -t bool -s true &
|
||||
xfconf-query -c xfwm4 -p /general/button_layout -n -t string -s "CMH|" &
|
||||
xfce4-panel-profiles load "$profiles"/MacOS-Like.tar.bz2 & ;;
|
||||
'Gnome-Like')
|
||||
disable-global-menus
|
||||
xfconf-query -c xfwm4 -p /general/borderless_maximize -n -t bool -s true &
|
||||
xfconf-query -c xfwm4 -p /general/titleless_maximize -n -t bool -s false &
|
||||
xfconf-query -c xfwm4 -p /general/button_layout -n -t string -s "|HMC" &
|
||||
xfce4-panel-profiles load "$profiles"/Gnome-Like.tar.bz2 & ;;
|
||||
'TopX-Like')
|
||||
disable-global-menus
|
||||
xfconf-query -c xfwm4 -p /general/borderless_maximize -n -t bool -s true &
|
||||
xfconf-query -c xfwm4 -p /general/titleless_maximize -n -t bool -s false &
|
||||
xfconf-query -c xfwm4 -p /general/button_layout -n -t string -s "|HMC" &
|
||||
xfce4-panel-profiles load "$profiles"/TopX-Like.tar.bz2 & ;;
|
||||
*) exit ;;
|
||||
esac
|
||||
|
||||
sleep 5 && notify-send "$choice layout was enabled"
|
65
tromjaro/xfce/desktop-overlay/etc/skel/.local/bin/layout-switcher
Executable file
65
tromjaro/xfce/desktop-overlay/etc/skel/.local/bin/layout-switcher
Executable file
@ -0,0 +1,65 @@
|
||||
#! /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 ||
|
||||
zensu SKIP_AUTOSNAP= pacman -S --noconfirm vala-panel-appmenu-registrar ||
|
||||
{ notify-send 'Error' 'failed installing vala-panel-appmenu-registrar !\nmake sure you type the correct password\nEnabling the internet connection might solve the issue'; exit; }
|
||||
pacman -Qq vala-panel-appmenu-registrar || 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 ||
|
||||
zensu SKIP_AUTOSNAP= pacman -R --noconfirm vala-panel-appmenu-registrar ||
|
||||
{ notify-send 'Error' 'failed removing vala-panel-appmenu-registrar !\nmake sure you type the correct password'; exit; }
|
||||
pacman -Qq vala-panel-appmenu-registrar && 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"
|
32
tromjaro/xfce/desktop-overlay/etc/skel/.local/bin/theme-switcher
Executable file
32
tromjaro/xfce/desktop-overlay/etc/skel/.local/bin/theme-switcher
Executable file
@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
icons="$HOME"/.local/share/Theme-Switcher
|
||||
|
||||
set_theme() {
|
||||
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'"
|
Reference in New Issue
Block a user