Backman is a random/fixed background image setter for wlroots based compositors

Overview

backman

Backman is a random/fixed background image setter for wlroots based compositors

Dependencies:

The program depends on swaybg, python3-toml (or python-toml), python3

Installation:

Meet the required dependencies and run the provided "install" script like this:

sudo ./install   

Prepending the install script with "sudo" or executing in super user environment ensures that it is installed system-wide.

If you are using Arch Linux, there is an AUR package, called "backman". You can install by cloning or using an AUR helper.

Configuration

The configuration for backman resides at ~/.config/backman.toml The configuration follows the toml markup. The configuration contains three options:

  • mode: this parameter can have two values, "fixed" and "random". The "fixed" option is used to have a single image as your background. The "random" option picks a random picture from your specified directories (defined in next configuration paratemer)
  • directories: this paramater is list type. For "random" feature to work, you have to specify directories which would be looked for pictures. Take care that you have to add full path and you can not add such values: "~/Pictures". You have to specify like "/home/user/Pictures"
  • fix_bg: this parameter should contain full path to an image. For "fixed" feature to work, you have to specify a fixed image to be set as background each time

Example configuration 1:
mode = "random"
directories = [ "/home/cat/pix/bg", "/usr/share/backgrounds" ]
fix_bg = "/home/cat/pix/bg/btwarch-black.png"

Example configuration 2: mode = "fixed"
directories = [ "/home/cat/pix/bg", "/usr/share/backgrounds" ]
fix_bg = "/home/cat/pix/bg/btwarch-black.png"

Also note that you can also change these configurations without actually editing the configuration file, itself inside the program. See usage for knowing how.

Usage

usage: backman [-h] [--set] [--return-path]
[--change-mode CHANGE_MODE]
[--set-fix-bg SET_FIX_BG] [--add-dir ADD_DIR]
[--rm-dir RM_DIR]

Set backgrounds in sway and other wlroot based compositors,
either random background image or fixed

optional arguments:
-h, --help show this help message and exit
--set, -s Set the background, either random or
fixed (as specified in configuration)
--return-path, -r Return the path of background that would
be set, either random or fixed
--change-mode CHANGE_MODE, -m CHANGE_MODE
--set-fix-bg SET_FIX_BG, -i SET_FIX_BG
--add-dir ADD_DIR
--rm-dir RM_DIR

  • The --set flag instructs the program to set the background (either fixed or random, as specified in configuration)
  • The --return-path flag instructs the program to return the path of background image to be set (either fixed or random, as specified in configuration)
  • The --change-mode parameter can change the modes between fixed and random
    For example, to change the mode to fixed, you can execute:
backman -m fixed   

To change to random, you can execute:

backman -m random   
  • The --set-fix-bg paramter can be used to set the fixed background image for "fixed" mode.
    For example, to set the image: /home/user/Pictures/1.jpg as fixed background image, you can execute:
backman -i /home/user/Pictures/1.jpg   
  • The --add-dir and --rm-dir can be respectively used to add and remove directories from directories configuration.
    For example, to remove "/home/user/Pictures" directory and add "/usr/share/backgrounds" directory, you can execute:
backman --add-dir /usr/share/backgrounds --rm-dir /home/user/Pictures   

Reminder and tip

The background set by this script (or swaybg) is not persistent across logout and logins. It just disappears after quitting compositor/window manager. To have a persistent feel, add the following command to your autostart script (maybe in your window manager/compositor configuration):

backman -s   

License

This program is licensed under MIT license

Thanks

The project waves out a great thanks to sway team for developing swaybg

You might also like...
An okayish python script to generate a random Euler circuit with given number of vertices and edges.

Euler-Circuit-Test-Case-Generator An okayish python script to generate a random Euler circuit with given number of vertices and edges. Executing the S

A simple and easy to use collection of random python functions.

A simple and easy to use collection of random python functions.

A quick random name generator

Random Profile Generator USAGE & CREDITS Any public or priavte demonstrative usage of this project is strictly prohibited, UNLESS WhineyMonkey10 (http

Random Number Generator Analysis With Python

Random-Number-Generator-Analysis Governor's Honors Program Project to determine

Create password - Generate Random Password with Passphrase

Generate Random Password with Passphrase This is a python code to generate stron

Python Random Number Genrator

This Genrates Random Numbers. This Random Number Generator was made using python. This software uses Time and Random extension. Download the EXE file and run it to get your answer.

Dice Rolling Simulator using Python-random
Dice Rolling Simulator using Python-random

Dice Rolling Simulator As the name of the program suggests, we will be imitating a rolling dice. This is one of the interesting python projects and wi

Color getter (including method to get random color or complementary color) made out of Python

python-color-getter Color getter (including method to get random color or complementary color) made out of Python Setup pip3 install git+https://githu

A (very dirty) experiment to remove layers from a Docker image.

Surgically remove layers from a Docker image (with a chainsaw)

Comments
  • Feature Request - Load from unsplash

    Feature Request - Load from unsplash

    Add an option (or make default?) to make Unsplash api the source of backgrounds. Reference - Random Api - https://source.unsplash.com/random Api Docs - https://unsplash.com/developers

    opened by nickdex 1
Releases(0.4)
Owner
Hemish
Just new to programming and keen to learn more!
Hemish
Lock files using python and cmd

Python_Lock_Files Lock files using python and cmd license feel free to do whatever you want to with these files, i dont take any responsibility tho, u

1 Nov 01, 2021
A simple dork generator written in python that outputs dorks with the domain extensions you enter

Dork Gen A simple dork generator written in python that outputs dorks with the domain extensions you enter in a ".txt file". Usage The code is pretty

Z3NToX 4 Oct 30, 2022
✨ Un juste prix totalement fait en Python par moi, et en français.

Juste Prix ❗ Un juste prix totalement fait en Python par moi, et en français. 🔮 Avec l'utilisation du module "random", j'ai pu faire un choix aléatoi

MrGabin 3 Jun 06, 2021
A set of Python scripts to surpass human limits in accomplishing simple tasks.

Human benchmark fooler Summary A set of Python scripts with Selenium designed to surpass human limits in accomplishing simple tasks available on https

Bohdan Dudchenko 3 Feb 10, 2022
.bvh to .mcfunction file converter.

bvh-to-mcf .bvh file to .mcfunction converter

Hanmin Kim 28 Nov 21, 2022
A color library based on pokemons colors!

pokepalette A simple pokemon color chooser " This repo is based on CDWimmer/PokePalette and was originated from this tweet. If you don't remember your

Thomas Capelle 5 Aug 30, 2021
Script to autocompound 3commas BO:SO based on user provided risk factor

3commas_compounder Script to autocompound 3commas BO:SO based on user provided risk factor Setup Step 1 git clone this repo into your working director

0 Feb 24, 2022
Nmap script to guess* a GitLab version.

gitlab-version-nse Nmap script to guess* a GitLab version. Usage https://github.com/righel/gitlab-version-nse cd gitlab-version-nse nmap target --s

Luciano Righetti 120 Dec 05, 2022
A utility tool to create .env files

A utility tool to create .env files dump-env takes an .env.template file and some optional environmental variables to create a new .env file from thes

wemake.services 89 Dec 08, 2022
extract gene TSS/TES site form gencode/ensembl/gencode database GTF file and export bed format file.

GetTsite python Package extract gene TSS/TES site form gencode/ensembl/gencode database GTF file and export bed format file. Install $ pip install Get

laojunjun 7 Nov 21, 2022
A collection of common regular expressions bundled with an easy to use interface.

CommonRegex Find all times, dates, links, phone numbers, emails, ip addresses, prices, hex colors, and credit card numbers in a string. We did the har

Madison May 1.5k Dec 31, 2022
Definitely legit social credit generator with python

definitely-legit-social-credit-generator I made this simple GUI program for a meme, no cap. Video: https://youtu.be/RmjxKtoli04 How to run: Clone this

Joshua Malabanan 8 Nov 01, 2021
A script to check for common mistakes in LaTeX source files of scientific papers.

LaTeX Paper Linter This script checks for common mistakes in LaTeX source files of scientific papers. Usage python3 paperlint.py file.tex [-i/x inc

Michael Schwarz 12 Nov 16, 2022
✨ Voici un code en Python par moi, et en français qui permet d'exécuter du Javascript en Python.

JavaScript In Python ❗ Voici un code en Python par moi, et en français qui permet d'exécuter du Javascript en Python. 🔮 Une vidéo pour vous expliquer

MrGabin 4 Mar 28, 2022
Auto-generate /etc/hosts for HackTheBox machines

Auto-generate /etc/hosts for HackTheBox machines Save yourself some tedium on getting started on a new machine by having your /etc/hosts ready to go.

3 Feb 16, 2022
A Randomizer Oracle

Tezos Randomizer Tezod Randomizer "Oracle". It's a smart contract that you can call to get a random number between X and Y (for now). It uses entropy

Asbjorn Enge 19 Sep 13, 2022
A Python script that transcript Arcaea chart file (.aff file) into AutoJS touchscreen script which automatically plays the Arcaea chart

ArcaeaAutoplay (AutoJS Version) A Python script that transcript Arcaea chart file (.aff file) into AutoJS touchscreen script which automatically plays

7 Dec 03, 2021
🌲 A simple BST (Binary Search Tree) generator written in python

Tree-Traversals (BST) 🌲 A simple BST (Binary Search Tree) generator written in python Installation Use the package manager pip to install BST. Usage

Jan Kupczyk 1 Dec 12, 2021
A tool to create the basics of a project

Project-Scheduler Instalação Para instalar o Project Maker, você necessita está em um ambiente de desenvolvimento Linux ou wsl com alguma distro debia

2 Dec 17, 2021
Python code to remove empty folders from Windows/Android.

Empty Folder Cleaner is a program that deletes empty folders from your computer or device and removes clutter to improve performance. It supports only windows and android for now.

Dark Coder Cat | Vansh 4 Sep 27, 2022