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
Animation retargeting tool for Autodesk Maya. Retargets mocap to a custom rig with a few clicks.

Animation Retargeting Tool for Maya A tool for transferring animation data and mocap from a skeleton to a custom rig in Autodesk Maya. Installation: A

Joaen 63 Jan 06, 2023
Two fast AUC calculation implementations for python

fastauc Two fast AUC calculation implementations for python: python-based is approximately 5X faster than the default sklearn.metrics.roc_auc_score()

Vsevolod Kompantsev 26 Dec 11, 2022
Python HTTP Agent Parser

Features Fast Detects OS and Browser. Does not aim to be a full featured agent parser Will not turn into django-httpagentparser ;) Usage import ht

Shekhar 213 Dec 06, 2022
Go through a random file in your favourite open source projects!

Random Source Codes Never be bored again! Staring at your screen and just scrolling the great world wide web? Would you rather read through some code

Mridul Seth 1 Nov 03, 2022
API Rate Limit Decorator

ratelimit APIs are a very common way to interact with web services. As the need to consume data grows, so does the number of API calls necessary to re

Tomas Basham 575 Jan 05, 2023
A collection of custom scripts for working with Quake assets.

Custom Quake Tools A collection of custom scripts for working with Quake assets. Features Script to list all BSP files in a Quake mod

Jason Brownlee 3 Jul 05, 2022
Daiho Tool is a Script Gathering for Windows/Linux systems written in Python.

Daiho is a Script Developed with Python3. It gathers a total of 22 Discord tools (including a RAT, a Raid Tool, a Nuker Tool, a Token Grabberr, etc). It has a pleasant and intuitive interface to faci

AstraaDev 32 Jan 05, 2023
Personal Toolbox Package

Jammy (Jam) A personal toolbox by Qsh.zh. Usage setup For core package, run pip install jammy To access functions in bin git clone https://gitlab.com/

5 Sep 16, 2022
DiddiParser 2: The DiddiScript parser.

DiddiParser 2 The DiddiScript parser, written in Python. Installation DiddiParser2 can be installed via pip: pip install diddiparser2 Usage DiddiPars

Diego Ramirez 3 Dec 28, 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
Collection of code auto-generation utility scripts for the Horizon `Boot` system module

boot-scripts This is a collection of code auto-generation utility scripts for the Horizon Boot system module, intended for use in Atmosphère. Usage Us

4 Oct 11, 2022
Color box that provides various colors‘ rgb decimal code.

colorbox Color box that provides various colors‘ rgb decimal code

1 Dec 07, 2021
A python tool give n number of inputs and parallelly you will get a output by separetely

http-status-finder Hello Everyone!! This is kavisurya, In this tool you can give n number of inputs and parallelly you will get a output by separetely

KAVISURYA V 3 Dec 05, 2021
Random Number Generator Analysis With Python

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

Jack Prewitt 2 Jan 23, 2022
A simple Python app that generates semi-random chord progressions.

chords-generator A simple Python app that generates semi-random chord progressions.

53 Sep 07, 2022
Retrying library for Python

Tenacity Tenacity is an Apache 2.0 licensed general-purpose retrying library, written in Python, to simplify the task of adding retry behavior to just

Julien Danjou 4.3k Jan 05, 2023
A python package containing all the basic functions and classes for python. From simple addition to advanced file encryption.

A python package containing all the basic functions and classes for python. From simple addition to advanced file encryption.

PyBash 11 May 22, 2022
An awesome tool to save articles from RSS feed to Pocket automatically.

RSS2Pocket An awesome tool to save articles from RSS feed to Pocket automatically. About the Project I used to use IFTTT to save articles from RSS fee

Hank Liao 10 Nov 12, 2022
Script to generate a massive volume of data in sql, csv, json or xml format

DataGenerator Made with Python Open for pull requests 1. Dependencies To install required dependencies run pip install -r requirements.txt 2. Executi

icrescenti 3 Sep 20, 2022
PyHook is an offensive API hooking tool written in python designed to catch various credentials within the API call.

PyHook is the python implementation of my SharpHook project, It uses various API hooks in order to give us the desired credentials. PyHook Uses

Ilan Kalendarov 158 Dec 22, 2022