Mise à jour de Variety

This commit is contained in:
Breizh 2024-04-22 16:42:01 +02:00
parent 49e1e1f0f1
commit 48bd34c6bf
4 changed files with 23 additions and 31 deletions

View file

@ -79,7 +79,7 @@ URxvt*saveLines: 0
! for 'fake' transparency (without Compton) uncomment the following three lines ! for 'fake' transparency (without Compton) uncomment the following three lines
URxvt*inheritPixmap: true URxvt*inheritPixmap: true
URxvt*transparent: true URxvt*transparent: true
URxvt*shading: 40 URxvt*shading: 15
!URxvt*blurRadius: 24x24 !URxvt*blurRadius: 24x24
! other possible settings: ! other possible settings:

View file

@ -375,7 +375,7 @@ exec --no-startup-id sleep 1m && steam-native -silent -noverifyfiles -language f
#exec --no-startup-id SVPManager #exec --no-startup-id SVPManager
#exec --no-startup-id hp-systray -x #exec --no-startup-id hp-systray -x
exec --no-startup-id sleep 1m && play "$HOME/Musique/WELCOME BACK.wav" exec --no-startup-id sleep 1m && play "$HOME/Musique/WELCOME BACK.wav"
#exec --no-startup-id variety exec --no-startup-id variety
#exec --no-startup-id sleep 5m && qbittorrent #exec --no-startup-id sleep 5m && qbittorrent
# Start i3bar to display a workspace bar (plus the system information i3status if available) # Start i3bar to display a workspace bar (plus the system information i3status if available)

View file

@ -406,6 +406,7 @@ connected_message_on_startup = no
#cyclic_scrolling = no #cyclic_scrolling = no
# #
#lyrics_fetchers = azlyrics, genius, musixmatch, sing365, metrolyrics, justsomelyrics, jahlyrics, plyrics, tekstowo, zeneszoveg, internet #lyrics_fetchers = azlyrics, genius, musixmatch, sing365, metrolyrics, justsomelyrics, jahlyrics, plyrics, tekstowo, zeneszoveg, internet
lyrics_fetchers = azlyrics, musixmatch, sing365, metrolyrics, justsomelyrics, jahlyrics, plyrics, tekstowo, zeneszoveg, internet
# #
#follow_now_playing_lyrics = no #follow_now_playing_lyrics = no
# #

View file

@ -126,38 +126,30 @@ fi
# and KDE will refresh it # and KDE will refresh it
# On Plasma 5.7 and above, the wallpaper choosing is automatic. # On Plasma 5.7 and above, the wallpaper choosing is automatic.
if [ "${KDE_FULL_SESSION}" == "true" ]; then if [ "${KDE_FULL_SESSION}" == "true" ]; then
# Plasma 5.7 introduced a new feature to set the wallpaper via a qdbus script: # Plasma 5.7 introduced a new feature to set the wallpaper via a dbus script:
# https://github.com/KDE/plasma-workspace/commit/903cbfd7e267a4812a6ec222eb7e1b5dd775686f # https://github.com/KDE/plasma-workspace/commit/903cbfd7e267a4812a6ec222eb7e1b5dd775686f
if [[ -n "${KDE_SESSION_VERSION}" && "${KDE_SESSION_VERSION}" == '5' ]]; then plasma_qdbus_script="
let allDesktops = desktops();
# Try to find the Qt 5 version of qdbus. For systems using qtchooser, the binary name is 'qdbus' for (let d of allDesktops) {
# and the Qt version can be selected via the QT_SELECT environment variable. if (d.wallpaperPlugin == 'org.kde.image') {
if command -v qdbus-qt5 &>/dev/null; then d.currentConfigGroup = Array('Wallpaper', 'org.kde.image', 'General');
qdbus_command=qdbus-qt5 d.writeConfig('Image', 'file://""$WP""');
else }
qdbus_command=qdbus
fi
QT_SELECT=5 $qdbus_command org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript "
var allDesktops = desktops();
for (i=0; i < allDesktops.length; i++) {
d = allDesktops[i];
d.wallpaperPlugin = 'org.kde.image';
d.currentConfigGroup = Array('Wallpaper', 'org.kde.image', 'General');
d.writeConfig('Image', 'file://""$WP""')
} }
" "
# Reuse the exit code from qdbus if [[ -n "${KDE_SESSION_VERSION}" && "${KDE_SESSION_VERSION}" -ge '5' ]]; then
qdbus_exitcode="$?" dbus-send --type=method_call --dest=org.kde.plasmashell /PlasmaShell org.kde.PlasmaShell.evaluateScript string:"$plasma_qdbus_script"
# Reuse the exit code from dbus
dbus_exitcode="$?"
if [[ "$qdbus_exitcode" -ne 0 ]]; then if [[ "$dbus_exitcode" -ne 0 && "${KDE_SESSION_VERSION}" -eq '5' ]]; then
# If the script fails, show a notification. # If the script fails, show a notification.
kdialog --title "Variety: cannot change Plasma wallpaper" --passivepopup "Could not change the Plasma 5 wallpaper; \ kdialog --title "Variety: cannot change Plasma wallpaper" --passivepopup "Could not change the Plasma 5 wallpaper; \
make sure that you're using Plasma 5.7+ and have widgets unlocked.\n----\n \ make sure that you're using Plasma 5.7+ and have widgets unlocked.\n----\n \
Due to Plasma limitations, external programs cannot automatically change the wallpaper when the widgets are locked.\n \ Due to Plasma limitations, external programs cannot automatically change the wallpaper when the widgets are locked.\n \
See https://git.io/vprpM for more information." --icon variety 10 # Final number is the length of the popup See https://git.io/vprpM for more information." --icon variety 10 # Final number is the length of the popup
fi fi
exit "$qdbus_exitcode" exit "$dbus_exitcode"
else else
WALLDIR="$(xdg-user-dir PICTURES)/variety-wallpaper" WALLDIR="$(xdg-user-dir PICTURES)/variety-wallpaper"
@ -225,25 +217,24 @@ fi
# For simple WMs, use either feh or nitrogen # For simple WMs, use either feh or nitrogen
# Implementation note: this uses spaces around list items to enforce matching whole words. # Implementation note: this uses spaces around list items to enforce matching whole words.
# This also means that an empty variable won't cause false positives, since it expands to " " # This also means that an empty variable won't cause false positives, since it expands to " "
SIMPLE_WMS=("bspwm" "dwm" "herbstluftwm" "i3" "i3-with-shmlog" "jwm" "LeftWM" "openbox" "qtile" "qtile-venv" "xmonad") SIMPLE_WMS=("bspwm" "dwm" "herbstluftwm" "i3" "i3-gnome" "i3-with-shmlog" "jwm" "LeftWM" "openbox" "qtile" "qtile-venv" "spectrwm" "xmonad")
if [[ " ${SIMPLE_WMS[*]} " = *" $XDG_CURRENT_DESKTOP "* || " ${SIMPLE_WMS[*]} " = *" $XDG_SESSION_DESKTOP "* || if [[ " ${SIMPLE_WMS[*]} " = *" $XDG_CURRENT_DESKTOP "* || " ${SIMPLE_WMS[*]} " = *" $XDG_SESSION_DESKTOP "* ||
" ${SIMPLE_WMS[*]} " = *" $DESKTOP_SESSION "* ]]; then " ${SIMPLE_WMS[*]} " = *" $DESKTOP_SESSION "* ]]; then
if command -v "feh" >/dev/null 2>&1; then if command -v "feh" >/dev/null 2>&1; then
# TODO: This should take the scaling parameter $4 into account and use other options than --bg-fill # TODO: This should take the scaling parameter $4 into account and use other options than --bg-fill
feh --bg-fill "$WP" 2> /dev/null feh --bg-max "$WP" 2> /dev/null
elif command -v "nitrogen" >/dev/null 2>&1; then elif command -v "nitrogen" >/dev/null 2>&1; then
# TODO: This should take the scaling parameter $4 into account and use other options than --set-zoom-fill # TODO: This should take the scaling parameter $4 into account and use other options than --set-zoom-fill
nitrogen --set-zoom-fill --save "$WP" 2> /dev/null nitrogen --set-zoom-fill --save "$WP" 2> /dev/null
fi fi
fi fi
PID=`pidof swaybg`
if [[ -n $SWAYSOCK ]]; then if [[ -n $PID ]]; then
# If swaybg is available, use it as prevents system freeze. # If swaybg is available, use it as prevents system freeze.
# See https://github.com/swaywm/sway/issues/5606 # See https://github.com/swaywm/sway/issues/5606
if command -v "swaybg" >/dev/null 2>&1; then if command -v "swaybg" >/dev/null 2>&1; then
# Grey background flicker is prevented by killing old swaybg process after new one. # Grey background flicker is prevented by killing old swaybg process after new one.
# See https://github.com/swaywm/swaybg/issues/17#issuecomment-851680720 # See https://github.com/swaywm/swaybg/issues/17#issuecomment-851680720
PID=`pidof swaybg`
swaybg -i "$WP" -m fill & swaybg -i "$WP" -m fill &
if [ ! -z "$PID" ]; then if [ ! -z "$PID" ]; then
sleep 1 sleep 1
@ -283,7 +274,7 @@ fi
# NOTE: This config will change the wallpaper after your current awesome theme sets it. # NOTE: This config will change the wallpaper after your current awesome theme sets it.
# As such, the theme's wallpaper will briefly appear before being replaced with Variety's wallpaper. # As such, the theme's wallpaper will briefly appear before being replaced with Variety's wallpaper.
if [[ "$XDG_SESSION_DESKTOP $DESKTOP_STARTUP_ID $DESKTOP_SESSION $XDG_CURRENT_DESKTOP" == *"awesome"* ]]; then if [[ "$XDG_SESSION_DESKTOP $DESKTOP_STARTUP_ID $DESKTOP_SESSION $XDG_CURRENT_DESKTOP" == *"awesome"* ]]; then
echo "local gears = require(\"gears\") gears.wallpaper.maximized(\"$1\", nil)" | awesome-client echo "for s in screen do require(\"gears\").wallpaper.maximized(\"$1\", s) end" | awesome-client
fi fi
# ===================================================================================== # =====================================================================================