-
-
Notifications
You must be signed in to change notification settings - Fork 720
Module: Image
Paul Rey edited this page Jan 23, 2024
·
6 revisions
The image
module displays an image from a path.
Addressed by image
option | typeof | default | description |
---|---|---|---|
path |
string | The absolute path to the image | |
exec |
string | The path to the script, which should return image path file. It will only execute if the path is not set | |
size |
integer | The width/height to render the image | |
interval |
integer | The interval (in seconds) in which the information gets polled | |
signal |
integer | The signal number used to update the module. The number is valid between 1 and N, where SIGRTMIN+N = SIGRTMAX . |
|
on-click |
string | Command to execute when clicked on the module. | |
on-click-middle |
string | Command to execute when you middle clicked on the module using mousewheel. | |
on-click-right |
string | Command to execute when you right clicked on the module. | |
on-update |
string | Command to execute when the module is updated. | |
on-scroll-up |
string | Command to execute when scrolling up on the module. | |
on-scroll-down |
string | Command to execute when scrolling down on the module. | |
smooth-scrolling-threshold |
double | Threshold to be used when scrolling. | |
tooltip |
bool | true |
Option to enable tooltip on hover. |
Similar to the custom module, output values of the script is newline separated. The following is the output format:
$path\n$tooltip
"image#album-art": {
"path": "/tmp/mpd_art",
"size": 32,
"interval": 5,
"on-click": "mpc toggle"
}
"image/album-art": {
"exec":"~/.config/waybar/custom/spotify/album_art.sh",
"size": 32,
"interval": 30,
}
#!/bin/bash
album_art=$(playerctl -p spotify metadata mpris:artUrl)
if [[ -z $album_art ]]
then
# spotify is dead, we should die too.
exit
fi
curl -s "${album_art}" --output "/tmp/cover.jpeg"
echo "/tmp/cover.jpeg"
#image
#image.empty
- Home
- Installation
- Configuration
- Styling
- Examples
- FAQ
- Modules:
- Backlight/Slider
- Backlight
- Battery
- Bluetooth
- CPU
- Cava
- Clock
- Custom
- DWL
- Disk
- Gamemode
- Group
- Hyprland
- Idle Inhibitor
- Image
- JACK
- Keyboard State
- Language
- Load
- MPD
- MPRIS
- Memory
- Network
- Niri
- Power Profiles Daemon
- Privacy
- PulseAudio/Slider
- PulseAudio
- River
- Sndio
- Sway
- Systemd failed units
- Taskbar
- Temperature
- Tray
- UPower
- User
- WirePlumber
- Workspaces
- Writing Modules