You are not logged in.
Pages: 1
I've seen in screenshots that people have short lists of their important dot files linked to in their menu, be it fluxbox or I've seen it most in fvwm. I thought I'd chuck together a little script to make my life easier and here it is if anyone's interested. Just start this from your .xinitrc and add this somewhere to your .fluxbox/menu file:
[submenu] (dot files)
[include] (/tmp/.dotfiles)
[end]
and the script:
#!/usr/bin/env python
import sys
import os
import time
home = os.environ.get('HOME')
dotfiles = os.listdir(home)
while 1:
os.system('touch /tmp/.dotfiles')
f = open('/tmp/.dotfiles', 'w')
f.write("[begin]t(dot files)n")
for file in dotfiles:
if os.path.isdir( os.path.join(home, file) ) or file[0] != '.':
pass
else:
f.write("t[exec] (%s) {scite %s/%s}n" % ( file, home, file))
f.write("[end]n")
f.close()
time.sleep(5)
os.system('rm /tmp/.dotfiles')
As is, it'll open the files in scite but it'd be easy to change to use gedit, kwrite, vim, whatever turns you on
Offline
Quick question:
I named the little script dot.files ;-)
When I run it as a test
# sh./dot.files
I get the following error:
./dot.files: line 7: syntax error near unexpected token `('
./dot.files: line 7: `home = os.environ.get('HOME')'
When I try that line by itself in my shell
# home = os.environ.get('HOME')
I get the following error:
-bash: syntax error near unexpected token `('
I know I'm doing 'something' wrong here. Any idea?
Thanks!
--
Some of the world's greatest feats were
accomplished by people not smart enough
to know they were impossible.
-- Doug Larson
Offline
It's a python script, just chmod +x it, and then do ./scriptname, oorrrrr run python scriptname
iphitus
Offline
Dooooooh!
:shock:
I didn't notice that it was python...
Now it works! ;-)
--
Some of the world's greatest feats were
accomplished by people not smart enough
to know they were impossible.
-- Doug Larson
Offline
Pages: 1