Your Latest Workflow Improvement - Desktop Customization & Workflow
neeasade
(18-08-2015, 07:41 PM)Wildefyr Wrote: Nice! I've been thinking of doing something similar with wmutils, get a list of open windows and then select using hjkl; actually should be fairly easy to implement, just need to find ( or write ) a menu select system.

Would such a menu written in wmutils be WM agnostic if the WM was simple enough? That's an interesting proposition.
Wildefyr
(19-08-2015, 09:12 AM)neeasade Wrote:
(18-08-2015, 07:41 PM)Wildefyr Wrote: Nice! I've been thinking of doing something similar with wmutils, get a list of open windows and then select using hjkl; actually should be fairly easy to implement, just need to find ( or write ) a menu select system.

Would such a menu written in wmutils be WM agnostic if the WM was simple enough? That's an interesting proposition.

Yes, it would be.
z3bra
Depends on the WM entirely.
Some WM reparent windows, and thus, won't work.
Some WM keep track of windows in-memory and ignore windows deletion event, and thus won't work.
Some WM relies entirely on EWMH, and thus won't work.
Some WM forbid external programs to handle windows, and thus, won't work.

For now, I've only found cwm (and swm, obviously) to fully integrate with wmutils (though some like ratpoison give good results)
I recently installed OpenBSD and by default it comes with CWM (calm window manager). I've found it to be quite useful as it already comes with search and works great IMO.
jvarg
Remapping my capslock to escape was the best improvement i have had.
vedard
I found a little trick to create a "Recently added" play-list in MPD. It's not perfect because every recently modified files will come at the top of the list.

Code:
cd ~/drv/Music/iTunes/iTunes\ Media/Music
find -iname "*.[mmw][p4a][3av]" -mtime -50 | sort | sed 's/\.\///' > ~/.config/mpd/playlists/recent
swathe
Nothing amazing, but I ditched wordpress for the octopress blogging framework. I have to say I enjoy using it a lot more.
Wildefyr
Wrote this script using fzf to give me an interactive way to view and then kill processes without loading something like htop: (dcat has already mentioned how he hates this tho):
Code:
KILL=/tmp/.kill

ps ax | fzf -m -x --tac | awk '{print $1}' > $KILL

for i in $(seq $(cat $KILL | wc -l)); do
    kill -9 $(cat $KILL | sed "$i!d")
done
neeasade
oh fuck yeah fzf functions.

https://github.com/junegunn/fzf


Code:
fe() {
    # fe - Open the selected files with the default editor
    local files=$(fzf --query="$1" --select-1 --exit-0 | sed -e "s/\(.*\)/\'\1\'/")
    local command="${EDITOR:-vim} -p $files"
    [ -n "$files" ] && eval $command
}

fd() {
    # fd - cd to selected directory
    local dir
    dir=$(find ${1:-*} -path '*/\.*' -prune -o -type d -print 2> /dev/null | fzf +m) &&
    cd "$dir"
}

fh() {
    # fh - repeat history
    eval $( ([ -n "$ZSH_NAME" ] && fc -l 1 || history) | fzf +s --tac | sed 's/ *[0-9]* *//')
}

fkill() {
    # fkill - kill process
    pid=$(ps -ef | sed 1d | fzf -m | awk '{print $2}')
    if [ "x$pid" != "x" ]
    then
        kill -${1:-9} $pid
    fi
}
greduan
What I don't like about fzf is that the install script invades the hell out of your config files. .bashrc and .zshrc IIRC. Otherwise I'd use it all day, nowadays I don't install it because of that.
Eduan / greduan
https://greduan.com
me@greduan.com




Members  |  Stats  |  Night Mode  |  Help