mirror of
https://github.com/wting/autojump
synced 2024-10-27 20:34:07 +00:00
updated installer
This commit is contained in:
parent
6174509f28
commit
9b87282791
@ -1,3 +1,6 @@
|
|||||||
|
sudo mkdir -p /usr/share/autojump/
|
||||||
|
sudo cp icon.png /usr/share/autojump/
|
||||||
|
sudo cp jumpapplet /usr/bin/
|
||||||
sudo cp autojump /usr/bin/
|
sudo cp autojump /usr/bin/
|
||||||
sudo cp autojump.1 /usr/share/man/man1/
|
sudo cp autojump.1 /usr/share/man/man1/
|
||||||
if [ -d "/etc/profile.d" ]; then
|
if [ -d "/etc/profile.d" ]; then
|
||||||
|
@ -22,8 +22,6 @@ def action(validator,name=None):
|
|||||||
return wrapper
|
return wrapper
|
||||||
|
|
||||||
#validator helper
|
#validator helper
|
||||||
always=lambda x: True
|
|
||||||
|
|
||||||
def has_child_dir(dirname):
|
def has_child_dir(dirname):
|
||||||
def wrapper(path):
|
def wrapper(path):
|
||||||
return os.path.isdir(os.path.join(path,dirname))
|
return os.path.isdir(os.path.join(path,dirname))
|
||||||
@ -81,7 +79,8 @@ def popup(sender,button,activation):
|
|||||||
menu.popup(None,None,gtk.status_icon_position_menu,button,activation,sender)
|
menu.popup(None,None,gtk.status_icon_position_menu,button,activation,sender)
|
||||||
|
|
||||||
def init():
|
def init():
|
||||||
icon=gtk.status_icon_new_from_file("icon.png")
|
if os.path.isfile("icon.png"): icon=gtk.status_icon_new_from_file("icon.png")
|
||||||
|
elif os.path.isfile("/usr/share/autojump/icon.png"): icon=gtk.status_icon_new_from_file("/usr/share/autojump/icon.png")
|
||||||
icon.set_visible(True)
|
icon.set_visible(True)
|
||||||
icon.connect("popup-menu",popup)
|
icon.connect("popup-menu",popup)
|
||||||
|
|
||||||
@ -105,14 +104,14 @@ def cmake(sender,path):
|
|||||||
subprocess.Popen(['cmake-gui','.']).wait()
|
subprocess.Popen(['cmake-gui','.']).wait()
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
@action(always)
|
@action(os.path.isdir)
|
||||||
def terminal(sender,path):
|
def terminal(sender,path):
|
||||||
if not os.fork():
|
if not os.fork():
|
||||||
os.chdir(path)
|
os.chdir(path)
|
||||||
subprocess.Popen(['gnome-terminal']).wait()
|
subprocess.Popen(['gnome-terminal']).wait()
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
|
||||||
@action(always,"navigateur")
|
@action(os.path.isdir,"navigateur")
|
||||||
def nautilus(sender,path):
|
def nautilus(sender,path):
|
||||||
if not os.fork():
|
if not os.fork():
|
||||||
subprocess.Popen(['nautilus',path]).wait()
|
subprocess.Popen(['nautilus',path]).wait()
|
Loading…
Reference in New Issue
Block a user