socek

Untitled

Mar 21st, 2014
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 7.64 KB | None | 0 0
  1. -- SHIFTY: application matching rules
  2. -- order here matters, early rules will be applied first
  3. min_y = 19;
  4. min_x = 0;
  5. max_y = 749;
  6. max_x = 1364;
  7. full_desktop = {min_x, min_y, max_x, max_y};
  8. full_screen = screen[1].workarea;
  9. if screen.count() == 2 then
  10.     player_geometry = screen[2].workarea;
  11. else
  12.     player_geometry = full_screen;
  13. end
  14.  
  15. shifty.config.apps = {
  16.     {
  17.         match = {
  18.             "Firefox",
  19.         },
  20.         tag = "web",
  21.         -- geometry = full_desktop,
  22.         screen = math.max(screen.count(), 2),
  23.     },
  24.     {
  25.         match = {
  26.             "Gmpc"
  27.         },
  28.         tag = "music",
  29.         nopopup = true,
  30.     },
  31.     {
  32.         match = {
  33.             "sublime_text",
  34.         },
  35.         tag = "editor",
  36.         nopopup = true,
  37.     },
  38.     {
  39.         match = {"termite"},
  40.         float = true,
  41.         intrusive = true,
  42.         above = true,
  43.         ontop = true,
  44.         skip_taskbar = true,
  45.         sticky = true,
  46.         geometry = {0, 0, 1366, 299},
  47.     },
  48.     {
  49.         match = {"Skype.*",},
  50.         tag = "skype",
  51.     },
  52.     {
  53.         match = {"Pidgin.*"},
  54.         tag = "pidgin",
  55.     },
  56.     {
  57.         match = {"Conky",},
  58.         float = true,
  59.         intrusive = true,
  60.         skip_taskbar = true,
  61.         geometry = {0, 361, 233, 405},
  62.     },
  63.     {
  64.         match = {"gmrun"},
  65.         float = true,
  66.         intrusive = true,
  67.         skip_taskbar = true,
  68.     },
  69.     {
  70.         match = {"VirtualBox"},
  71.         tag = "virtualbox",
  72.     },
  73.     {
  74.         match = {"Wine", "dosbox", "FTL", "Buddha.bin.x86", "retroarch"},
  75.         tag = "wine",
  76.     },
  77.     {
  78.         match = {"Player", "vlc", "mplayer2", "mpv", "gl"},
  79.         tag = "P",
  80.         nopopup = true,
  81.         geometry = player_geometry,
  82.     },
  83.     {
  84.         match = {"Client"},
  85.         tag = "C",
  86.         geometry = full_desktop,
  87.     },
  88.     {
  89.         match = {"Gimp"},
  90.         tag = "gimp",
  91.     },
  92.     {
  93.         match = {"Mirage"},
  94.         tag = "mirage",
  95.     },
  96.     {
  97.         match = {"plugin-container"},
  98.         float = true,
  99.     },
  100.     {
  101.         match = {"chromium"},
  102.         tag = "chrome",
  103.         geometry = full_desktop,
  104.     },
  105.     {
  106.         match = {"transmission"},
  107.         tag = "pause",
  108.         geometry = full_desktop,
  109.     },
  110.     {
  111.         match = {"VCLSalFrame"},
  112.         tag = "Office",
  113.     },
  114.     {
  115.         match = {"Xephyr"},
  116.         tag = "X",
  117.     },
  118.     {
  119.         match = {"m2gui"},
  120.         tag = "M",
  121.     },
  122.     {
  123.         match = {"Hamster"},
  124.         tag = "L",
  125.     },
  126.     {
  127.         match = {""},
  128.         buttons = awful.util.table.join(
  129.         awful.button({}, 1, function (c) client.focus = c; c:raise() end),
  130.         awful.button({"Mod1"}, 1, function(c)
  131.             client.focus = c
  132.             c:raise()
  133.             awful.mouse.client.move(c)
  134.             end),
  135.         awful.button({"Mod1"}, 3, awful.mouse.client.resize)
  136.         )
  137.     },
  138. }
  139.  
  140.  
  141. -- Shifty configured tags.
  142. shifty.config.tags = {
  143.     ["pause"] = {
  144.         layout      = awful.layout.suit.floating,
  145.         position    = stags.pause,
  146.         icon        = "/usr/share/icons/oxygen/16x16/actions/media-playback-pause.png",
  147.         icon_only   = true,
  148.         leave_kills = true,
  149.     },
  150.     -- Autorun
  151.     ["music"] = {
  152.         layout    = awful.layout.suit.magnifier,
  153.         exclusive = true,
  154.         position  = stags.gmpc,
  155.         init      = true,
  156.         spawn     = music_app,
  157.         icon        = "/usr/share/icons/hicolor/16x16/apps/gmpc.png",
  158.         icon_only = true,
  159.         nopopup     = true,
  160.     },
  161.     ["skype"] = {
  162.         layout    = awful.layout.suit.magnifier,
  163.         position  = stags.skype,
  164.         exclusive = true,
  165.         init      = true,
  166.         spawn     = skype,
  167.         icon      = "/usr/share/icons/hicolor/16x16/apps/skype.png",
  168.         icon_only = true,
  169.         nopopup   = true,
  170.     },
  171.     ["pidgin"] = {
  172.         layout    = awful.layout.suit.tile.left,
  173.         position  = stags.pidgin,
  174.         exclusive = true,
  175.         slave     = true,
  176.         -- init        = true,
  177.         spawn     = pidgin,
  178.         icon        = "/usr/share/icons/hicolor/16x16/apps/pidgin.png",
  179.         icon_only = true,
  180.         nopopup     = true,
  181.     },
  182.  
  183.     -- Spawning
  184.     ["web"] = {
  185.         layout      = awful.layout.suit.floating,
  186.         exclusive   = true,
  187.         position    = stags.browser,
  188.         spawn       = browser,
  189.         icon        = "/usr/share/icons/hicolor/16x16/apps/firefox.png",
  190.         icon_only = true,
  191.         init        = true,
  192.         nopopup     = true,
  193.         screen      = math.max(screen.count(), 2),
  194.     },
  195.     ["editor"] = {
  196.         layout    = awful.layout.suit.magnifier,
  197.         exclusive = true,
  198.         position  = stags.editor,
  199.         slave     = true,
  200.         spawn     = editor_cmd,
  201.         icon        = "/home/socek/apps/sublime_text_3/Icon/16x16/sublime-text.png",
  202.         icon_only = true,
  203.         init        = true,
  204.         nopopup     = true,
  205.     },
  206.     ["chrome"] = {
  207.         layout      = awful.layout.suit.floating,
  208.         exclusive   = true,
  209.         position    = stags.chrome,
  210.         spawn       = "/usr/bin/chromium",
  211.         icon        = "/usr/share/icons/hicolor/16x16/apps/chromium.png",
  212.         icon_only = true,
  213.         leave_kills = true,
  214.     },
  215.     ["gimp"] = {
  216.         layout      = awful.layout.suit.floating,
  217.         icon        = '/usr/share/icons/hicolor/16x16/apps/gimp.png',
  218.         exclusive = true,
  219.         position    = stags.gimp,
  220.         icon_only   = true,
  221.         spawn       = '/usr/bin/gimp',
  222.         leave_kills = true,
  223.     },
  224.  
  225.     -- Rest
  226.     ["mirage"] = {
  227.         layout      = awful.layout.suit.magnifier,
  228.         icon        = '/usr/share/icons/hicolor/16x16/apps/qv4l2.png',
  229.         exclusive = true,
  230.         position    = stags.imgbrowser,
  231.         icon_only   = true,
  232.         leave_kills = true,
  233.     },
  234.     ["wine"] = {
  235.         layout      = awful.layout.suit.floating,
  236.         position    = stags.wine,
  237.         exclusive   = true,
  238.         icon        = "/home/socek/obrazy/wine.png",
  239.         icon_only = true,
  240.         leave_kills = true,
  241.     },
  242.     ["virtualbox"] = {
  243.         layout      = awful.layout.suit.floating,
  244.         position    = stags.virtualbox,
  245.         exclusive   = true,
  246.         icon        = "/usr/share/icons/hicolor/16x16/mimetypes/virtualbox-vbox.png",
  247.         icon_only = true,
  248.         leave_kills = true,
  249.     },
  250.     ["P"] = {
  251.         layout      = awful.layout.suit.tile.left,
  252.         position    = stags.player,
  253.         exclusive   = true,
  254.         screen      = math.max(screen.count(), 2),
  255.         leave_kills = true,
  256.         -- init        = true,
  257.     },
  258.     ["C"] = {
  259.         layout      = awful.layout.suit.floating,
  260.         position    = stags.client,
  261.         exclusive   = true,
  262.         leave_kills = true,
  263.     },
  264.     ["Office"] = {
  265.         layout      = awful.layout.suit.floating,
  266.         position    = stags.office,
  267.         exclusive   = true,
  268.         icon        = "/usr/share/icons/hicolor/16x16/apps/libreoffice-calc.png",
  269.         icon_only   = true,
  270.         spawn       = "/usr/bin/libreoffice",
  271.         leave_kills = true,
  272.     },
  273.     ["X"] = {
  274.         layout      = awful.layout.suit.floating,
  275.         position    = stags.xephyr,
  276.         exclusive   = true,
  277.         leave_kills = true,
  278.     },
  279.     ["M"] = {
  280.         layout      = awful.layout.suit.floating,
  281.         position    = stags.m2gui,
  282.         exclusive   = true,
  283.         leave_kills = true,
  284.     },
  285.     ["L"] = {
  286.         layout      = awful.layout.suit.floating,
  287.         position    = stags.counter,
  288.         exclusive   = true,
  289.         leave_kills = true,
  290.     }
  291. }
Advertisement
Add Comment
Please, Sign In to add comment