bash function for rpm whatprovides

Sometimes some simple one-liner function can save you a lot of time, like-

wps ()
    rpm -q --whatprovides $(which $1 )
}   # ----------  end of function wps  ----------

wallpaper manager

So, I have been looking for a wallpaper manager with some features like:

1) automatically change wallpaper from my directory list

2) Get wallpapers from internet

Possibly display time and a quote.


Variety does all of that. From variety website :

Variety is a wallpaper manager for Linux systems. It supports numerous desktops and wallpaper sources, including local files and online services: Flickr, Wallhaven, Unsplash, and more.

Where supported, Variety sits as a tray icon to allow easy pausing and resuming. Otherwise, its desktop entry menu provides a similar set of options.

Variety also includes a range of image effects, such as oil painting and blur, as well as options to layer quotes and a clock onto the background.

To install

dnf install variety

Directories with maximum number of files

Lot of times, I want to find the directories with maximum number of files and so I wrote this quick function to do exactly the same


function count_lines ()
    cd $dir
    find . -type d |while read line
        echo -n "$(find $line -type f |wc -l) $line"
        printf "Directories :: %8d\r" $count >&2
    done|sort -n
}   # ----------  end of function count_lines  ----------