Files
config/herbstluftwm/cwd_spawn.sh
2016-11-04 18:25:46 +01:00

11 lines
223 B
Bash

#!/bin/bash
ID=$(xdpyinfo | grep focus | cut -f4 -d " ")
PID=$(($(xprop -id $ID | grep -m 1 PID | cut -d " " -f 3) + 2))
if [ -e "/proc/$PID/cwd" ]
then
urxvt -cd $(readlink /proc/$PID/cwd) &
else
urxvt
fi