PDA

View Full Version : Main Menu



Azaria
2013-06-14, 15:05
Application->System Tools->Preference->Main Menu

Can't Move Item Up&Down or Uncheck Item

acme
2013-06-15, 14:07
I have the same problem, only that I can uncheck, but not delete

Azaria
2013-06-16, 15:14
thank you for reply

could you tell me how to change main menu layout manual?

i try edit /etc/xdg/menus/gnome-applications.menu but nothing changed...:(

acme
2013-06-18, 14:00
Sorry, but I have never gone into this thing. I used ubuntu and there always worked the menu

kingugo
2013-07-13, 09:41
Sorry, but I have never gone into this thing. I used ubuntu and there always worked the menu

Why commenting then?

prompt_32
2014-03-05, 08:11
I just have created a script, that reads :
~/.local/share/directories ## add names & icons of custom directories here
~/.local/share/applications ## add your .desktop files here

and insert them into Main menu, ( I use Gnome ) .

Here is the code :


#!/bin/bash


CUSTOM_CATEGORIES=""
ORPHAN_FILES=""


for d in ~/.local/share/desktop-directories/*.directory; do
CATEGORIE=`cat "$d"|grep "^Name=" | cut -d \= -f2`
CUSTOM_CATEGORIES="$CATEGORIE ${CUSTOM_CATEGORIES}"

CFILE="$HOME/.config/menus/applications-merged/user-${CATEGORIE}.menu"
[ -f "$CFILE" ] && rm -f "$CFILE" 2>/dev/null

echo "[+] '$CATEGORIE' (($?)$CFILE)"
## xdg-desktop-menu uninstall --novendor --mode user "$d" "$f"

for f in ~/.local/share/applications/*.desktop; do
F_CATEGORIE=`cat "$f"|grep "^Categories=" |grep "$CATEGORIE" `
[ -z "${F_CATEGORIE}" ] && continue
xdg-desktop-menu install --novendor --mode user "$d" "$f"
echo " [$?] $f"
done
done

echo ""

if [ "x$1" = "x-v" ]; then
echo "[!] (`echo $CUSTOM_CATEGORIES|wc -w`) Categories found :$CUSTOM_CATEGORIES"
echo "[?] Orphan files:"
for f in ~/.local/share/applications/*.desktop; do
F_CATEGORIE=''
for d in $CUSTOM_CATEGORIES; do
[ -z "$F_CATEGORIE" ] && F_CATEGORIE=`cat "$f"|grep "^Categories=" |grep "$d"`;
done
[ -n "${F_CATEGORIE}" ] && continue
echo " [?] `basename "$f" .desktop` (`cat "$f"|grep "^Categories="|cut -d \= -f2`)"
done
fi


xdg-desktop-menu forceupdate --mode user || echo "[!] forceupdate error !"
update-menus || echo "[!] update error !"
exit $?




Take care that :
the 'category' field in your .desktop file,
must be the same, as
the 'Name' field, in your .directory file,

and it'll work ....