Fork me on GitHub

2006/02/01

Recent entries from same category

  1. lftpのファイル名補完 Hatena
  2. tree Hatena
  3. google command Hatena
  4. wine config sidenet 1.9.1 Hatena
  5. CMS-V12 Hatena

はてな
私はウィンドウマネージャにOpenBoxを使っています。ROXとの相性も悪くなく、拡張性もあるからです。
私のOpenBoxの設定では、A-F8キーにWindowsで言うところの「名前を指定して実行」に似たものがアサインされています。
もちろんOpenBoxにはそのようなコマンドは付属していませんので、コマンドgrunを自分で作るわけです。苦笑
以下そのソースです。
#!/bin/bash

PRG=`zenity --entry --title="grun" --text "コマンド" 8 40 2> /dev/null | sed "s/^[ ]*//g"`
if [ "x$PRG" == "x" ]; then
    exit
fi
command $PRG 2> /dev/null
if [ "x$?" != "x0" ]; then
    zenity --error --title="grun" --text "起動出来ません $PRG" 8 40 2> /dev/null &
fi
この、xdialogなどを使わず、gtk2なzenityを使ってるあたりが、GUIへの憧れを捨てきれていない証です。
ただ、私は常に端末(xterm)を開いていますので、このコマンドを使用することは滅多にありませんけどね…。笑

blog comments powered by Disqus
WriteBacks

TrackBack ping me at
Post a comment

writeback message: Ready to post a comment.