From 886eab400e2883b9424243b72af3002896781e02 Mon Sep 17 00:00:00 2001 From: Weitian LI Date: Sat, 21 Jun 2014 22:44:06 +0800 Subject: Updated & Added configuration files. Added: * .calendar (BSD calendar) * .config/openbox/ * .config/tint2/ * .rtorrent.rc * .screenrc * .tcsh/, .tcshrc, .tcshrc.local Updated: * .gitignore * .lftp/rc * .tmux.conf --- .config/openbox/scripts/xcompmgr.sh | 25 +++++++++++++++++++ .config/openbox/scripts/xdg-menu | 49 +++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100755 .config/openbox/scripts/xcompmgr.sh create mode 100755 .config/openbox/scripts/xdg-menu (limited to '.config/openbox/scripts') diff --git a/.config/openbox/scripts/xcompmgr.sh b/.config/openbox/scripts/xcompmgr.sh new file mode 100755 index 0000000..e59eb6a --- /dev/null +++ b/.config/openbox/scripts/xcompmgr.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +case "$1" in + set) + killall xcompmgr + sed -i 's/#xcompmgr.*$/xcompmgr \&/g' ~/.config/openbox/autostart.sh + xcompmgr & + ;; + unset) + sed -i 's/^xcompmgr.*$/#xcompmgr \&/g' ~/.config/openbox/autostart.sh + killall xcompmgr + ;; + setshaded) + killall xcompmgr + sed -i 's/#xcompmgr.*$/xcompmgr -CfF \&/g' ~/.config/openbox/autostart.sh + xcompmgr -CfF & + ;; + setshadowshade) + killall xcompmgr + sed -i 's/#xcompmgr.*$/xcompmgr -CcfF \&/g' ~/.config/openbox/autostart.sh + xcompmgr -CcfF & + ;; + *) + echo "This script accepts the following arguments : set, setshaded, setshadowshade, unset" +esac diff --git a/.config/openbox/scripts/xdg-menu b/.config/openbox/scripts/xdg-menu new file mode 100755 index 0000000..05d6cec --- /dev/null +++ b/.config/openbox/scripts/xdg-menu @@ -0,0 +1,49 @@ +#!/usr/bin/env python +# +# Copyright (C) 2008 Red Hat, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Author(s): Luke Macken +# Miroslav Lichvar + + +import gmenu, re, sys +from xml.sax.saxutils import escape + +def walk_menu(entry): + if entry.get_type() == gmenu.TYPE_DIRECTORY: + print '' \ + % (escape(entry.menu_id), escape(entry.get_name())) + map(walk_menu, entry.get_contents()) + print '' + elif entry.get_type() == gmenu.TYPE_ENTRY and not entry.is_excluded: + print ' ' % escape(entry.get_name()) + command = re.sub(' [^ ]*%[fFuUdDnNickvm]', '', entry.get_exec()) + if entry.launch_in_terminal: + command = 'xterm -title "%s" -e %s' % \ + (entry.get_name(), command) + print ' ' + \ + '%s' % escape(command) + print ' ' + +if len(sys.argv) > 1: + menu = sys.argv[1] + '.menu' +else: + menu = 'applications.menu' + +print '' +print '' +map(walk_menu, gmenu.lookup_tree(menu).root.get_contents()) +print '' -- cgit v1.2.2