Coder Social home page Coder Social logo

blurme's Introduction

blurme

blurme v1.0 Codename MEH (My Eyes Hurt) is a small script which will blur your feh set background if any window, or rofi is open. Furthermore there are some options, which allow you to change the default behaviour a bit. Read more about the options down below.

Please feel free to fork it, make pull requests and use it in your own projects.

This is my first project i publish. Please be gentle on me :)

How to start

Requirements

  1. wmctrl: This script makes use of wmctrl to get the current workspace number and to clarify, whether any window is open. It's essential!
  2. feh: Furthermore you'll need feh to set your background image(s).
  3. imagemagick: And last but not least imagemagick is mandatory to blur the images

Download and ...

  1. Place it anywhere you like (e.g. ~/.scripts)
  2. Make it executable (chmod +x ~/.scripts/blurme)

How to run it

Manual start

Run it once in a terminal of your choice with ~/.scripts/blurme

Autostart

i3

Add the line "exec --no-startup-id ~/.scripts/blurme &" to your i3 config.

bspwm

Add the line "sh ~/.scripts/blurme &" to ~/.xinitrc

openbox

Add the line "sh ~/.scripts/blurme &" to ~/.config/openbox/autostart

Options

There are several optional arguments provided that may be used. These include:

  • -a: Add another program (process name), which will start the blur effect
  • -c: set custom directory for transition images (default: ~/.cache/blurme)
  • -d: Set custom directory (default: ~/.local/share/blurme)
  • -t: Set custom transition time in sec (default: 0.01)
  • -v: Show additional output (verbose)
  • -h: Show all these parameters

blurme's People

Contributors

8r2y5 avatar ganifladi avatar gergesh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blurme's Issues

Using with Nitrogen

Hello! The script uses feh to get the walpaper, but there is any way that i could use Nitrogen instead?
When i ran the script it got the wallpaper i first set-up with feh before start using Nitrogen, and i coudn't manage to change it.

Script is slow

I saw in various demo images that the blur script works like a contiuous bur when the current workspace window is closed, but mine works slow. What can I do?

When trying to change the time i get an error

When executing blurme -t 0.5, i get an error that says:

X Error of failed request: BadWindow (invalid window parameter)
Major opcode of failed request: 20 (X_GetProperty)
Resource id in failed request: 0x2c00007
Serial number of failed request: 13
Current serial number in output stream: 13

What i'm suposed to do?

Edit: it seems that the error is magically gone, i don't know what happened, now it works fine :)

Add support for multiple monitors

blurme is breaking my dual monitor setup by only setting one wallpaper.

The command I use is feh --bg-fill right_wallpaper.jpg --bg-fill left_wallpaper.jpg

It would be awesome if blurme supported this kind of setup!

Thanks

No image is blurred

Command output

➜ bash .bin/blurme/blurme -v
---------------------------------------
BLURME v1.0 Codename MEH (My Eyes Hurt)
---------------------------------------
BLURME: Workingdir is set to /home/deleuze/.local/share/blurme
BLURME: Cache (contains transition images) is set to /home/deleuze/.cache/blurme
cp: cannot stat 'feh': No such file or directory
BLURME: Huh?! Background is not blurred, let's fix that!
BLURME: Unblurred original wallpaper is feh
BLURME: Could'nt find transition images in cachedir. Will create them on the fly.
BLURME: Create transition images ...
convert: unable to open image `/home/deleuze/.local/share/blurme/copied-bg': No such file or directory @ error/blob.c/OpenBlob/2701.
convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/504.
convert: no images defined `/home/deleuze/.cache/blurme/trans-0' @ error/convert.c/ConvertImageCommand/3258.
BLURME: 10%
convert: unable to open image `/home/deleuze/.local/share/blurme/copied-bg': No such file or directory @ error/blob.c/OpenBlob/2701.
convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/504.
convert: no images defined `/home/deleuze/.cache/blurme/trans-1' @ error/convert.c/ConvertImageCommand/3258.
BLURME: 20%
convert: unable to open image `/home/deleuze/.local/share/blurme/copied-bg': No such file or directory @ error/blob.c/OpenBlob/2701.
convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/504.
convert: no images defined `/home/deleuze/.cache/blurme/trans-2' @ error/convert.c/ConvertImageCommand/3258.
BLURME: 30%
convert: unable to open image `/home/deleuze/.local/share/blurme/copied-bg': No such file or directory @ error/blob.c/OpenBlob/2701.
convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/504.
convert: no images defined `/home/deleuze/.cache/blurme/trans-3' @ error/convert.c/ConvertImageCommand/3258.
BLURME: 40%
convert: unable to open image `/home/deleuze/.local/share/blurme/copied-bg': No such file or directory @ error/blob.c/OpenBlob/2701.
convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/504.
convert: no images defined `/home/deleuze/.cache/blurme/trans-4' @ error/convert.c/ConvertImageCommand/3258.
BLURME: 50%
convert: unable to open image `/home/deleuze/.local/share/blurme/copied-bg': No such file or directory @ error/blob.c/OpenBlob/2701.
convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/504.
convert: no images defined `/home/deleuze/.cache/blurme/trans-5' @ error/convert.c/ConvertImageCommand/3258.
BLURME: 60%
convert: unable to open image `/home/deleuze/.local/share/blurme/copied-bg': No such file or directory @ error/blob.c/OpenBlob/2701.
convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/504.
convert: no images defined `/home/deleuze/.cache/blurme/trans-6' @ error/convert.c/ConvertImageCommand/3258.
BLURME: 70%
convert: unable to open image `/home/deleuze/.local/share/blurme/copied-bg': No such file or directory @ error/blob.c/OpenBlob/2701.
convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/504.
convert: no images defined `/home/deleuze/.cache/blurme/trans-7' @ error/convert.c/ConvertImageCommand/3258.
BLURME: 80%
convert: unable to open image `/home/deleuze/.local/share/blurme/copied-bg': No such file or directory @ error/blob.c/OpenBlob/2701.
convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/504.
convert: no images defined `/home/deleuze/.cache/blurme/trans-8' @ error/convert.c/ConvertImageCommand/3258.
BLURME: 90%
convert: unable to open image `/home/deleuze/.local/share/blurme/copied-bg': No such file or directory @ error/blob.c/OpenBlob/2701.
convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/504.
convert: no images defined `/home/deleuze/.cache/blurme/trans-9' @ error/convert.c/ConvertImageCommand/3258.
BLURME: 100%
BLURME: Done!

My .fehbg:

#!/bin/sh
'feh' '--bg-fill' '/usr/share/backgrounds/adapta/google_pixel_background_city1.png' 

The file permissions:

➜ la /usr/share/backgrounds/adapta 
.rw-r--r-- 6.7M deleuze 10 May  2:15 google_pixel_background_city1.png

Add support for wal

blurme doesn't play nice with wal right now, would you consider adding support for it?

Support for different images per workspace

Hi,
Love the concept of this and it does work as intended, except for unique images per workspace, it overwrites them with the original. Any chance of supporting this?

This is what I have to make each wallpaper unique.

xprop -spy -root _NET_CURRENT_DESKTOP | while read -r event; do
    num=$(i3-msg -t get_workspaces | jq ".[] | select(.focused==true) | .num")
    feh --bg-fill "/home/$USER/pic/walls/${num}.jpg"
done

So in my walls directory are a number of jpeg images numbered 1 - 10 which then get set per workspace.

Regards

Blur loop

Hello I have i3 on Arch, when I execute the script it start bluring the wallpaper but when it's finished it don't stay like this. The output of -v look like this

BLURME: Blur wallpaper ...
BLURME: 10%
BLURME: 20%
BLURME: 30%
BLURME: 40%
BLURME: 50%
BLURME: 60%
BLURME: 70%
BLURME: 80%
BLURME: 90%
BLURME: 100%
BLURME: Done!
BLURME: Blur wallpaper ...
BLURME: 10%
BLURME: 20%
BLURME: 30%
BLURME: 40%
BLURME: 50%
BLURME: 60%
BLURME: 70%
BLURME: 80%
BLURME: 90%
BLURME: 100%
BLURME: Done!

and it keep doing that forever.

Issue with feh loading images

Upon executing the script, I get a long, never ending series of errors from feh saying it cannot load the images in /home/user/.cache/blurme/

Here are the errors:
feh WARNING: /home/austin/.cache/blurme/trans-0 does not exist - skipping feh: No loadable images specified. See 'feh --help' or 'man feh' for detailed usage information feh WARNING: /home/austin/.cache/blurme/trans-1 does not exist - skipping feh: No loadable images specified. See 'feh --help' or 'man feh' for detailed usage information feh WARNING: /home/austin/.cache/blurme/trans-2 does not exist - skipping feh: No loadable images specified. See 'feh --help' or 'man feh' for detailed usage information feh WARNING: /home/austin/.cache/blurme/trans-3 does not exist - skipping feh: No loadable images specified. See 'feh --help' or 'man feh' for detailed usage information feh WARNING: /home/austin/.cache/blurme/trans-4 does not exist - skipping feh: No loadable images specified. See 'feh --help' or 'man feh' for detailed usage information feh WARNING: /home/austin/.cache/blurme/trans-5 does not exist - skipping feh: No loadable images specified. See 'feh --help' or 'man feh' for detailed usage information feh WARNING: /home/austin/.cache/blurme/trans-6 does not exist - skipping feh: No loadable images specified. See 'feh --help' or 'man feh' for detailed usage information feh WARNING: /home/austin/.cache/blurme/trans-7 does not exist - skipping feh: No loadable images specified. See 'feh --help' or 'man feh' for detailed usage information feh WARNING: /home/austin/.cache/blurme/trans-8 does not exist - skipping feh: No loadable images specified. See 'feh --help' or 'man feh' for detailed usage information feh WARNING: /home/austin/.cache/blurme/trans-9 does not exist - skipping

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.