mirror of
https://github.com/hyprwm/hyprpaper.git
synced 2024-11-16 22:25:59 +01:00
Update README.md to include example of how to enable backgrounds per workspace (#48)
. --------- Co-authored-by: vaxerski <43317083+vaxerski@users.noreply.github.com>
This commit is contained in:
parent
2bc88dc8c2
commit
83867464c5
1 changed files with 50 additions and 4 deletions
54
README.md
54
README.md
|
@ -28,11 +28,14 @@ Hyprpaper is controlled by the config, like this:
|
|||
*~/.config/hypr/hyprpaper.conf*
|
||||
```
|
||||
preload = /path/to/image.png
|
||||
|
||||
#if more than one preload is desired then continue to preload other backgrounds
|
||||
preload = /path/to/next_image.png
|
||||
# .. more preloads
|
||||
|
||||
wallpaper = monitor,/path/to/image.png
|
||||
|
||||
#set the default wallpaper(s) seen on inital workspace(s) --depending on the number of monitors used
|
||||
wallpaper = monitor1,/path/to/image.png
|
||||
#if more than one monitor in use, can load a 2nd image
|
||||
wallpaper = monitor2,/path/to/next_image.png
|
||||
# .. more monitors
|
||||
```
|
||||
|
||||
|
@ -58,8 +61,51 @@ In any and all cases when you don't mind waiting 300ms for the wallpaper to chan
|
|||
|
||||
# IPC
|
||||
You can use `hyprctl hyprpaper` (if on Hyprland) to issue a keyword, for example
|
||||
|
||||
Example:
|
||||
|
||||
If your wallpapers are stored in *~/Pictures*, then make sure you have already preloaded the desired wallpapers in hyprpaper.conf.
|
||||
|
||||
*~/.config/hypr/hyprpaper.conf*
|
||||
```
|
||||
hyprctl hyprpaper wallpaper DP-1,~/Pictures/myepicpng.png
|
||||
preload = ~/Pictures/myepicpng.png
|
||||
preload = ~/Pictures/myepicpngToo.png
|
||||
preload = ~/Pictures/myepicpngAlso.png
|
||||
#... continue as desired, but be mindful of the impact on memory.
|
||||
```
|
||||
|
||||
In the actual configuration for Hyprland, *hyprland.conf*, variables can be set for ease of reading and to be used as shortcuts in the bind command. The following example uses $w shorthand wallpaper variables:
|
||||
|
||||
*~/.config/hypr/hyprland.conf*
|
||||
```
|
||||
$w1 = hyprctl hyprpaper wallpaper "DP-1,~/Pictures/myepicpng.png"
|
||||
$w2 = hyprctl hyprpaper wallpaper "DP-1,~/Pictures/myepicpngToo.png"
|
||||
$w3 = hyprctl hyprpaper wallpaper "DP-1,~/Pictures/myepicpngAlso.png"
|
||||
#yes use quotes around desired monitor and wallpaper
|
||||
#... continued with desired amount
|
||||
```
|
||||
With the varibles created we can now "exec" the actions.
|
||||
|
||||
Remember in Hyprland we can bind more than one action to a key so in the case where we'd like to change the wallpaper when we switch workspace we have to ensure that the actions are bound to the same key such as...
|
||||
|
||||
*~/.config/hypr/hyprland.conf*
|
||||
```
|
||||
bind=SUPER,1,workspace,1 #Superkey + 1 switches to workspace 1
|
||||
bind=SUPER,1,exec,$w1 #SuperKey + 1 switches to wallpaper $w1 on DP-1 as defined in the variable
|
||||
|
||||
bind=SUPER,2,workspace,2 #Superkey + 2 switches to workspace 2
|
||||
bind=SUPER,2,exec,$w2 #SuperKey + 2 switches to wallpaper $w2 on DP-1 as defined in the variable
|
||||
|
||||
bind=SUPER,3,workspace,3 #Superkey + 3 switches to workspace 3
|
||||
bind=SUPER,3,exec,$w3 #SuperKey + 3 switches to wallpaper $w3 on DP-1 as defined in the variable
|
||||
|
||||
#... and so on
|
||||
```
|
||||
Because the default behavior in Hyprland is to also switch the workspace whenever movetoworkspace is used to move a window to another workspace you may want to include the following:
|
||||
|
||||
```
|
||||
bind=SUPERSHIFT,1,movetoworkspace,1 #Superkey + Shift + 1 moves windows and switches to workspace 1
|
||||
bind=SUPERSHIFT,1,exec,$w1 #SuperKey + Shift + 1 switches to wallpaper $w1 on DP-1 as defined in the variable
|
||||
```
|
||||
|
||||
# Battery life
|
||||
|
|
Loading…
Reference in a new issue