handymenu est un menu simplifié configurable présentant les applications sous forme d'onglets
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

648 lines
26 KiB

#!/usr/bin/python3
# -*- coding:Utf-8 -*-
# utils for handymenu
import os
import pickle
import gettext
from urllib.parse import unquote_plus
import subprocess
#import mimetypes
# options for handymenu
menuname = "HandyMenu"
configdir = os.path.expanduser('~/.handymenu')
profile = os.getenv('HANDYMENU_PROFILE')
if profile:
configdir = os.path.join(configdir,profile)
configfile=os.path.join(configdir,'handymenu.conf')
noclose=os.path.join(configdir,'handymenu-noclose.conf')
makeaccessfile=os.path.join(configdir,'handymenu-access.conf')
modulesfile=os.path.join(configdir,'handymenu-modules.conf')
hmdir="/usr/share/handymenu"
configcmd="python3 {} {} &".format(os.path.join(hmdir,"handymenu-configuration.py"), configdir)
handy_icons=os.path.join(hmdir,"icons")
handymenuicon=os.path.join(handy_icons,"handymenu.png")
onglet_width = 11
maxonglets = 7
max = 8 # maximum entry in recents
iconsize = 64
button_width = 22
win_max_width = 750
version = "4.2"
auteur = "prx"
licence = "GPLv3"
homepage = "https://debian-facile.org"
def set_default_config():
print("reset configuration")
if not os.path.isdir(configdir):
os.mkdir(configdir)
with open(configfile, 'wb') as pkl:
pickle.dump(hm_default_sections, pkl, pickle.HIGHEST_PROTOCOL)
def load_config():
with open(configfile, 'rb') as pkl:
try:
config = pickle.load(pkl)
except: #ancienne configuration ou config erronée?
set_default_config()
config = load_config()
return(config)
def save_config(conf):
# remove modules firts
modlist = load_modules()
for modid in modlist[1]:
for s in conf:
if s['id'] == modid:
conf.remove(s)
with open(configfile, 'wb') as pkl:
pickle.dump(conf, pkl, pickle.HIGHEST_PROTOCOL)
def add_section(config, section):
config.append(section)
save_config(config)
def move_section(config, section, index):
"""move section of +1 or -1
index = +1 or -1
"""
toreload=False
for s in config:
if s == section:
idx = config.index(s)
if index == -1 : # on recule l'application
if idx > 0 :
config[idx], config[idx-1] = config[idx-1], config[idx]
elif index == 1 : # on avance l'application
if idx < len(config) - 1:
config[idx], config[idx+1] = config[idx+1], config[idx]
save_config(config)
toreload=True
break
return(toreload)
def add_app(config, section, app):
for s in config:
if s == section:
s['apps'].append(app)
save_config(config)
def del_app(config, section, app):
for s in config:
if s == section:
s['apps'].remove(app)
save_config(config)
def mod_app(config, section, app, new):
for s in config:
if s == section:
for a in s['apps']:
if a == app:
a['name'] = new
save_config(config)
def mod_app_icon(config, section, app, newicon):
for s in config:
if s == section:
for a in s['apps']:
if a == app:
a['icon'] = newicon
save_config(config)
def move_app(config, section, app, index):
"""move app of +1 or -1
index = +1 or -1
"""
for s in config:
if s == section:
for a in s['apps']:
if a == app:
idx = s['apps'].index(a)
if index == -1 : # on recule l'application
if idx > 0 :
s['apps'][idx -1], s['apps'][idx] = s['apps'][idx], s['apps'][idx-1]
elif index == 1 : # on avance l'application
if idx < len(s['apps']) - 1:
s['apps'][idx], s['apps'][idx+1] = s['apps'][idx+1], s['apps'][idx]
save_config(config)
break
def open_cmd(cmd):
try:
if cmd.startswith("xdg-open"):
# cas du module récents et des raccourcis fichiers
c = [ "xdg-open", "".join(cmd.split(' ', 1)[1:]) ]
else:
c = [ w for w in cmd.split(' ') ]
subprocess.Popen(c)
return True
except :
print("Execution failed")
return False
def save_modules(moduleslist):
# a modulelist is [index [module1, module2]]
with open(modulesfile, 'wb') as pkl:
pickle.dump(moduleslist, pkl, pickle.HIGHEST_PROTOCOL)
def add_module(module):
modlist = load_modules()
if module not in modlist:
modlist[1].append(module)
save_modules(modlist)
def del_module(module):
modlist = load_modules()
while module in modlist[1]:
modlist[1].remove(module)
save_modules(modlist)
def load_modules():
if os.path.isfile(modulesfile):
with open(modulesfile, 'rb') as pkl:
return(pickle.load(pkl))
else:
return([0,[]])
def set_modules_position(pos):
modlist = load_modules()
modlist[0] = pos
save_modules(modlist)
def get_recently_used(max):
"""return recently used files
only a number of max
"""
f = os.path.expanduser("~/.local/share/recently-used.xbel")
recents = {}
recents['id'] = "_recent_files_"
recents['name'] = ("Fichiers récents")
recents['apps'] = []
if not os.path.isfile(f):
return(recents)
n = 0
with open(f, 'r') as x:
xbel = x.readlines()
xbel.reverse()
name, generic, icon, cmd = False, False, False, False
for line in xbel:
line = line.strip()
if line.startswith("<bookmark href"):
path = line.split('"')[1]
path = unquote_plus(path).replace('file://','',1)
if os.path.isfile(path):
name = os.path.basename(path)
generic = name
cmd = 'xdg-open {}'.format(path)
#mimetype = mimetypes.guess_type(path)[0]
#if mimetype:
# icon = mimetype.replace('/','-')
#else:
# icon = "document-open-recent"
elif line.startswith("<mime:mime-type"):
#icon = line.split('"')[1].replace('/','-')
icon = line.split('"')[1]
if len(recents['apps']) < max and name and generic and icon and cmd:
if path.lower().endswith(".jpeg") or path.lower().endswith(".jpg") \
or path.lower().endswith(".png") or path.lower().endswith(".gif"):
icon = path
app = {'name' : name, 'generic' : generic, 'icon' : icon, 'cmd':cmd}
recents['apps'].append(app)
name, generic, icon, cmd = False, False, False, False
if len(recents['apps']) >= max:
break
return(recents)
"""
def get_most_ffox_viewed(max):
import sqlite3 as sqlite
import shutil
import tempfile
ffoxdirlist = os.listdir(os.path.expanduser('~/.mozilla/firefox'))
ffsqlite = False
for i in ffoxdirlist:
if i.endswith(".default"):
ffsqlite = os.path.join(os.path.expanduser('~/.mozilla/firefox'),i,"places.sqlite")
if not ffsqlite:
return(False)
tf = tempfile.NamedTemporaryFile('r', suffix='.sqlite')
shutil.copyfile(ffsqlite, tf.name)
conn = sqlite.connect(tf.name)
c2 = conn.cursor()
c2.execute("SELECT url,title,favicon_id FROM moz_places ORDER BY visit_count DESC LIMIT ?",(max,))
most_view = {}
most_view['id'] = "_most_ffox_view_"
most_view['name'] = ("Pages les plus visitées")
most_view['apps'] = []
n = 0
for u in c2.fetchall():
if not u[0] or not u[1]: # pour les cas où y a rien
continue
#c2.execute("SELECT data FROM moz_favicons WHERE id=?",(u[2],))
#favicon = c2.fetchone()
#if favicon:
# with open('/tmp/hm-favicon-{}.ico'.format(u[2]), 'wb') as fav:
# fav.write(favicon[0])
# icon = "/tmp/hm-favicon-{}.ico".format(u[2])
#else:
# icon = 'text-html'
icon = 'text-html'
n += 1
name = os.path.basename(u[1])
generic = name
cmd = "xdg-open {}".format(u[0])
app = {'name' : name, 'generic' : generic, 'icon' : icon, 'cmd':cmd}
most_view['apps'].append(app)
if n == max:
break
conn.close()
tf.close()
return(most_view)
"""
imglist = ["""iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABmJLR0QA/wD/AP+gvaeTAAAACXBI
WXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AEEEA0rbaYruAAAA7VJREFUOMttlE1PGl0Yhq/5AoYB
BqmEj1HTpChGY2wTiRs2rt79++/c+he66KpdNOnSaNKGkLRFJYIKRAsMXzNzzrwrpvC2T3I2JzlX
7ud57vso79+//6fVav3b7XZ1KSXLCsMQTdMwTZN0Ok08Hmc2mzEcDpnP5yiKwmqZpsnu7u5I//r1
a/Xjx49nrVZLDYIggtm2zbt37zg8PCSfz5NKpZhMJgyHQz59+kSv14ugiqJgWRb1en2sPz09cXNz
I9vtdiilJAxDFEWhVCpRqVQwTTNSFYvFqFQqHB8fc3FxgRACRVEIwxDTNNnZ2RG67/sIIVjCAHRd
B+Du7o7BYIBhGNi2jWVZzOdzpJQYhoEQInojpURKiR6GYXQJkMvlqNVqnJ6esrW1xatXr7Btm1gs
hmmaeJ7HwcEBm5ubfPjwgUajsTbLCBiGIalUirOzM05OTtjY2MCyLBKJBL7vR8cwDBzHoV6vs7W1
xfn5Oc1m8zdwlV6tVslms3Q6HabTadSqYRjE43F0Xcd13Wj7iqJQq9XWgctNqaqKpmk0m02SySQb
GxvYtk2n0yEWi5FMJonH45imiRCCwWDAy8sLo9EomnnU8hLa6/XQNI3Dw0OOjo4olUokEgkWiwVh
GJLP57EsC8/zeHp64vPnz3S73bUdqEvfSSl5eXmJNjYajfA8D4BMJkM2myUIAsbjMcPhEM/zME0T
3/fRNO23Q5b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ZkzPw5VosmfPBzh0nXXr1rBv3yf84dXXKCpcwT8O
1IwVsv80XVUQgh5NCA6ZTs1zsW424A+y4+OdBAJBUlKS+cGTj5ExKZ3WtnaCoRDLli5GUQS1tQ1s
/c0rhC0LOFsn4pnp1BCCRg3E9skTjML2nqHxxUJRaG4+ylVXzqamtp7k5GReeWU7nd5uIpEIUkJS
UiK2bbNs2SIsK4LLNAnEEZ/Pq+rkCQYgtilSyg/dLmeXZ6JJbBy1EELQ29dPZmYGWVkeFt34JT47
dgLbtsfKcTAYJBAIEIlEmTVrOrcUreBvVdVo47TpsdEBxe1ydkkpP1Sr65r9N8ybLTKSjcKhkIU/
HL3Ac0VROHmqE5fLoK6uEeIw1d5+DNMwaGs7xkg4fME5MSlJT0pgQXYqMSmfLa+ofP/c0Wy7lNzX
0OHD2x+8ZJv+vxrN4gynYU/3YIhAOErEjv1XwLqqYDo1Jp8dTrtGh9Nfnjec/j/H838B0jWTUnTE
DYsAAAAASUVORK5CYII="""]
#app = {'name' : "Description l'application",\
# 'generic' : "Nom générique de l'application",\
# 'icon' : "icône de l'application",\
# 'cmd' : "commande"}
#applist = [app1, app2, app3, ...]
#section = {'name': 'Recent', 'apps' : applist , id : ''}
#sections = [section1, section2,...]
hm_default_sections = \
[\
{'name' : ("Récents"),\
'id': "recent",\
'apps': [\
{'name' : ("Naviguez sur internet"),\
'generic': ("Parcourir le web"),\
'icon' : "/usr/share/handymenu/icons/firefox.png",\
'cmd' : "firefox"\
},\
{'name' : ("Dossier personnel"),\
'generic': ("Parcourir mon dossier personnel"),\
'icon' : "/usr/share/handymenu/icons/file_home.png",\
'cmd' : "exo-open --launch FileManager {}".format(os.path.expanduser("~"))\
},\
{'name' : ("Les Services CHATONS"),\
'generic': ("Services web à échelle humaine, soldaires, respectueux de votre vie privé et décentralisés"),\
'icon' : "/usr/share/handymenu/icons/chatons.png",\
'cmd' : "x-www-browser https://entraide.chatons.org"\
},\
{'name' : ("Manuel de DFiso"),\
'generic': ("Prenez en main votre système"),\
'icon' : "/usr/share/handymenu/icons/df-manuel.png",\
'cmd' : "df-manuel"\
},\
{'name' : ("Liste des applications"),\
'generic': ("Accédez à la liste complète des applications installées"),\
'icon' : "/usr/share/handymenu/icons/appfinder.png",\
'cmd' : "xfce4-appfinder"\
},\
{'name' : ("Suite bureautique"),\
'generic': ("Suite complète LibreOffice"),\
'icon' : "/usr/share/handymenu/icons/libreoffice.png",\
'cmd' : "libreoffice"\
},\
]\
},\
{'name' : ("Internet"),\
'id': 0,\
'apps': [\
{'name' : ("Naviguez sur internet"),\
'generic': ("Parcourir le web"),\
'icon' : "/usr/share/handymenu/icons/firefox.png",\
'cmd' : "firefox"\
},\
{'name' : ("Consulter vos mails"),\
'generic': ("Consultez ou rédigez des courriers électroniques"),\
'icon' : "/usr/share/handymenu/icons/thunderbird.png",\
'cmd' : "thunderbird"\
},\
{'name' : ("Client torrent P2P"),\
'generic': ("Partagez des données en P2P"),\
'icon' : "/usr/share/handymenu/icons/transmission.png",\
'cmd' : "transmission-gtk"\
},\
{'name' : ("Les Services CHATONS"),\
'generic': ("Accéder à des services web décentralisés, à échelle humaine, soldaire, respectueux de votre vie privé"),\
'icon' : "/usr/share/handymenu/icons/chatons.png",\
'cmd' : "x-www-browser https://entraide.chatons.org"\
},\
{'name' : ("Le site de Debian"),\
'generic': ("Le système d'exploitation universel"),\
'icon' : "/usr/share/handymenu/icons/debian.png",\
'cmd' : "x-www-browser https://www.debian.org/index.fr.html"\
},\
{'name' : ("Wikipédia"),\
'generic': ("L'encyclopédie Libre en ligne"),\
'icon' : "/usr/share/handymenu/icons/wikipedia.png",\
'cmd' : "x-www-browser https://fr.wikipedia.org/wiki/Wikip%C3%A9dia:Accueil_principal"\
},\
]\
},\
{'name' : ("Fichiers"),\
'id': 1,\
'apps': [\
{'name' : ("Mes Images"),\
'generic': ("Parcourir mon dossier d'images"),\
'icon' : "/usr/share/handymenu/icons/file_pictures.png",\
'cmd' : "exo-open --launch FileManager {}".format(\
subprocess.check_output(["xdg-user-dir", "PICTURES"]).decode('utf-8').strip())\
},\
{'name' : ("Mes Documents"),\
'generic': ("Parcourir mes documents"),\
'icon' : "/usr/share/handymenu/icons/file_documents.png",\
'cmd' : "exo-open --launch FileManager {}".format(\
subprocess.check_output(["xdg-user-dir", "DOCUMENTS"]).decode('utf-8').strip())\
},\
{'name' : ("Ma Musique"),\
'generic': ("Parcourir ma musique"),\
'icon' : "/usr/share/handymenu/icons/file_music.png",\
'cmd' : "exo-open --launch FileManager {}".format(\
subprocess.check_output(["xdg-user-dir", "MUSIC"]).decode('utf-8').strip())\
},\
{'name' : ("Mes Vidéos"),\
'generic': ("Parcourir mes vidéos"),\
'icon' : "/usr/share/handymenu/icons/file_videos.png",\
'cmd' : "exo-open --launch FileManager {}".format(\
subprocess.check_output(["xdg-user-dir", "VIDEOS"]).decode('utf-8').strip())\
},\
{'name' : ("Téléchargements"),\
'generic': ("Vérifier mes fichiers téléchargés"),\
'icon' : "/usr/share/handymenu/icons/file_download.png",\
'cmd' : "exo-open --launch FileManager {}".format(\
subprocess.check_output(["xdg-user-dir", "DOWNLOAD"]).decode('utf-8').strip())\
},\
{'name' : ("Dossier Public"),\
'generic': ("Parcourir votre dossier de partage"),\
'icon' : "/usr/share/handymenu/icons/file_public.png",\
'cmd' : "exo-open --launch FileManager {}".format(\
subprocess.check_output(["xdg-user-dir", "PUBLICSHARE"]).decode('utf-8').strip())\
},\
{'name' : ("Dossier Personnel"),\
'generic': ("Parcourir mon dossier personnel"),\
'icon' : "/usr/share/handymenu/icons/file_home.png",\
'cmd' : "exo-open --launch FileManager {}".format(os.path.expanduser("~"))\
},\
{'name' : ("Corbeille"),\
'generic': ("Vérifier et vider la corbeille"),\
'icon' : "/usr/share/handymenu/icons/file_trash.png",\
'cmd' : "exo-open --launch FileManager trash:///"\
},\
]\
},\
{'name' : ("Bureautique"),\
'id': 4,\
'apps': [\
{'name' : ("Éditeur de texte"),\
'generic': ("Consulter ou rédiger des fichiers texte"),\
'icon' : "/usr/share/handymenu/icons/text-editor.png",\
'cmd' : "mousepad"\
},\
{'name' : ("Prendre des notes"),\
'generic': ("Post-it minimaliste"),\
'icon' : "/usr/share/handymenu/icons/notes.png",\
'cmd' : "gnote"\
},\
{'name' : ("Visionneuse d'eBooks"),\
'generic': ("Consulter vos livres eBooks"),\
'icon' : "/usr/share/handymenu/icons/epub.png",\
'cmd' : "fbreader"\
},\
{'name' : ("Suite bureautique"),\
'generic': ("Suite complète LibreOffice"),\
'icon' : "/usr/share/handymenu/icons/libreoffice.png",\
'cmd' : "libreoffice"\
},\
{'name' : ("Calculatrice"),\
'generic': ("Effectuer des calculs simples ou complexes"),\
'icon' : "/usr/share/handymenu/icons/calcul.png",\
'cmd' : "gnome-calculator"\
},\
{'name' : ("Scanner un document"),\
'generic': ("Numériser simplement un document"),\
'icon' : "/usr/share/handymenu/icons/scanner.png",\
'cmd' : "simple-scan"\
},\
]\
},\
{'name' : ("Multimédia"),\
'id': 3,\
'apps': [\
{'name' : ("Lecteur multimédia"),\
'generic': ("Visionner une vidéo, un DVD ou écouter un fichier audio"),\
'icon' : "/usr/share/handymenu/icons/vlc.png",\
'cmd' : "vlc"\
},\
{'name' : ("Visionneuse d'images"),\
'generic': ("Consulter vos images et photos"),\
'icon' : "/usr/share/handymenu/icons/image-viewer.png",\
'cmd' : "ristretto"\
},\
{'name' : ("Lecteur de Musique"),\
'generic': ("Profiter de votre musique, de la radio ou créer vos listes de lecture"),\
'icon' : "/usr/share/handymenu/icons/music-player.png",\
'cmd' : "rhythmbox"\
},\
{'name' : ("Graveur de CD/DVD"),\
'generic': ("Sauvegarder vos données sur CD ou DVD"),\
'icon' : "/usr/share/handymenu/icons/burn.png",\
'cmd' : "xfburn"\
},\
{'name' : ("Extraire un CD audio"),\
'generic': ("Sauvegarder un CD audio"),\
'icon' : "/usr/share/handymenu/icons/ripper.png",\
'cmd' : "asunder"\
},\
{'name' : ("Réglage du volume"),\
'generic': ("Ajuster le son de votre ordinateur"),\
'icon' : "/usr/share/handymenu/icons/volume.png",\
'cmd' : "pavucontrol"\
},\
]\
},\
{'name' : ("Aventuriers"),\
'id': 6,\
'apps': [\
{'name' : ("Ouvrir un terminal"),\
'generic': ("Accéder à la ligne de commande"),\
'icon' : "/usr/share/handymenu/icons/terminal.png",\
'cmd' : "exo-open --launch TerminalEmulator"\
},\
{'name' : ("Logithèque Debian"),\
'generic': ("Gestionnaire de logiciels"),\
'icon' : "/usr/share/handymenu/icons/logiciels.png",\
'cmd' : "gnome-software"\
},\
{'name' : ("Liste des applications"),\
'generic': ("Accéder à la liste des applications installées"),\
'icon' : "/usr/share/handymenu/icons/appfinder.png",\
'cmd' : "xfce4-appfinder"\
},\
{'name' : ("Configuration réseau"),\
'generic': ("Configurer votre connexion au réseau"),\
'icon' : "/usr/share/handymenu/icons/network.png",\
'cmd' : "nm-connection-editor"\
},\
{'name' : ("Impression"),\
'generic': ("Ajouter et configurer une imprimante"),\
'icon' : "/usr/share/handymenu/icons/printer.png",\
'cmd' : "system-config-printer"\
},\
{'name' : ("Configurer XFCE"),\
'generic': ("Accéder à la configuration détaillée de XFCE"),\
'icon' : "/usr/share/handymenu/icons/config.png",\
'cmd' : "xfce4-settings-manager"\
},\
]\
},\
{'name' : ("Aide"),\
'id': 6,\
'apps': [\
{'name' : ("Manuel de DFiso"),\
'generic': ("Prenez en main votre système"),\
'icon' : "/usr/share/handymenu/icons/df-manuel.png",\
'cmd' : "df-manuel"\
},\
{'name' : ("Le cahier du débutant"),\
'generic': ("Apprendre à connaître tout Debian"),\
'icon' : "/usr/share/handymenu/icons/lcdd.png",\
'cmd' : "lcdd"\
},\
{'name' : ("Le Wiki Debian-Facile"),\
'generic': ("Wikipedia d'entraide informatique"),\
'icon' : "/usr/share/handymenu/icons/wikidf.png",\
'cmd' : "x-www-browser https://debian-facile.org/wiki"\
},\
{'name' : ("Le forum Debian-Facile"),\
'generic': ("Forum d'entraide informatique francophone"),\
'icon' : "/usr/share/handymenu/icons/forumdf.png",\
'cmd' : "x-www-browser https://debian-facile.org/forum.php"\
},\
{'name' : ("Salon IRC d'entraide"),\
'generic': ("Échanger en temps réel avec la communauté"),\
'icon' : "/usr/share/handymenu/icons/irc.png",\
'cmd' : "hexchat"\
},\
{'name' : ("Git de Debian-Facile"),\
'generic': ("Sources du projet DFiso"),\
'icon' : "/usr/share/handymenu/icons/sources.png",\
'cmd' : "x-www-browser https://debian-facile.org/git/ProjetsDF/dfiso-bullseye"\
},\
]\
}\
]