-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quotes parsing in startmenu.source #297
Comments
I think this was fixed in beta14 or 15 and python code was replaced with a
module in beta16.
…On Sun, 29 Dec 2024, 06:33 savchenko, ***@***.***> wrote:
Debian testing (13)
sfwbar 1.0~beta13-1+b2
Looks like an escaping issue (?), stdout:
16:54:57.56 python3 << END
import string, sys, fileinput, getopt, os, glob
def main():
# Use categories from XDG spec
catmap = {
'Development': 'Development',
'Education': 'Education',
'Game': 'Games',
'Graphics': 'Graphics',
'Internet': 'Internet',
'Settings': 'Settings',
'Screensaver': 'Settings',
'System': 'System',
'Emulator': 'System',
'Network': 'Internet',
'AudioVideo': 'Multimedia',
'Audio': 'Multimedia',
'Video': 'Multimedia',
'Utility': 'Accessories',
'Accessibility': 'Accessories',
'Core': 'Accessories',
'Office': 'Office'}
cats = list()
outp = list()
print ('MenuClear(\'Menugen_Applications\')')
dirlist = os.environ.get('XDG_DATA_DIRS')
if not dirlist:
dirlist = '/usr/share'
dhome = os.environ.get('XDG_DATA_HOME')
if not dhome:
dhome = os.environ.get('HOME')
if dhome:
dhome = dhome + '/.local/share'
if dhome:
dirlist = dirlist + ':' + dhome
dlist = []
for dir in dirlist.split(':'):
dlist = dlist + sorted(glob.glob(dir + '/applications/*.desktop'))
for dfile in dlist:
de_name = de_icon = de_exec = de_cat = de_disp = ''
fchan = open(dfile)
for dline in fchan.readlines():
try:
(tag, value) = dline.strip().split('=',1)
if tag.strip() == 'Name' and not de_name: # Grab first name
de_name = value.strip()
if tag.strip() == 'Icon':
de_icon = value.strip()
if tag.strip() == 'Exec':
de_exec = value.strip()
if tag.strip() == 'Categories':
de_cat = value.strip()
if tag.strip() == 'NoDisplay':
de_disp = value.strip()
except:
pass
fchan.close()
if (de_name != '') and (de_exec != '') and (de_disp.lower() != 'true'):
de_cat = map_category ( catmap, de_cat )
de_exec = de_exec.replace(' %f','').replace(' %F','').replace(' %u','')
de_exec = de_exec.replace(' %U','').replace(' %c',' '+de_name)
de_exec = de_exec.replace(' %k',' '+dfile).replace(' %i',' '+de_icon)
if not (de_cat in cats):
cats.append(de_cat)
print ('MenuClear(\'Menugen_' + de_cat + '\')')
sub_icon = '%applications-' + de_cat.lower()
if (de_cat.lower() == 'settings'): # these is no applications-settings icon
sub_icon = '%preferences-system'
outp.append('Menu(\'Menugen_Applications\') { SubMenu(\'' + de_cat +
sub_icon + '\',\'Menugen_' + de_cat + '\') }')
outp.append('Menu(\'Menugen_' + de_cat + '\') { Item(\'' + de_name + '%' +
de_icon + '\',Exec \'' + de_exec +'\') }')
for token in sorted(outp):
print(token)
def map_category ( catmap, catlist ):
for cat in catlist.strip().split(';'):
try:
mycat = catmap[cat]
except LookupError:
mycat = ''
if mycat != '':
return mycat
return 'Other'
if __name__ == '__main__':
main()
END:37: missing ')' after 'item'
—
Reply to this email directly, view it on GitHub
<#297>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASHPFFDRK5BPO4A3J2QRBIL2H6JSVAVCNFSM6AAAAABUKQIWB2VHI2DSMVQWIX3LMV43ASLTON2WKOZSG43DEMJSG4YDMNY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Think I know why it's not updated in Do you plan to tag stable/release version in Q1 2025? |
There is a plan to release 1.0 of course, but I'm not sure about q1 2025.
I expect at least another couple of betas before the release.
The current beta will make significant changes with the config rewrite. I
think we'll need some feedback after releasing it before aiming for 1.0.
…On Sun, 29 Dec 2024, 11:07 savchenko, ***@***.***> wrote:
Think I know why it's not updated in testing:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1091451
Do you plan to tag stable/release version in Q1 2025?
—
Reply to this email directly, view it on GitHub
<#297 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASHPFFBATCPLVYSBNGU3LR32H7JX5AVCNFSM6AAAAABUKQIWB2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRUGY4DQNRZGI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looks like an escaping issue (?), stdout:
The text was updated successfully, but these errors were encountered: