This commit is contained in:
natemaia 2018-08-25 01:08:58 -07:00
parent b1073aae70
commit 24edec5c10
4 changed files with 3 additions and 208 deletions

View File

@ -1,102 +0,0 @@
#!/usr/bin/perl
# obmenu-generator - configuration file
# This file will be updated automatically.
# Any additional comment and/or indentation will be lost.
=for comment
|| FILTERING
| skip_filename_re : Skip a .desktop file if its name matches the regex.
Name is from the last slash to the end. (filename.desktop)
Example: qr/^(?:gimp|xterm)\b/, # skips 'gimp' and 'xterm'
| skip_entry : Skip a desktop file if the value from a given key matches the regex.
Example: [
{key => 'Name', re => qr/(?:about|terminal)/i},
{key => 'Exec', re => qr/^xterm/},
],
| substitutions : Substitute, by using a regex, in the values of the desktop files.
Example: [
{key => 'Exec', re => qr/xterm/, value => 'sakura'},
{key => 'Exec', re => qr/\\\\/, value => '\\', global => 1}, # for wine apps
],
|| ICON SETTINGS
| icon_dirs_first : When looking for icons, look in this directories first,
before looking in the directories of the current icon theme.
Example: [
"$ENV{HOME}/My icons",
],
| icon_dirs_second : Look in this directories after looked in the directories of the
current icon theme. (Before /usr/share/pixmaps)
Example: [
"/usr/share/icons/gnome",
],
| icon_dirs_last : Look in this directories at the very last, after looked in
/usr/share/pixmaps, /usr/share/icons/hicolor and some other
directories.
Example: [
"/usr/share/icons/Tango",
],
| strict_icon_dirs : A true value will make the script to look only inside the directories
specified by you in either one of the above three options.
| gtk_rc_filename : Absolute path to the GTK configuration file.
| missing_image : Use this icon for missing icons (default: gtk-missing-image)
|| KEYS
| name_keys : Valid keys for application name.
Example: ['Name[fr]', 'GenericName[fr]', 'Name'], # french menu
|| PATHS
| desktop_files_paths : Absolute paths which contain .desktop files.
Example: [
'/usr/share/applications',
"$ENV{HOME}/.local/share/applications",
glob("$ENV{HOME}/.local/share/applications/wine/Programs/*"),
],
|| NOTES
| Regular expressions:
* use qr/.../ instead of '...'
* use qr/.../i for case insensitive mode
=cut
our $CONFIG = {
"editor" => "exo-open",
"Linux::DesktopFiles" => {
desktop_files_paths => [
"/usr/share/applications",
"/usr/local/share/applications",
"/usr/share/applications/kde4",
"$ENV{HOME}/.local/share/applications",
],
gtk_rc_filename => "$ENV{HOME}/.gtkrc-2.0",
icon_dirs_first => undef,
icon_dirs_last => undef,
icon_dirs_second => undef,
keep_unknown_categories => 1,
skip_entry => undef,
skip_filename_re => undef,
skip_svg_icons => 0,
strict_icon_dirs => undef,
substitutions => undef,
terminalization_format => "%s -e '%s'",
terminalize => 1,
unknown_category_key => "other",
},
"missing_icon" => "gtk-missing-image",
"name_keys" => ["Name"],
"terminal" => "termite",
"VERSION" => 0.71,
}

View File

@ -1,88 +0,0 @@
#!/usr/bin/perl
# obmenu-generator - schema file
=for comment
item: add an item inside the menu {item => ["command", "label", "icon"]},
cat: add a category inside the menu {cat => ["name", "label", "icon"]},
sep: horizontal line separator {sep => undef}, {sep => "label"},
pipe: a pipe menu entry {pipe => ["command", "label", "icon"]},
file: include the content of an XML file {file => "/path/to/file.xml"},
raw: any XML data supported by Openbox {raw => q(xml data)},
begin_cat: beginning of a category {begin_cat => ["name", "icon"]},
end_cat: end of a category {end_cat => undef},
obgenmenu: generic menu settings {obgenmenu => ["label", "icon"]},
exit: default "Exit" action {exit => ["label", "icon"]},
=cut
require "$ENV{HOME}/.config/obmenu-generator/config.pl";
## Text editor
my $editor = $CONFIG->{editor};
our $SCHEMA = [
# Format: NAME, LABEL, ICON
{sep => "ArchLabs"},
{item => ['exo-open --launch TerminalEmulator', 'Terminal', 'terminal']},
{item => ['exo-open --launch WebBrowser ', 'Web Browser', 'firefox']},
{item => ['exo-open --launch FileManager', 'File Manager', 'file-manager']},
{sep => undef},
{cat => ['utility', 'Accessories', 'applications-utilities']},
{cat => ['development', 'Development', 'applications-development']},
{cat => ['education', 'Education', 'applications-science']},
{cat => ['game', 'Games', 'applications-games']},
{cat => ['graphics', 'Graphics', 'applications-graphics']},
{cat => ['audiovideo', 'Multimedia', 'applications-multimedia']},
{cat => ['network', 'Network', 'applications-internet']},
{cat => ['office', 'Office', 'applications-office']},
{cat => ['other', 'Other', 'applications-other']},
{cat => ['settings', 'Settings', 'gnome-settings']},
{cat => ['system', 'System', 'applications-system']},
{sep => undef},
{pipe => ['al-places-pipemenu --recent ~/', 'Places', 'folder']},
{sep => undef},
{begin_cat => ['Preferences', 'theme']},
{begin_cat => ['Openbox', 'openbox']},
{item => ['obconf', 'Settings Editor', 'theme']},
{item => ['kickshaw', 'Menu Editor', 'openbox']},
{item => ['obkey', 'Keybind Editor', 'openbox']},
{item => ['ob-autostart', 'Autostart Editor', 'openbox']},
{sep => undef},
{item => ["exo-open ~/.config/openbox/menu.xml", 'Edit menu.xml', 'text-xml']},
{item => ["exo-open ~/.config/openbox/rc.xml", 'Edit rc.xml', 'text-xml']},
{item => ["exo-open ~/.config/openbox/autostart", 'Edit autostart', 'text-xml']},
{sep => undef},
{item => ['openbox --restart', 'Openbox Restart', 'openbox']},
{item => ['openbox --reconfigure', 'Openbox Reconfigure', 'openbox']},
{end_cat => undef},
{item => ['xfce4-appearance-settings', 'GTK Appearance', 'preferences-desktop-theme']},
{item => ['nitrogen', 'Change Wallpaper', 'nitrogen']},
{sep => undef},
{pipe => ['al-compositor', 'Compositor', 'compton']},
{pipe => ['al-polybar-pipemenu', 'Polybar', 'polybar']},
{pipe => ['al-conky-pipemenu', 'Conky', 'conky']},
{pipe => ['al-tint2-pipemenu', 'Tint2', 'tint2']},
{item => ['rofi-theme-selector', 'Rofi Theme', 'theme']},
{item => ['al-panel-chooser', 'Panel Chooser', 'panel']},
{sep => undef},
{item => ['xfce4-settings-manager', 'Xfce4 Settings Manager', 'preferences-desktop']},
{item => ['pavucontrol', 'Pulseaudio Preferences', 'multimedia-volume-control']},
{item => ['exo-preferred-applications', 'Preferred Applications', 'preferred-applications']},
{item => ['arandr', 'Screen Layout Editor', 'display']},
{end_cat => undef},
{sep => undef},
{begin_cat => ['Menu Generator', 'menu-editor']},
{item => ["$editor ~/.config/obmenu-generator/schema.pl", 'Menu Layout', 'text-x-source']},
{sep => undef},
{item => ['obmenu-generator -p', 'Generate a pipe menu', 'menu-editor']},
{item => ['obmenu-generator -s -c', 'Generate a static menu', 'menu-editor']},
{end_cat => undef},
{item => ["switchmenu --static", 'Switch Menu', 'menu-editor']},
{pipe => ['al-kb-pipemenu', 'Display Keybinds', 'cs-keyboard']},
{pipe => ['al-help-pipemenu', 'Help and Info', 'info']},
{sep => undef},
{item => ['i3lock-fancy -p', 'Lock Screen', 'lock']},
{item => ['oblogout', 'Exit Openbox', 'exit']},
]

View File

@ -17,11 +17,6 @@
<command>exo-open --launch FileManager</command>
</action>
</item>
<item label="Text Editor">
<action name="Execute">
<command>geany</command>
</action>
</item>
<separator/>
<menu id="accessories" label="Accessories">
<item label="Archive Manager">
@ -29,30 +24,20 @@
<command>file-roller</command>
</action>
</item>
<item label="Picture Viewer">
<action name="Execute">
<command>gpicview</command>
</action>
</item>
</menu>
<menu id="screenshot" label="Screenshot">
<item label="Screenshot Now">
<action name="Execute">
<command>scrot 'ArchLabs_%Y-%m-%d-%S_$wx$h.png' -e 'mv $f $$(xdg-user-dir PICTURES) ; gpicview $$(xdg-user-dir PICTURES)/$f'</command>
<command>scrot 'ArchLabs_%Y-%m-%d-%S_$wx$h.png' -e 'mv $f $$(xdg-user-dir PICTURES) ; feh $$(xdg-user-dir PICTURES)/$f'</command>
</action>
</item>
<item label="Screenshot in 5">
<action name="Execute">
<command>scrot -d 5 'ArchLabs_%Y-%m-%d-%S_$wx$h.png' -e 'mv $f $$(xdg-user-dir PICTURES) ; gpicview $$(xdg-user-dir PICTURES)/$f'</command>
<command>scrot -d 5 'ArchLabs_%Y-%m-%d-%S_$wx$h.png' -e 'mv $f $$(xdg-user-dir PICTURES) ; feh $$(xdg-user-dir PICTURES)/$f'</command>
</action>
</item>
</menu>
<menu id="multimedia" label="Multimedia">
<item label="Music Player">
<action name="Execute">
<command>audacious</command>
</action>
</item>
<item label="Video Player">
<action name="Execute">
<command>mpv --player-operation-mode=pseudo-gui</command>

View File

@ -204,7 +204,7 @@ label = %{A1:termite -e "htop -s PERCENT_MEM" & disown:} %percentage_used%%%{
type = custom/script
exec = updates.sh
exec-if = "ping -q -w 2 -c 1 176.34.135.167 > /dev/null"
label = %{A1:termite -e "aurman -Syyu" & disown:} %{A3:termite -e "aurman -Syyu" & disown:}%output%%{A} %{A}
label = %{A1:termite -e "sudo pacman -Syyu" & disown:} %{A3:termite -e "sudo pacman -Syyu" & disown:}%output%%{A} %{A}
tail = true