schema.pl 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. #!/usr/bin/perl
  2. # obmenu-generator - schema file
  3. =for comment
  4. item: add an item inside the menu {item => ["command", "label", "icon"]},
  5. cat: add a category inside the menu {cat => ["name", "label", "icon"]},
  6. sep: horizontal line separator {sep => undef}, {sep => "label"},
  7. pipe: a pipe menu entry {pipe => ["command", "label", "icon"]},
  8. file: include the content of an XML file {file => "/path/to/file.xml"},
  9. raw: any XML data supported by Openbox {raw => q(...)},
  10. beg: begin of a category {beg => ["name", "icon"]},
  11. end: end of a category {end => undef},
  12. obgenmenu: generic menu settings {obgenmenu => ["label", "icon"]},
  13. exit: default "Exit" action {exit => ["label", "icon"]},
  14. =cut
  15. # NOTE:
  16. # * Keys and values are case sensitive. Keep all keys lowercase.
  17. # * ICON can be a either a direct path to an icon or a valid icon name
  18. # * Category names are case insensitive. (X-XFCE and x_xfce are equivalent)
  19. require "$ENV{HOME}/.config/obmenu-generator/config.pl";
  20. ## Text editor
  21. my $editor = $CONFIG->{editor};
  22. our $SCHEMA = [
  23. {sep => "QUICK START"},
  24. # COMMAND LABEL ICON
  25. {item => ["exo-open --launch TerminalEmulator", "Open Terminal", "utilities-terminal"]},
  26. {beg => ["Launch Apps", "launch"]},
  27. # NAME LABEL ICON
  28. {cat => ["utility", "Accessories", "applications-utilities"]},
  29. {cat => ["development", "Development", "applications-development"]},
  30. {cat => ["education", "Education", "applications-science"]},
  31. {cat => ["game", "Games", "applications-games"]},
  32. {cat => ["graphics", "Graphics", "applications-graphics"]},
  33. {cat => ["audiovideo", "Multimedia", "applications-multimedia"]},
  34. {cat => ["network", "Network", "applications-internet"]},
  35. {cat => ["office", "Office", "applications-office"]},
  36. {cat => ["other", "Other", "applications-other"]},
  37. {cat => ["settings", "Settings", "applications-accessories"]},
  38. {cat => ["system", "System", "applications-system"]},
  39. {end => undef},
  40. {sep => undef},
  41. # Visual Mode
  42. {beg => ["Visual Mode", "lookswitcher"]},
  43. {item => ["bash -c '~/.config/openbox/visual-mode/set-shirin'" , "Shirin Theme" , "keyboard"]},
  44. {item => ["bash -c '~/.config/openbox/visual-mode/set-elaina'" , "Elaina Theme" , "applications-graphics"]},
  45. {end => undef},
  46. {pipe => ["python2 ~/.config/openbox/pipe-menu/ob-randr.py", "Monitor Settings", "system-config-display"]},
  47. {obgenmenu => ["Advanced Settings", "applications-engineering"]},
  48. # SESSIONS
  49. {sep => "SESSIONS"},
  50. # Pipe Menu
  51. {pipe => ["~/.config/openbox/pipe-menu/date-menu.sh" , "Show Date" , "date"]},
  52. #{pipe => ["bash -c '~/.config/openbox/pipe-menu/battery.sh'" , "Battery Info" , "battery"]},
  53. #{pipe => ["python2 ~/.config/openbox/pipe-menu/show_ob_keybindings.py" , "Show Keybindings" , "keyboard"]},
  54. #{pipe => ["python2 ~/.config/openbox/pipe-menu/ob-cpufreq.py" , "HW Info" , "cpu"]},
  55. {pipe => ["perl ~/.config/openbox/pipe-menu/ob-sysinfo.pl" , "System Info" , "dialog-information"]},
  56. {sep => undef},
  57. # Screenshot Menu
  58. {beg => ["Screenshot" , "deepin-screenshot"]},
  59. {item => ["bash -c '~/.scripts/shot-now'" , "Shot now" , "deepin-screenshot"]},
  60. {item => ["bash -c '~/.scripts/shot-5sec'" , "Shot in 5s" , "deepin-screenshot"]},
  61. {item => ["bash -c '~/.scripts/shot-seldraw'" , "Select window or draw" , "deepin-screenshot"]},
  62. {end => undef},
  63. # Lockscreen Menu
  64. {item => ["slimlock", "Lockscreen", "system-lock-screen"]},
  65. # Logout Menu
  66. {exit => ["Exit Openbox", "application-exit"]},
  67. ## This uses the "oblogout" menu
  68. # {item => ["oblogout", "Exit", "application-exit"]},
  69. ]