Re: [dev] [dwm] Fullscreen windows losing focus

2014-02-19 Thread Alexander Hof
Manolo Martínez dixit:
> When, e.g., zathura is in fullscreen mode, one can change focus to
> another window while zathura remains on screen. This can
> be disorienting. Is this a problem with zathura, or something that can be
> patched in dwm?

Actually I find that occasionally useful, whenever I just want to type
in something in a shell real quick without zathura losing fullscreen mode.



Re: [dev] [st] [PATCH] Explicit cast in CEIL macro

2014-06-23 Thread Alexander Hof
Markus Teich dixit:

> [0] http://www.muppetlabs.com/~breadbox/software/tiny/teensy.html

Great read, thanks!

- Alex



Re: [dev] Introducing the imagefile-format

2014-07-28 Thread Alexander Hof
FRIGN dixit:
> Hello,
> 
> after literally dozens of mails discussing a new suckless image-format,
> I sat down last week to reflect on what could be the best of all
> proposed format-specifications.
> 

Awesome. Thanks to everyone who contributed.



Re: [dev] Macbook retina and dwm

2014-10-26 Thread Alexander Hof
FRIGN wrote:
> Refer to this:
> https://wiki.archlinux.org/index.php/xorg#Display_size_and_DPI

Not mentioned there, but working with any screen that communicates it's
physical size correctly:

xrandr --fbmm $(xrandr | /bin/sed -n '/ connected / {s/.* \([0-9]\+\)mm
x \([0-9]\+\)mm/\1x\2/p;q}')



Re: [dev] [surf] web videos idea

2014-11-24 Thread Alexander Hof
Henrique Lengler wrote:

> Thank you guys, but I'm looking for something automatic. Looks like it 
> doesn't exist but would be cool to have something like this.
> Also I don't care about youtube videos or any other type of video system
> that doesn't provide their videos as video files, I think this is wrong 
> and sucks a lot.
> So my interest is in direct video links and pages with html5 video tag, that 
> also point to a video file.
> 
> Regards,

There was a script+patch somewhere that would grab an embedded video and
play it with mplayer/mpv/... by pressing a shortcut defined in your
config.def.h of surf, and as long as you disable javascript and plugins,
surf won't play the video by itself.
I can't remember where I found it, but here's the code:

#define WATCH {.v = (char *[]){ "/bin/sh", "-c", \
"st -e \
yt $(xprop -id $0 _SURF_URI | cut -d \\\" -f 2)", \
winid, NULL } }

[...]

{ MODKEY,   GDK_w,  spawn,  WATCH },

with "yt" being something like the attached script.
#!/bin/mksh
# format="-f34" # leave empty for default
player="mpv --quiet --geometry=50%:50% --keep-open"
tmpdir="$HOME/yt"

url="$1"
filepath="$tmpdir/$(youtube-dl --id --get-filename $format $url)"

youtube-dl -c -o $filepath $format $url &
print "$!" > $filepath.$$.pid

while [ ! -r $filepath ] && [ ! -r $filepath.part ]; do 
printf '%s' "Waiting for youtube-dl..."
sleep 3
done

[ -r $filepath.part ] && $player $filepath.part || $player $filepath
kill $(<$filepath.$$.pid)
rm $filepath.$$.pid


Re: [dev] [st] Rendering Glitch

2013-12-06 Thread Alexander Hof
Raimundo Martins dixit:
> st + tmux + htop: some lines get static and dead. Don't know how to
> explain, they just get outdated. ^L fixes it.

I noticed that too. "tmux set -g default-terminal st-256color" solved
that for me.