You are not logged in.

#1 2024-09-17 17:00:04

saleem
Member
Registered: 2011-09-21
Posts: 168

Randomized wallpapers on Plasma

Okay so I am trying to use a script

#!/usr/bin/env bash
while true;
do
   
   feh --bg-scale "$(find -L ~/wallpapers/  -iname '*.jpg' -o -iname '*.png' | shuf -n 1)"
   sleep 5m
done &

  named as wallpaper.sh which I am auto starting by adding it to autostart.sh script which I have added to the autostart of system settings . The  autostart.sh script script is working perfectly on plasma to start different programs on startup of desktop . I am using this script on openbox and wallpaper script as well and I am expecting it should run randomized wallpapers on plasma as well but it is not. I am just wondering what am I doing incorrectly?
Help is needed here please.

Offline

#2 2024-09-17 17:09:26

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: Randomized wallpapers on Plasma

Plasma is probably covering up the window used by feh with it's own wallpaper. You will have to use a tool that integrates with that instead.

Just because I can't help it:

#!/bin/sh
while feh --bg-scale --randomize ~/wallpapers/*.{jpg,png} ; do
   sleep 5m
done

EDIT: oh, hello again saleem smile

Last edited by Head_on_a_Stick (2024-09-17 17:29:24)


Jin, Jîyan, Azadî

Offline

#3 2024-09-17 17:48:04

saleem
Member
Registered: 2011-09-21
Posts: 168

Re: Randomized wallpapers on Plasma

Head_on_a_Stick wrote:

Plasma is probably covering up the window used by feh with it's own wallpaper. You will have to use a tool that integrates with that instead.

Just because I can't help it:

#!/bin/sh
while feh --bg-scale --randomize ~/wallpapers/*.{jpg,png} ; do
   sleep 5m
done

EDIT: oh, hello again saleem smile

Hello again too smile

I am just doing out of the box things on Plasma e.g autostart file from openbox

#!/bin/bash

########################################################
### Arch Linux Plasma Autostart configuration file - ###
########################################################

export TERMINAL=terminator
export EDITOR=geany
export BROWSER=firefox
export LANG=en_US.UTF-8
setxkbmap --layout "us" &

killall -9 picom dunst nm-applet volumeicon xfce4-power-manager

## Startup applications -
(sleep 3s && terminator) &
(sleep 5s && firefox) &
(sleep 5s && pcmanfm) &
(sleep 7s && gksudo pcmanfm /etc/) &
(sleep 7s && gksudo pcmanfm /var/cache/pacman/pkg/) &
(sleep 8s && gksudo pcmanfm /etc/pacman.d/) &
(sleep 10s && gksudo geany /etc/pacman.conf) &
(sleep 6s && caffeine) &
(unclutter -idle 2) &

## Dunst (Notifications Daemon)
(sleep 8 && dunst -conf  ~/.config/dunst/dunstrc) &

## Volume control for systray
(sleep 2s && pnmixer) &
(sleep 1s && volumeicon) &

## Volume keys daemon
(sleep 1s && xfce4-volumed-pulse) &

## Volume keys daemon
xfce4-volumed &

## Start GNOME PolicyKit automatically -
sleep 1 && /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &

# Compositing manager -
picom -b --config ~/.config/picom/picom.conf &

## Wallpaper setter -
~/wallpaper.sh &
#feh --bg-fill /home/saleem/.backgrounds/Archlinux_Wallpaper_by_trapd00r.png &
#nitrogen --restore &

## NetworkManager Applet -
nm-applet &

## Run Clipboard Manager -
clipit &

## Create user directories -
sleep 1 && /usr/bin/xdg-user-dirs-update &

## Screen brightness -
xbacklight -set 100 &

## Set keyboard settings - 250 ms delay and 25 cps (characters per second) repeat rate.
## Adjust the values according to your preferances.
xset r rate 250 25 &

# Turn on/off system beep.
xset b on

## Enable power management -
xfce4-power-manager &

# Battery monitor -
sleep 3 && cbatticon &

## Low battery notifier -
~/scripts/low_bat_notifier.sh &

## Automatic time update -
sudo tzupdate &

## Disable Xorg screensaver
xset -dpms &
xset s off &

## Run the conky
conky -q &

# vim:ft=sh:

## Note*: some programs, such as 'nm-applet' are run via XDG autostart.
## Run '/usr/lib/openbox/openbox-xdg-autostart --list' to list any
## XDG autostarted programs.
## Have fun & happy ArchianOSing'! :)

starts things as per my need on plasma as well but I wonder how to use wallpaper script! perhaps first disable plasma wallpaper function? its just a wild experiment smile

Offline

#4 2024-09-17 18:02:16

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: Randomized wallpapers on Plasma

Looks like Plasma has it's own wallpaper slideshow feature: https://www.kubuntuforums.net/forum/gen … post674965

Off topic for this thread but don't start subshells and add ampersands after every command in autostart scripts, unnecessary forking can cause race conditions and conflicts. Only add an ampersand if the command doesn't return the prompt when run from the shell.

EDIT: and yes, the openbox documentation is incorrect on this issue big_smile

Last edited by Head_on_a_Stick (2024-09-17 18:04:03)


Jin, Jîyan, Azadî

Offline

#5 2024-09-17 18:39:47

saleem
Member
Registered: 2011-09-21
Posts: 168

Re: Randomized wallpapers on Plasma

Head_on_a_Stick wrote:

Looks like Plasma has it's own wallpaper slideshow feature: https://www.kubuntuforums.net/forum/gen … post674965

Off topic for this thread but don't start subshells and add ampersands after every command in autostart scripts, unnecessary forking can cause race conditions and conflicts. Only add an ampersand if the command doesn't return the prompt when run from the shell.

EDIT: and yes, the openbox documentation is incorrect on this issue big_smile

Thank you Matthew smile I knew about this plasma wallpaper slide show but could not locate it , and wanted to try feh . Now about the script , I just obsessively over tweak things smile

Offline

Board footer

Powered by FluxBB