schema.pl 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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 => 'Sık Kullanılanlar'},
  24. # COMMAND LABEL ICON
  25. {item => ['xdg-open .', 'Dosya Yöneticisi', 'system-file-manager']},
  26. {item => ['xterm', 'Komut Satırı', 'utilities-terminal']},
  27. {item => ['xdg-open http://', 'İnternet Tarayıcısı', 'web-browser']},
  28. {item => ['gmrun', 'Komut Çalıştır', 'system-run']},
  29. {sep => 'Kategoriler'},
  30. # NAME LABEL ICON
  31. {cat => ['utility', 'Donatılar', 'applications-utilities']},
  32. {cat => ['development', 'Programlama', 'applications-development']},
  33. {cat => ['education', 'Eğitim', 'applications-science']},
  34. {cat => ['game', 'Oyunlar', 'applications-games']},
  35. {cat => ['graphics', 'Grafik', 'applications-graphics']},
  36. {cat => ['audiovideo', 'Ses ve Video', 'applications-multimedia']},
  37. {cat => ['network', 'İnternet', 'applications-internet']},
  38. {cat => ['office', 'Ofis', 'applications-office']},
  39. {cat => ['other', 'Diğer', 'applications-other']},
  40. {cat => ['settings', 'Ayarlar', 'applications-accessories']},
  41. {cat => ['system', 'Sistem', 'applications-system']},
  42. # LABEL ICON
  43. #{beg => ['My category', 'cat-icon']},
  44. # ... some items ...
  45. #{end => undef},
  46. # COMMAND LABEL ICON
  47. #{pipe => ['obbrowser', 'Disk', 'drive-harddisk']},
  48. ## Generic advanced settings
  49. #{sep => undef},
  50. #{obgenmenu => ['Openbox Settings', 'applications-engineering']},
  51. #{sep => undef},
  52. ## Custom advanced settings
  53. {sep => undef},
  54. {beg => ['Gelişmiş Ayarlar', 'applications-engineering']},
  55. # Configuration files
  56. {item => ["$editor ~/.conkyrc", 'Conky RC', 'text-x-generic']},
  57. {item => ["$editor ~/.config/tint2/tint2rc", 'Tint2 Panel', 'text-x-generic']},
  58. # obmenu-generator category
  59. {beg => ['Obmenu-Generator', 'accessories-text-editor']},
  60. {item => ["$editor ~/.config/obmenu-generator/schema.pl", 'Menu Schema', 'text-x-generic']},
  61. {item => ["$editor ~/.config/obmenu-generator/config.pl", 'Menu Config', 'text-x-generic']},
  62. {sep => undef},
  63. {item => ['obmenu-generator -s -c', 'Statik menü oluştur', 'accessories-text-editor']},
  64. {item => ['obmenu-generator -s -i -c', 'Simgeli statik menü oluştur', 'accessories-text-editor']},
  65. {sep => undef},
  66. {item => ['obmenu-generator -p', 'Dinamic menü oluştur', 'accessories-text-editor']},
  67. {item => ['obmenu-generator -p -i', 'Simgeli dinamic menü oluştur', 'accessories-text-editor']},
  68. {sep => undef},
  69. {item => ['obmenu-generator -d', 'Önbelleği yenile', 'view-refresh']},
  70. {end => undef},
  71. # Openbox category
  72. {beg => ['Openbox', 'openbox']},
  73. {item => ["$editor ~/.config/openbox/autostart", 'Openbox Autostart', 'text-x-generic']},
  74. {item => ["$editor ~/.config/openbox/rc.xml", 'Openbox RC', 'text-x-generic']},
  75. {item => ["$editor ~/.config/openbox/menu.xml", 'Openbox Menu', 'text-x-generic']},
  76. {item => ['openbox --reconfigure', 'Reconfigure Openbox', 'openbox']},
  77. {end => undef},
  78. {end => undef},
  79. {sep => undef},
  80. ## The xscreensaver lock command
  81. {item => ['xscreensaver-command -lock', 'Kilitle', 'system-lock-screen']},
  82. ## This option uses the default Openbox's "Exit" action
  83. #{exit => ['Çıkış', 'application-exit']},
  84. ## This option uses the default Openbox's "Exit" action
  85. {exit => ['Kapat', 'openboxkapat']},
  86. ## This uses the 'oblogout' menu
  87. # {item => ['oblogout', 'Exit', 'application-exit']},
  88. ]