Mise à jour de Variety
This commit is contained in:
parent
49e1e1f0f1
commit
c987d3cb49
4 changed files with 22 additions and 30 deletions
|
@ -79,7 +79,7 @@ URxvt*saveLines: 0
|
|||
! for 'fake' transparency (without Compton) uncomment the following three lines
|
||||
URxvt*inheritPixmap: true
|
||||
URxvt*transparent: true
|
||||
URxvt*shading: 40
|
||||
URxvt*shading: 15
|
||||
!URxvt*blurRadius: 24x24
|
||||
|
||||
! other possible settings:
|
||||
|
|
|
@ -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 hp-systray -x
|
||||
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
|
||||
|
||||
# Start i3bar to display a workspace bar (plus the system information i3status if available)
|
||||
|
|
|
@ -406,6 +406,7 @@ connected_message_on_startup = no
|
|||
#cyclic_scrolling = no
|
||||
#
|
||||
#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
|
||||
#
|
||||
|
|
|
@ -126,38 +126,30 @@ fi
|
|||
# and KDE will refresh it
|
||||
# On Plasma 5.7 and above, the wallpaper choosing is automatic.
|
||||
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
|
||||
if [[ -n "${KDE_SESSION_VERSION}" && "${KDE_SESSION_VERSION}" == '5' ]]; then
|
||||
|
||||
# Try to find the Qt 5 version of qdbus. For systems using qtchooser, the binary name is 'qdbus'
|
||||
# and the Qt version can be selected via the QT_SELECT environment variable.
|
||||
if command -v qdbus-qt5 &>/dev/null; then
|
||||
qdbus_command=qdbus-qt5
|
||||
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""')
|
||||
plasma_qdbus_script="
|
||||
let allDesktops = desktops();
|
||||
for (let d of allDesktops) {
|
||||
if (d.wallpaperPlugin == 'org.kde.image') {
|
||||
d.currentConfigGroup = Array('Wallpaper', 'org.kde.image', 'General');
|
||||
d.writeConfig('Image', 'file://""$WP""');
|
||||
}
|
||||
}
|
||||
"
|
||||
# Reuse the exit code from qdbus
|
||||
qdbus_exitcode="$?"
|
||||
"
|
||||
if [[ -n "${KDE_SESSION_VERSION}" && "${KDE_SESSION_VERSION}" -ge '5' ]]; then
|
||||
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.
|
||||
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 \
|
||||
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
|
||||
fi
|
||||
exit "$qdbus_exitcode"
|
||||
exit "$dbus_exitcode"
|
||||
|
||||
else
|
||||
WALLDIR="$(xdg-user-dir PICTURES)/variety-wallpaper"
|
||||
|
@ -225,7 +217,7 @@ fi
|
|||
# For simple WMs, use either feh or nitrogen
|
||||
# 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 " "
|
||||
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 "* ||
|
||||
" ${SIMPLE_WMS[*]} " = *" $DESKTOP_SESSION "* ]]; then
|
||||
if command -v "feh" >/dev/null 2>&1; then
|
||||
|
@ -236,14 +228,13 @@ if [[ " ${SIMPLE_WMS[*]} " = *" $XDG_CURRENT_DESKTOP "* || " ${SIMPLE_WMS[*]} "
|
|||
nitrogen --set-zoom-fill --save "$WP" 2> /dev/null
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n $SWAYSOCK ]]; then
|
||||
PID=`pidof swaybg`
|
||||
if [[ -n $PID ]]; then
|
||||
# If swaybg is available, use it as prevents system freeze.
|
||||
# See https://github.com/swaywm/sway/issues/5606
|
||||
if command -v "swaybg" >/dev/null 2>&1; then
|
||||
# Grey background flicker is prevented by killing old swaybg process after new one.
|
||||
# See https://github.com/swaywm/swaybg/issues/17#issuecomment-851680720
|
||||
PID=`pidof swaybg`
|
||||
swaybg -i "$WP" -m fill &
|
||||
if [ ! -z "$PID" ]; then
|
||||
sleep 1
|
||||
|
@ -283,7 +274,7 @@ fi
|
|||
# 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.
|
||||
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
|
||||
|
||||
# =====================================================================================
|
||||
|
|
Loading…
Reference in a new issue