2006/02/01

私はウィンドウマネージャに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)を開いていますので、このコマンドを使用することは滅多にありませんけどね…。笑
Posted at 03:29 | WriteBacks () | Edit
Edit this entry...

wikieditish message: Ready to edit this entry.






















A quick preview will be rendered here when you click "Preview" button.