You are not logged in.

#326 2018-11-08 17:12:47

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 772

Re: Dmenu Hacking Thread

Unstack wrote:

dmenu hack for querying Google. [GIF Preview (>1mb)]

Tell me what you think.

Hey Unstack, I like your tool, especially the 'back & cancel' button.
I'm a nitwit in python but I'm going to try to use that part for other dmenu script, like osx-finder or git-jumper.

As for what your tool actually does, I miss the address together with the search, so you get something like: search enter back enter back enter back etc...
If the URL was visible in the search it would be a winner , for me;)


A little tool I made, alarm based on 'sleep':

if [ -f "$HOME"/.dmenurc ]; then
  . "$HOME"/.dmenurc
else
  demcmd='dmenu'
  dmalarm='dmenu'
fi

alarm_clock() {
  timer=$(echo '' | $demcmd -p "TimeToAlarm:" -w '375')
  (sleep "$timer" | $dmalarm -p "Alarm" -w '220' -x '850' -y '500')
}
alarm_clock

+ teh config lines:

demcmd='dmenu -i -fn Monospace-14:normal -nb #222222 -nf #ff7f50 -sb #222222 -sf #f5deb3'
dmalarm='dmenu -fn Monospace-40:normal -sb #222222 -sf #dd0000'

edit: add e to dmcmd, which is also in my list...

Last edited by qinohe (2018-11-08 17:59:25)

Offline

#327 2018-11-13 11:59:46

msum
Member
Registered: 2017-04-21
Posts: 4

Re: Dmenu Hacking Thread

I often open a new terminal window and want to quickly jump to the working directory that I have in another window. Here is a fragment of my .bashrc for doing that:

choose_from_cwds() {
	for PROCID in $(pgrep '^bash$'); do
		readlink -e /proc/$PROCID/cwd
	done \
	| sort -u \
	| dmenu -l 5
}
alias chd='cd $(choose_from_cwds)'

Offline

Board footer

Powered by FluxBB