Compare commits
2 Commits
f30d9568c9
...
master
Author | SHA1 | Date |
---|---|---|
NaiJi ✨ | 33ab980cad | |
NaiJi ✨ | 2cda3a69ac |
|
@ -0,0 +1,24 @@
|
||||||
|
This is free and unencumbered software released into the public domain.
|
||||||
|
|
||||||
|
Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||||
|
distribute this software, either in source code form or as a compiled
|
||||||
|
binary, for any purpose, commercial or non-commercial, and by any
|
||||||
|
means.
|
||||||
|
|
||||||
|
In jurisdictions that recognize copyright laws, the author or authors
|
||||||
|
of this software dedicate any and all copyright interest in the
|
||||||
|
software to the public domain. We make this dedication for the benefit
|
||||||
|
of the public at large and to the detriment of our heirs and
|
||||||
|
successors. We intend this dedication to be an overt act of
|
||||||
|
relinquishment in perpetuity of all present and future rights to this
|
||||||
|
software under copyright law.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||||
|
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
|
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
For more information, please refer to <https://unlicense.org>
|
16
README.md
16
README.md
|
@ -1,12 +1,14 @@
|
||||||
# Nitrogen Random
|
# Nitrogen Random
|
||||||
|
|
||||||
Simply changes your nitrogen desktop wallpaper to a random image from provided folder.
|
Simply changes your [nitrogen](https://wiki.archlinux.org/title/Nitrogen) desktop wallpaper to a random image from a folder.
|
||||||
|
|
||||||
### How to run ###
|
### How to run ###
|
||||||
Edit the script and make all variables valid:
|
|
||||||
|
|
||||||
BGSAVED is the path to bg-saved.cfg of nitrogen, must be in your .config/nitrogen folder.
|
* Carefully read the installation script and then launch it:
|
||||||
|
```bash
|
||||||
WALLPAPERS is the path to a folder where all your wallpapers are located.
|
bash install.sh
|
||||||
|
```
|
||||||
You may also put it to crontab.
|
* Follow the instructions.
|
||||||
|
* Optionally edit your .nitrogen-random config file.
|
||||||
|
* Try it by running nitrogen-random.
|
||||||
|
* Optionally add it to your [crontab](https://wiki.archlinux.org/title/Cron)!
|
||||||
|
|
|
@ -0,0 +1,50 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [[ "$EUID" = 0 ]]
|
||||||
|
then
|
||||||
|
echo "Please run without sudo."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d ~/.config/nitrogen/ ]
|
||||||
|
then
|
||||||
|
echo "You don't have nitrogen installed! Please install it."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Now exporting default config file to ~/.config/nitrogen/.nitrogen-random"
|
||||||
|
echo "#Path to bg-saved.cfg of nitrogen, must be in your ~/.config/nitrogen folder." > ~/.config/nitrogen/.nitrogen-random
|
||||||
|
echo "nBGSAVED=/home/${USER}/.config/nitrogen/bg-saved.cfg" >> ~/.config/nitrogen/.nitrogen-random
|
||||||
|
echo " " >> ~/.config/nitrogen/.nitrogen-random
|
||||||
|
echo "#Path to a folder where all your wallpapers are located." >> ~/.config/nitrogen/.nitrogen-random
|
||||||
|
echo "nWALLPAPERS=/home/${USER}/Pictures/" >> ~/.config/nitrogen/.nitrogen-random
|
||||||
|
echo " " >> ~/.config/nitrogen/.nitrogen-random
|
||||||
|
echo "#Nitrogen policy for resizing and scaling." >> ~/.config/nitrogen/.nitrogen-random
|
||||||
|
echo "nMODE=4" >> ~/.config/nitrogen/.nitrogen-random
|
||||||
|
|
||||||
|
echo "nitrogen-random will read config from ~/.config/ folder of ${USER}."
|
||||||
|
decided=false
|
||||||
|
while [ "$decided" == false ]
|
||||||
|
do
|
||||||
|
echo "Choose an option:"
|
||||||
|
echo "1) It's okay, the config will be in /home/${USER}/.config/nitrogen/"
|
||||||
|
echo "2) No, I want to set the path on my own."
|
||||||
|
read input
|
||||||
|
if [ "$input" == "1" ]
|
||||||
|
then
|
||||||
|
decided=true
|
||||||
|
sed -i "s/{username}/${USER}/" nitrogen-random
|
||||||
|
elif [ "$input" == "2" ]
|
||||||
|
then
|
||||||
|
decided=true
|
||||||
|
echo "Please write path to the config file in /usr/local/bin/nitrogen-random manually!"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
chmod u+x ./nitrogen-random
|
||||||
|
echo "Ready to install ./nitrogen-random to /usr/local/bin/"
|
||||||
|
sudo cp -f ./nitrogen-random /usr/local/bin/
|
||||||
|
sudo chown ${USER} /usr/local/bin/nitrogen-random
|
||||||
|
|
||||||
|
echo " "
|
||||||
|
echo " All done! (> < ) "
|
|
@ -1,8 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
nBGSAVED=/home/naiji/.config/nitrogen/bg-saved.cfg
|
#You can move the config .nitrogen-random anywhere, just replace the path here
|
||||||
nWALLPAPERS=/home/naiji/Pictures/wallpapers/lewd/
|
. /home/{username}/.config/nitrogen/.nitrogen-random
|
||||||
nMODE=4
|
|
||||||
|
|
||||||
export DISPLAY=:0
|
export DISPLAY=:0
|
||||||
|
|
Loading…
Reference in New Issue