All Projects β†’ xyproto β†’ Wallutils

xyproto / Wallutils

Licence: other
πŸŒ† Utilities for handling monitors, resolutions, wallpapers and timed wallpapers

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Wallutils

Gromit Mpx
Gromit-MPX is an on-screen annotation tool that works with any Unix desktop environment under X11 as well as Wayland.
Stars: ✭ 287 (+97.93%)
Mutual labels:  wayland, gnome, x11
Xsuspender
πŸ‘€ πŸ’» πŸ’€ πŸ”‹ Save battery by auto-suspending unfocused X11 applications.
Stars: ✭ 53 (-63.45%)
Mutual labels:  x11, i3, xorg
X11docker
Run GUI applications and desktops in docker and podman containers. Focus on security.
Stars: ✭ 3,797 (+2518.62%)
Mutual labels:  wayland, x11, xorg
Rofimoji
An emoji and character picker for rofi 😁
Stars: ✭ 319 (+120%)
Mutual labels:  wayland, x11, i3
x11-fractional-display-scaling
Script and instructions to get fractional display scaling working nicely on Linux distros that use X11
Stars: ✭ 52 (-64.14%)
Mutual labels:  xorg, x11, gnome
I3
A fork of the i3 window manager with gaps and some other features
Stars: ✭ 5,512 (+3701.38%)
Mutual labels:  x11, i3, xorg
Oguri
A very nice animated wallpaper daemon for Wayland compositors (WIP: https://github.com/vilhalmer/oguri/milestone/1)
Stars: ✭ 141 (-2.76%)
Mutual labels:  wayland, wallpaper
Peek
Peek makes it easy to create short screencasts of a screen area. It was built for the specific use case of recording screen areas, e.g. for easily showing UI features of your own apps or for showing a bug in bug reports. With Peek, you simply place the Peek window over the area you want to record and press "Record". Peek is optimized for generating animated GIFs, but you can also directly record to WebM or MP4 if you prefer.
Stars: ✭ 8,408 (+5698.62%)
Mutual labels:  wayland, gnome
Sddm
QML based X11 and Wayland display manager
Stars: ✭ 1,031 (+611.03%)
Mutual labels:  wayland, xorg
Arewewaylandyet
Sources for https://arewewaylandyet.com
Stars: ✭ 66 (-54.48%)
Mutual labels:  wayland, gnome
Octobtt
OctoBTT
Stars: ✭ 77 (-46.9%)
Mutual labels:  x11, xorg
Vkmark
Vulkan benchmark
Stars: ✭ 80 (-44.83%)
Mutual labels:  wayland, x11
Swaynagmode
swaynag wrapper for the love of keybindings
Stars: ✭ 21 (-85.52%)
Mutual labels:  wayland, i3
Ksnip
ksnip the cross-platform screenshot and annotation tool
Stars: ✭ 776 (+435.17%)
Mutual labels:  wayland, x11
Paperview
A high performance X11 animated wallpaper setter
Stars: ✭ 999 (+588.97%)
Mutual labels:  wallpaper, x11
Quicktile
Adds window-tiling hotkeys to any X11 desktop. (An analogue to WinSplit Revolution for people who don't want to use Compiz Grid)
Stars: ✭ 719 (+395.86%)
Mutual labels:  utility, x11
Imv
Image viewer for X11/Wayland
Stars: ✭ 652 (+349.66%)
Mutual labels:  wayland, x11
Com.nerdyweekly.animated
Animated GIF wallpaper for KDE Plasma 5
Stars: ✭ 105 (-27.59%)
Mutual labels:  plasma, wallpaper
Connmap
connmap is an X11 desktop widget that shows location of your current network peers on a world map (tested only with i3wm). Made with C and libcairo.
Stars: ✭ 90 (-37.93%)
Mutual labels:  x11, i3
Wayst
A simple terminal emulator
Stars: ✭ 117 (-19.31%)
Mutual labels:  wayland, x11

Wallutils Build Status GoDoc License Go Report Card

  • Detect monitor resolutions and set the desktop wallpaper, for any window manager (please file an issue if your window manager is not supported yet).
  • Supports GNOME timed wallpapers, and includes a utility that can run an event loop for changing them (also supports cross fading).
  • Introduces a new file format for timed wallpapers: The Simple Timed Wallpaper format: Web | Markdown | PDF

Packaging status

Timed Wallpapers

The Mojave timed wallpaper and other timed wallpapers can be set with the settimed command, and will cross fade from image to image as the day progresses:

Included utilities

  • getdpi, for retrieving the average DPI, for all monitors (use -b to see the DPI both horizontally and vertically).
  • lscollection, for listing installed wallpaper collections (use -l for also listing paths and collection names).
  • timedinfo, for showing more information about installed timed wallpapers.
  • lsmon lists the connected monitors and resolutions (use -d for also listing DPI).
  • lstimed for listing installed timed wallpapers (use -l for also listing paths).
  • lswallpaper, for listing all installed wallpapers (use -l and -s to list more information).
  • setcollection, for setting a suitable (in terms of resolution) wallpaper from a wallpaper collection.
  • setrandom, for setting a random wallpaper.
  • settimed, for setting timed wallpapers (will continue to run, to handle time events).
  • setwallpaper can be used for setting a wallpaper (works both over X and the Wayland protocol).
  • wayinfo shows detailed information about the connected monitors, via Wayland.
  • xinfo shows detailed information about the current X setup.
  • xml2stw for converting GNOME timed wallpapers to the Simple Timed Wallpaper format.

Example use of the lsmon utility

$ lsmon
0: 1920x1200
1: 1920x1200
2: 1920x1200

Installing wallutils

Arch Linux

pacman -S wallutils

Fedora

Until an official package is available:

sudo dnf update
sudo dnf install git golang libXcursor-devel libXmu-devel xorg-x11-xbitmaps
git clone https://github.com/xyproto/wallutils
cd wallutils
make
sudo make PREFIX=/usr/local install

Ubuntu

Until an official package is available:

Go 1.11 or later is required, here's an easy way to install Go 1.12:

sudo add-apt-repository ppa:longsleep/golang-backports
sudo apt-get update
sudo apt-get install golang-go

Then install the required dependencies, clone the repository and install wallutils:

sudo apt get install git libx11-dev libxcursor-dev libxmu-dev libwayland-dev libxpm-dev xbitmaps libxmu-headers
git clone https://github.com/xyproto/wallutils
cd wallutils
make
sudo make PREFIX=/usr/local install

Installing a single utility

Using Go 1.11 or later, installing the settimed utility:

go get -u github.com/xyproto/wallutils/cmd/settimed

Wayland or X only

The packages related to X can be removed after building if only wish to keep the Wayland-related functionality. And likewise for X.

Example use of settimed

settimed mojave-timed

Example use of setwallpaper

setwallpaper /path/to/background/image.png

Example use of setrandom

setrandom /usr/share/pixmaps

Example use of the Go package

Retrieve monitor resolution(s)

package main

import (
    "fmt"
    "os"

    "github.com/xyproto/wallutils"
)

func main() {
    // Retrieve a slice of Monitor structs, or exit with an error
    monitors, err := wallutils.Monitors()
    if err != nil {
        fmt.Fprintf(os.Stderr, "%s\n", err)
        os.Exit(1)
    }
    // For every monitor, output the ID, width and height
    for _, monitor := range monitors {
        fmt.Printf("%d: %dx%d\n", monitor.ID, monitor.Width, monitor.Height)
    }
}

Change the wallpaper

fmt.Println("Setting background image to: " + imageFilename)
if err := wallutils.SetWallpaper(imageFilename); err != nil {
    return err
}

Build requirements

  • Go 1.11 or later.
  • A working C compiler (tested with GCC 8.2.1).
  • Header files for Wayland and X.

Runtime requirements

  • libwayland-client.so, for Wayland support.
  • libX11.so, for X support.

It is also possible to build with make static, to only build the utilities that does not depend on any of the above .so files, as statically compiled ELF executables.

Wallpaper collections

The XML format from GNOME for specifying wallpaper collections is not yet supported (and I'm not sure if it's needed). Creating a directory with images where the filename of the images specify the resolution (like wallpaper_5639x3561.jpg) is enough for lscollection to recognize it as a collection (if the directory is placed in /usr/share/backgrounds or /usr/share/wallpapers).

Refreshing the wallpaper after waking from sleep

Send the USR1 signal to the settimed process:

pkill settimed -USR1

This should refresh the wallpaper.

A note about i3

  • When using wallutils together with i3, it works best with also having feh and imlib2 installed.

Setting a wallpaper per monitor

  • Setting a wallpaper per monitor is not supported, yet. Currently, a wallpaper is set for all monitors.

General info

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].