Merge branch 'master' of http://git.woju.eu/qubes/core-admin-linux
This commit is contained in:
commit
df0db675f2
@ -2,7 +2,7 @@
|
||||
Version=1.0
|
||||
Type=Application
|
||||
Exec=qubes-vm-settings %VMNAME% applications
|
||||
Icon=/usr/share/qubes/icons/qubes.png
|
||||
Icon=qubes-logo
|
||||
Terminal=false
|
||||
Name=%VMNAME%: Add more shortcuts...
|
||||
GenericName=%VMNAME%: Add more shortcuts...
|
||||
|
@ -2,7 +2,7 @@
|
||||
Version=1.0
|
||||
Type=Application
|
||||
Exec=sh -c 'echo firefox | /usr/lib/qubes/qfile-daemon-dvm qubes.VMShell dom0 DEFAULT red'
|
||||
Icon=/usr/share/qubes/icons/dispvm-red.png
|
||||
Icon=dispvm-red
|
||||
Terminal=false
|
||||
Name=DispVM: Firefox web browser
|
||||
GenericName=DispVM: Web browser
|
||||
|
@ -2,4 +2,4 @@
|
||||
Encoding=UTF-8
|
||||
Type=Directory
|
||||
Name=DisposableVM
|
||||
Icon=/usr/share/qubes/icons/dispvm-red.png
|
||||
Icon=dispvm-red
|
||||
|
@ -2,4 +2,4 @@
|
||||
Encoding=UTF-8
|
||||
Type=Directory
|
||||
Name=ServiceVM: %VMNAME%
|
||||
Icon=%VMDIR%/icon.png
|
||||
Icon=%XDGICON%
|
||||
|
@ -2,7 +2,7 @@
|
||||
Version=1.0
|
||||
Type=Application
|
||||
Exec=qvm-start --quiet --tray %VMNAME%
|
||||
Icon=%VMDIR%/icon.png
|
||||
Icon=%XDGICON%
|
||||
Terminal=false
|
||||
Name=%VMNAME%: Start
|
||||
GenericName=%VMNAME%: Start
|
||||
|
@ -2,4 +2,4 @@
|
||||
Encoding=UTF-8
|
||||
Type=Directory
|
||||
Name=Template: %VMNAME%
|
||||
Icon=/usr/share/qubes/icons/template.png
|
||||
Icon=qubes-logo
|
||||
|
@ -2,4 +2,4 @@
|
||||
Encoding=UTF-8
|
||||
Type=Directory
|
||||
Name=Domain: %VMNAME%
|
||||
Icon=%VMDIR%/icon.png
|
||||
Icon=%XDGICON%
|
||||
|
@ -3,11 +3,14 @@ SRC=$1
|
||||
DSTDIR=$2
|
||||
VMNAME=$3
|
||||
VMDIR=$4
|
||||
XDGICON=$5
|
||||
|
||||
DST=$DSTDIR/$VMNAME-$(basename $SRC)
|
||||
|
||||
sed -e "s/%VMNAME%/$VMNAME/" \
|
||||
sed \
|
||||
-e "s/%VMNAME%/$VMNAME/" \
|
||||
-e "s %VMDIR% $VMDIR " \
|
||||
-e "s/%XDGICON%/$XDGICON/" \
|
||||
<$SRC >$DST
|
||||
|
||||
|
||||
|
@ -3,9 +3,12 @@ SRC=$1
|
||||
DST=$2
|
||||
VMNAME=$3
|
||||
VMDIR=$4
|
||||
XDGICON=$5
|
||||
|
||||
sed -e "s/%VMNAME%/$VMNAME/" \
|
||||
sed \
|
||||
-e "s/%VMNAME%/$VMNAME/" \
|
||||
-e "s %VMDIR% $VMDIR " \
|
||||
-e "s/%XDGICON%/$XDGICON/" \
|
||||
<$SRC >$DST
|
||||
|
||||
|
||||
|
@ -26,6 +26,7 @@ VMTYPE=$3
|
||||
if [ -z "$VMTYPE" ]; then
|
||||
VMTYPE=appvms
|
||||
fi
|
||||
XDGICON=$4
|
||||
VMDIR=/var/lib/qubes/$VMTYPE/$VMNAME
|
||||
APPSDIR=$VMDIR/apps
|
||||
|
||||
@ -38,11 +39,11 @@ mkdir -p $APPSDIR
|
||||
if [ "$SRCDIR" != "none" ]; then
|
||||
echo "--> Converting Appmenu Templates..."
|
||||
if [ -r "$VMDIR/whitelisted-appmenus.list" ]; then
|
||||
cat $VMDIR/whitelisted-appmenus.list | xargs -I{} /usr/libexec/qubes-appmenus/convert-apptemplate2vm.sh $SRCDIR/{} $APPSDIR $VMNAME $VMDIR
|
||||
cat $VMDIR/whitelisted-appmenus.list | xargs -I{} /usr/libexec/qubes-appmenus/convert-apptemplate2vm.sh $SRCDIR/{} $APPSDIR $VMNAME $VMDIR $XDGICON
|
||||
else
|
||||
find $SRCDIR -name "*.desktop" $CHECK_WHITELISTED -exec /usr/libexec/qubes-appmenus/convert-apptemplate2vm.sh {} $APPSDIR $VMNAME $VMDIR \;
|
||||
find $SRCDIR -name "*.desktop" $CHECK_WHITELISTED -exec /usr/libexec/qubes-appmenus/convert-apptemplate2vm.sh {} $APPSDIR $VMNAME $VMDIR $XDGICON \;
|
||||
fi
|
||||
/usr/libexec/qubes-appmenus/convert-apptemplate2vm.sh /usr/share/qubes-appmenus/qubes-appmenu-select.desktop $APPSDIR $VMNAME $VMDIR
|
||||
/usr/libexec/qubes-appmenus/convert-apptemplate2vm.sh /usr/share/qubes-appmenus/qubes-appmenu-select.desktop $APPSDIR $VMNAME $VMDIR $XDGICON
|
||||
|
||||
if [ "$VMTYPE" = "vm-templates" ]; then
|
||||
DIR_TEMPLATE=/usr/share/qubes-appmenus/qubes-templatevm.directory.template
|
||||
@ -51,7 +52,7 @@ if [ "$SRCDIR" != "none" ]; then
|
||||
else
|
||||
DIR_TEMPLATE=/usr/share/qubes-appmenus/qubes-vm.directory.template
|
||||
fi
|
||||
/usr/libexec/qubes-appmenus/convert-dirtemplate2vm.sh $DIR_TEMPLATE $APPSDIR/$VMNAME-vm.directory $VMNAME $VMDIR
|
||||
/usr/libexec/qubes-appmenus/convert-dirtemplate2vm.sh $DIR_TEMPLATE $APPSDIR/$VMNAME-vm.directory $VMNAME $VMDIR $XDGICON
|
||||
fi
|
||||
|
||||
echo "--> Adding Apps to the Menu..."
|
||||
|
@ -78,12 +78,12 @@ def QubesVm_appmenus_create(self, verbose=False, source_template = None):
|
||||
|
||||
try:
|
||||
if source_template is not None:
|
||||
subprocess.check_call ([system_path["appmenu_create_cmd"], source_template.appmenus_templates_dir, self.name, vmtype])
|
||||
subprocess.check_call ([system_path["appmenu_create_cmd"], source_template.appmenus_templates_dir, self.name, vmtype, self.label.icon])
|
||||
elif self.appmenus_templates_dir is not None:
|
||||
subprocess.check_call ([system_path["appmenu_create_cmd"], self.appmenus_templates_dir, self.name, vmtype])
|
||||
subprocess.check_call ([system_path["appmenu_create_cmd"], self.appmenus_templates_dir, self.name, vmtype, self.label.icon])
|
||||
else:
|
||||
# Only add apps to menu
|
||||
subprocess.check_call ([system_path["appmenu_create_cmd"], "none", self.name, vmtype])
|
||||
subprocess.check_call ([system_path["appmenu_create_cmd"], "none", self.name, vmtype, self.label.icon])
|
||||
except subprocess.CalledProcessError:
|
||||
print >> sys.stderr, "Ooops, there was a problem creating appmenus for {0} VM!".format (self.name)
|
||||
|
||||
|
@ -197,7 +197,7 @@ def create_template(path, values):
|
||||
desktop_file.write("Icon={0}\n".format(os.path.join(
|
||||
'%VMDIR%', vm_files['appmenus_icons_subdir'], icon_file)))
|
||||
else:
|
||||
desktop_file.write("Icon=%VMDIR%/icon.png\n")
|
||||
desktop_file.write("Icon=%XDGICON%\n")
|
||||
|
||||
for key in ["Name", "GenericName" ]:
|
||||
if values.has_key(key):
|
||||
|
Loading…
Reference in New Issue
Block a user