Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select xinerama head #13

Merged
merged 3 commits into from
Apr 25, 2012
Merged

Select xinerama head #13

merged 3 commits into from
Apr 25, 2012

Conversation

jaypikay
Copy link
Contributor

Fixed the selection of the xinerama heads. New parameter is --head=, where screen starts at 0 for first display, and so on. I also added a get_intvalue function to the ArgParser. I changed the indention if a function had no unified way to indent.

@daf
Copy link
Member

daf commented Apr 24, 2012

Awesome, thank you. Will test/merge tonight.

@daf daf merged commit a2cc260 into l3ib:master Apr 25, 2012
@daf
Copy link
Member

daf commented Apr 25, 2012

Added a slight bit to it - should work with multihead setups as well (didn't really test though, too hard to set that back up again).

I wanted to make it so that if you specified any of the --set-scaled etc modes, you could specify --head and have it work too, but it doesn't look like that even works properly with Xinerama. Some refactoring needed I think.

@jaypikay
Copy link
Contributor Author

When I have enough time to spare I will look at it, too.

@Cloudef
Copy link
Contributor

Cloudef commented Aug 5, 2012

@daf Waiting for this release.
I find nitrogen itself really slow for loads of images.
So having --head work with --setters would allow me to use it with combination of sxiv for example.

@daf
Copy link
Member

daf commented Aug 7, 2012

@Cloudef Was waiting on getting #18 up to snuff, I've just merged it. I'm not sure it's enough to qualify for a release yet, I was hoping to address one or two more issues (the main one being #16 which is pretty key).

@Cloudef
Copy link
Contributor

Cloudef commented Aug 7, 2012

@daf Great :) I'll just pull from the git anyways.

@Cloudef
Copy link
Contributor

Cloudef commented Aug 9, 2012

How does the --save work with this?

@daf
Copy link
Member

daf commented Aug 9, 2012

Likely not properly handled.

On Thursday, August 9, 2012 at 2:58 PM, Jari Vetoniemi wrote:

How does the --save work with this?


Reply to this email directly or view it on GitHub (#13 (comment)).

@Cloudef
Copy link
Contributor

Cloudef commented Aug 9, 2012

Seems like so, I'll workaround it with this for now.

#!/bin/bash
# Set head wallpaper, workaround broken --save in nitrogen
# $1 = head
# $2 = wallpaper

[[ -n "$1" ]] && [[ -n "$2" ]] || { echo "usage: $(basename $0) [head] [file]"; exit 0; }
[[ -f "$2" ]] || { echo "$2 doesn't exist!"; exit 1; }
sed -i "/^\[xin_$1\]/,/^$/d" "$XDG_CONFIG_HOME/nitrogen/bg-saved.cfg" || exit 1
nitrogen --head=$1 --set-auto "$2" &> /dev/null || { nitrogen --restore; exit 1; };
echo "[xin_$1]"         >> "$XDG_CONFIG_HOME/nitrogen/bg-saved.cfg"
echo "file=$2"          >> "$XDG_CONFIG_HOME/nitrogen/bg-saved.cfg"
echo "mode=4"           >> "$XDG_CONFIG_HOME/nitrogen/bg-saved.cfg"
echo "bgcolor=#000000"  >> "$XDG_CONFIG_HOME/nitrogen/bg-saved.cfg"
echo ""                 >> "$XDG_CONFIG_HOME/nitrogen/bg-saved.cfg"
echo "$2 [$1]"

@nim65s
Copy link

nim65s commented Jan 4, 2013

@Cloudef sed has a nice «-i» option ;)
Thanks for this workaround :D

@Cloudef
Copy link
Contributor

Cloudef commented Jan 4, 2013

@nim65s True, I've updated the snippet with few changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants