1
0
Fork 0
mirror of https://github.com/lcpz/awesome-copycats.git synced 2026-03-23 14:05:11 +00:00

new modular branch

This commit is contained in:
copycat-killer 2014-05-16 11:34:10 +02:00
parent 673d0efd18
commit f926898ac1
36 changed files with 145 additions and 138 deletions

View file

@ -41,6 +41,7 @@ Notable features
- Non-empty tag browsing - Non-empty tag browsing
- Dynamic useless gaps - Dynamic useless gaps
- Dynamic tagging - Dynamic tagging
- Modular
Gallery Gallery
======= =======
@ -102,7 +103,7 @@ Switch a theme this way: ::
Alternatively, you can use `switch-theme.sh`_, which will also update to the latest commit. Alternatively, you can use `switch-theme.sh`_, which will also update to the latest commit.
Then, eventually customize your ``rc.lua``, and restart Awesome (``Mod4 + ctrl + r``). Then, eventually customize your settings and restart Awesome (``Mod4 + ctrl + r``).
Notes Notes
===== =====
@ -119,7 +120,7 @@ Blackburn and Dremora use Icons_: be sure to have bitmaps enabled if running und
Freedesktop uses ``/etc/mime.types``, so be sure to have MIME support installed. Freedesktop uses ``/etc/mime.types``, so be sure to have MIME support installed.
Eminent, freedesktop and scratchdrop are third-party softwares: **either disable them or rely on their creators if they cause you** slowdowns_ **or** issues_ **.** If you have issues with `third-party` modules, **either disable them or report to their creators**.
Feel free to email me if you have any request. Feel free to email me if you have any request.
@ -141,5 +142,3 @@ Feel free to email me if you have any request.
.. _Icons: https://github.com/copycat-killer/dots/tree/master/.fonts .. _Icons: https://github.com/copycat-killer/dots/tree/master/.fonts
.. _Debian: http://weiwu.sdf.org/100921.html .. _Debian: http://weiwu.sdf.org/100921.html
.. _Ubuntu: https://wiki.ubuntu.com/Fonts#Enabling_Bitmapped_Fonts .. _Ubuntu: https://wiki.ubuntu.com/Fonts#Enabling_Bitmapped_Fonts
.. _slowdowns: https://github.com/copycat-killer/awesome-copycats/issues/24#issuecomment-33289499
.. _issues: https://github.com/copycat-killer/awesome-copycats/issues/12

View file

@ -1,5 +0,0 @@
require("freedesktop.utils")
require("freedesktop.menu")
require("freedesktop.desktop")
module("freedesktop")

View file

@ -1,10 +0,0 @@
local awful = require("awful")
function run_once(cmd)
findme = cmd
firstspace = cmd:find(" ")
if firstspace then
findme = cmd:sub(0, firstspace-1)
end
awful.util.spawn_with_shell("pgrep -u $USER -x " .. findme .. " > /dev/null || (" .. cmd .. ")")
end

View file

@ -1,6 +1,6 @@
--[[ --[[
Blackburn Awesome WM config 2.0 Blackburn Awesome WM config 3.0
github.com/copycat-killer github.com/copycat-killer
--]] --]]
@ -17,7 +17,7 @@ local lain = require("lain")
-- }}} -- }}}
-- Error handling -- Error handling
require("myrc.errors") require("stock.errors")
-- STARTUP apps -- STARTUP apps
require("settings.startup") require("settings.startup")
@ -38,7 +38,7 @@ require("stock.wallpaper")
-- }}} -- }}}
-- {{{ Menu -- {{{ Menu
require("freedesktop/freedesktop") require("third-party/freedesktop/freedesktop")
-- }}} -- }}}
-- {{{ Wibox -- {{{ Wibox
@ -230,9 +230,9 @@ globalkeys = awful.util.table.join(globalkeys,
awful.key({ altkey, "Control" }, "-", function () lain.util.useless_gaps_resize(-1) end), awful.key({ altkey, "Control" }, "-", function () lain.util.useless_gaps_resize(-1) end),
-- Widgets popups -- Widgets popups
awful.key({ altkey, }, "c", function () lain.widgets.calendar:show(7) end), awful.key({ altkey }, "c", function () lain.widgets.calendar:show(7) end),
awful.key({ altkey, }, "h", function () fshome.show(7) end), awful.key({ altkey }, "h", function () fshome.show(7) end),
awful.key({ altkey, }, "w", function () yawn.show(7) end), awful.key({ altkey }, "w", function () yawn.show(7) end),
-- ALSA volume control -- ALSA volume control
awful.key({ altkey }, "Up", awful.key({ altkey }, "Up",

View file

@ -1,6 +1,6 @@
--[[ --[[
Copland Awesome WM config Copland Awesome WM config 3.0
github.com/copycat-killer github.com/copycat-killer
--]] --]]
@ -14,11 +14,11 @@ local wibox = require("wibox")
local beautiful = require("beautiful") local beautiful = require("beautiful")
local naughty = require("naughty") local naughty = require("naughty")
local lain = require("lain") local lain = require("lain")
local eminent = require("eminent") local eminent = require("third-party/eminent")
-- }}} -- }}}
-- Error handling -- Error handling
require("myrc.errors") require("stock.errors")
-- STARTUP apps -- STARTUP apps
require("settings.startup") require("settings.startup")
@ -45,7 +45,7 @@ require("stock.wallpaper")
-- }}} -- }}}
-- {{{ Menu -- {{{ Menu
require("freedesktop/freedesktop") require("third-party/freedesktop/freedesktop")
-- }}} -- }}}
-- {{{ Wibox -- {{{ Wibox
@ -166,23 +166,24 @@ diskwidget:set_bgimage(beautiful.widget_bg)
-- ALSA volume bar -- ALSA volume bar
volicon = wibox.widget.imagebox(beautiful.vol) volicon = wibox.widget.imagebox(beautiful.vol)
volume = lain.widgets.alsabar({width = 55, ticks = true, ticks_size = 6, volume = lain.widgets.alsabar({width = 55, ticks = true, ticks_size = 6,
settings = function() settings = function()
if volume_now.status == "off" then if volume_now.status == "off" then
volicon:set_image(beautiful.vol_mute) volicon:set_image(beautiful.vol_mute)
elseif volume_now.level == 0 then elseif volume_now.level == 0 then
volicon:set_image(beautiful.vol_no) volicon:set_image(beautiful.vol_no)
elseif volume_now.level <= 50 then elseif volume_now.level <= 50 then
volicon:set_image(beautiful.vol_low) volicon:set_image(beautiful.vol_low)
else else
volicon:set_image(beautiful.vol) volicon:set_image(beautiful.vol)
end end
end, end,
colors = colors =
{ {
background = beautiful.bg_normal, background = beautiful.bg_normal,
mute = "#EB8F8F", mute = "#EB8F8F",
unmute = beautiful.fg_normal unmute = beautiful.fg_normal
}}) }
})
volmargin = wibox.layout.margin(volume.bar, 2, 7) volmargin = wibox.layout.margin(volume.bar, 2, 7)
volmargin:set_top(6) volmargin:set_top(6)
volmargin:set_bottom(6) volmargin:set_bottom(6)

View file

@ -1,6 +1,6 @@
--[[ --[[
Dremora Awesome WM config 2.0 Dremora Awesome WM config 3.0
github.com/copycat-killer github.com/copycat-killer
--]] --]]
@ -17,7 +17,7 @@ local lain = require("lain")
-- }}} -- }}}
-- Error handling -- Error handling
require("myrc.errors") require("stock.errors")
-- STARTUP apps -- STARTUP apps
require("settings.startup") require("settings.startup")
@ -38,7 +38,7 @@ require("stock.wallpaper")
-- }}} -- }}}
-- {{{ Menu -- {{{ Menu
require("freedesktop/freedesktop") require("third-party/freedesktop/freedesktop")
-- }}} -- }}}
-- {{{ Wibox -- {{{ Wibox

View file

@ -1,6 +1,6 @@
--[[ --[[
Holo Awesome WM config 2.0 Holo Awesome WM config 3.0
github.com/copycat-killer github.com/copycat-killer
--]] --]]
@ -17,7 +17,7 @@ local lain = require("lain")
-- }}} -- }}}
-- Error handling -- Error handling
require("myrc.errors") require("stock.errors")
-- STARTUP apps -- STARTUP apps
require("settings.startup") require("settings.startup")
@ -40,7 +40,7 @@ require("stock.wallpaper")
-- }}} -- }}}
-- {{{ Menu -- {{{ Menu
require("freedesktop/freedesktop") require("third-party/freedesktop/freedesktop")
-- }}} -- }}}
-- {{{ Wibox -- {{{ Wibox

View file

@ -1,6 +1,6 @@
--[[ --[[
Multicolor Awesome WM config 2.0 Multicolor Awesome WM config 3.0
github.com/copycat-killer github.com/copycat-killer
--]] --]]
@ -17,7 +17,7 @@ local lain = require("lain")
-- }}} -- }}}
-- Error handling -- Error handling
require("myrc.errors") require("stock.errors")
-- STARTUP apps -- STARTUP apps
require("settings.startup") require("settings.startup")
@ -38,11 +38,11 @@ require("stock.wallpaper")
-- }}} -- }}}
-- {{{ Freedesktop Menu -- {{{ Freedesktop Menu
require("freedesktop/freedesktop") require("third-party/freedesktop/freedesktop")
-- }}} -- }}}
-- {{{ Wibox -- {{{ Wibox
markup = lain.util.markup markup = lain.util.markup
-- Textclock -- Textclock
clockicon = wibox.widget.imagebox(beautiful.widget_clock) clockicon = wibox.widget.imagebox(beautiful.widget_clock)
@ -287,9 +287,9 @@ globalkeys = awful.util.table.join(globalkeys,
end), end),
-- Widgets popups -- Widgets popups
awful.key({ altkey, }, "c", function () lain.widgets.calendar:show(7) end), awful.key({ altkey }, "c", function () lain.widgets.calendar:show(7) end),
awful.key({ altkey, }, "h", function () fswidget.show(7) end), awful.key({ altkey }, "h", function () fswidget.show(7) end),
awful.key({ altkey, }, "w", function () yawn.show(7) end), awful.key({ altkey }, "w", function () yawn.show(7) end),
-- ALSA volume control -- ALSA volume control
awful.key({ altkey }, "Up", awful.key({ altkey }, "Up",

View file

@ -1,6 +1,6 @@
--[[ --[[
Powerarrow Darker Awesome WM config 2.0 Powerarrow Darker Awesome WM config 3.0
github.com/copycat-killer github.com/copycat-killer
--]] --]]
@ -17,7 +17,7 @@ local lain = require("lain")
-- }}} -- }}}
-- Error handling -- Error handling
require("myrc.errors") require("stock.errors")
-- STARTUP apps -- STARTUP apps
require("settings.startup") require("settings.startup")
@ -41,7 +41,7 @@ require("stock.wallpaper")
-- }}} -- }}}
-- {{{ Menu -- {{{ Menu
require("freedesktop/freedesktop") require("third-party/freedesktop/freedesktop")
-- }}} -- }}}
-- {{{ Wibox -- {{{ Wibox
@ -283,8 +283,8 @@ globalkeys = awful.util.table.join(globalkeys,
end), end),
-- Widgets popups -- Widgets popups
awful.key({ altkey, }, "c", function () lain.widgets.calendar:show(7) end), awful.key({ altkey }, "c", function () lain.widgets.calendar:show(7) end),
awful.key({ altkey, }, "h", function () fswidget.show(7) end), awful.key({ altkey }, "h", function () fswidget.show(7) end),
-- ALSA volume control -- ALSA volume control
awful.key({ altkey }, "Up", awful.key({ altkey }, "Up",

View file

@ -1,6 +1,6 @@
--[[ --[[
Rainbow Awesome WM config 2.0 Rainbow Awesome WM config 3.0
github.com/copycat-killer github.com/copycat-killer
--]] --]]
@ -17,7 +17,7 @@ local lain = require("lain")
-- }}} -- }}}
-- Error handling -- Error handling
require("myrc.errors") require("stock.errors")
-- STARTUP apps -- STARTUP apps
require("settings.startup") require("settings.startup")
@ -42,7 +42,7 @@ require("stock.wallpaper")
-- }}} -- }}}
-- {{{ Menu -- {{{ Menu
require("freedesktop/freedesktop") require("third-party/freedesktop/freedesktop")
-- }}} -- }}}
-- {{{ Wibox -- {{{ Wibox

View file

@ -17,7 +17,7 @@ local lain = require("lain")
-- }}} -- }}}
-- Error handling -- Error handling
require("myrc.errors") require("stock.errors")
-- STARTUP apps -- STARTUP apps
require("settings.startup") require("settings.startup")
@ -42,7 +42,7 @@ require("stock.wallpaper")
-- }}} -- }}}
-- {{{ Menu -- {{{ Menu
require("freedesktop/freedesktop") require("third-party/freedesktop/freedesktop")
-- }}} -- }}}
-- {{{ Wibox -- {{{ Wibox
@ -237,9 +237,9 @@ globalkeys = awful.util.table.join(globalkeys,
end), end),
-- Widgets popups -- Widgets popups
awful.key({ altkey, }, "c", function () lain.widgets.calendar:show(7) end), awful.key({ altkey }, "c", function () lain.widgets.calendar:show(7) end),
awful.key({ altkey, }, "h", function () fshomeupd.show(7) end), awful.key({ altkey }, "h", function () fshomeupd.show(7) end),
awful.key({ altkey, }, "w", function () yawn.show(7) end), awful.key({ altkey }, "w", function () yawn.show(7) end),
-- ALSA volume control -- ALSA volume control
awful.key({ altkey }, "Up", awful.key({ altkey }, "Up",

View file

@ -1,13 +1,15 @@
local awful = require("awful") local awful = require("awful")
local drop = require("scratchdrop") local drop = require("third-party/scratchdrop")
local lain = require("lain") local lain = require("lain")
-- {{{ Mouse bindings -- {{{ Mouse bindings
root.buttons(awful.util.table.join( root.buttons(awful.util.table.join(
awful.button({ }, 3, function () mymainmenu:toggle() end), awful.button({ }, 3, function () mymainmenu:toggle() end),
awful.button({ }, 4, awful.tag.viewnext), awful.button({ }, 4, awful.tag.viewnext),
awful.button({ }, 5, awful.tag.viewprev) awful.button({ }, 5, awful.tag.viewprev)
)) ))
-- }}} -- }}}
-- {{{ Key bindings -- {{{ Key bindings

View file

@ -1,4 +1,4 @@
local awful = require("awful") local awful = require("awful")
local beautiful = require("beautiful") local beautiful = require("beautiful")
-- {{{ Rules -- {{{ Rules

View file

@ -1,4 +1,17 @@
require("myrc.run_once") -- {{{ Run once function
local awful = require("awful")
function run_once(cmd)
findme = cmd
firstspace = cmd:find(" ")
if firstspace then
findme = cmd:sub(0, firstspace-1)
end
awful.util.spawn_with_shell("pgrep -u $USER -x " .. findme .. " > /dev/null || (" .. cmd .. ")")
end
-- }}}
-- {{{ Autostart applications -- {{{ Autostart applications

View file

@ -17,17 +17,18 @@ layouts = {
tags = { tags = {
names = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }, names = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }, -- default
-- names = { "ƀ", "Ƅ", "Ɗ", "ƈ", "ƙ" }, -- blackburn/dremora
layout = { layout = {
layouts[1], layouts[1],
layouts[1], layouts[2],
layouts[1], layouts[3],
layouts[1], layouts[4],
layouts[1], layouts[5],
layouts[1], layouts[6],
layouts[1], layouts[7],
layouts[1], layouts[8],
layouts[1], layouts[9],
} }
} }

View file

@ -1,4 +1,4 @@
local awful = require("awful") local awful = require("awful")
local beautiful = require("beautiful") local beautiful = require("beautiful")
-- {{{ Signals -- {{{ Signals

View file

@ -2,10 +2,10 @@ local awful = require("awful")
mytaglist = {} mytaglist = {}
mytaglist.buttons = awful.util.table.join( mytaglist.buttons = awful.util.table.join(
awful.button({ }, 1, awful.tag.viewonly), awful.button({ }, 1, awful.tag.viewonly),
awful.button({ modkey }, 1, awful.client.movetotag), awful.button({ modkey }, 1, awful.client.movetotag),
awful.button({ }, 3, awful.tag.viewtoggle), awful.button({ }, 3, awful.tag.viewtoggle),
awful.button({ modkey }, 3, awful.client.toggletag), awful.button({ modkey }, 3, awful.client.toggletag),
awful.button({ }, 4, function(t) awful.tag.viewnext(awful.tag.getscreen(t)) end), awful.button({ }, 4, function(t) awful.tag.viewnext(awful.tag.getscreen(t)) end),
awful.button({ }, 5, function(t) awful.tag.viewprev(awful.tag.getscreen(t)) end) awful.button({ }, 5, function(t) awful.tag.viewprev(awful.tag.getscreen(t)) end)
) )

View file

@ -2,35 +2,36 @@ local awful = require("awful")
mytasklist = {} mytasklist = {}
mytasklist.buttons = awful.util.table.join( mytasklist.buttons = awful.util.table.join(
awful.button({ }, 1, function (c) awful.button({ }, 1, function (c)
if c == client.focus then if c == client.focus then
c.minimized = true c.minimized = true
else else
-- Without this, the following -- Without this, the following
-- :isvisible() makes no sense -- :isvisible() makes no sense
c.minimized = false c.minimized = false
if not c:isvisible() then if not c:isvisible() then
awful.tag.viewonly(c:tags()[1]) awful.tag.viewonly(c:tags()[1])
end end
-- This will also un-minimize -- This will also un-minimize
-- the client, if needed -- the client, if needed
client.focus = c client.focus = c
c:raise() c:raise()
end end
end), end),
awful.button({ }, 3, function () awful.button({ }, 3, function ()
if instance then if instance then
instance:hide() instance:hide()
instance = nil instance = nil
else else
instance = awful.menu.clients({ width=250 }) instance = awful.menu.clients({ width=250 })
end end
end), end),
awful.button({ }, 4, function () awful.button({ }, 4, function ()
awful.client.focus.byidx(1) awful.client.focus.byidx(1)
if client.focus then client.focus:raise() end if client.focus then client.focus:raise() end
end), end),
awful.button({ }, 5, function () awful.button({ }, 5, function ()
awful.client.focus.byidx(-1) awful.client.focus.byidx(-1)
if client.focus then client.focus:raise() end if client.focus then client.focus:raise() end
end)) end)
)

View file

@ -1,5 +1,5 @@
local beautiful = require("beautiful") local beautiful = require("beautiful")
local gears = require("gears") local gears = require("gears")
-- {{{ Wallpaper -- {{{ Wallpaper
if beautiful.wallpaper then if beautiful.wallpaper then

View file

@ -1,6 +1,6 @@
--[[ --[[
Blackburn Awesome WM config 2.0 Blackburn Awesome WM config 3.0
github.com/copycat-killer github.com/copycat-killer
--]] --]]

View file

@ -1,6 +1,6 @@
--[[ --[[
Copland Awesome WM config Copland Awesome WM config 3.0
github.com/copycat-killer github.com/copycat-killer
--]] --]]

View file

@ -1,6 +1,6 @@
--[[ --[[
Dremora Awesome WM config 2.0 Dremora Awesome WM config 3.0
github.com/copycat-killer github.com/copycat-killer
--]] --]]

View file

@ -1,6 +1,6 @@
--[[ --[[
Holo Awesome WM config 2.0 Holo Awesome WM config 3.0
github.com/copycat-killer github.com/copycat-killer
--]] --]]

View file

@ -1,6 +1,6 @@
--[[ --[[
Multicolor Awesome WM config 2.0 Multicolor Awesome WM config 3.0
github.com/copycat-killer github.com/copycat-killer
--]] --]]

View file

@ -1,6 +1,6 @@
--[[ --[[
Powerarrow Darker Awesome WM config 2.0 Powerarrow Darker Awesome WM config 3.0
github.com/copycat-killer github.com/copycat-killer
--]] --]]

View file

@ -1,6 +1,6 @@
--[[ --[[
Rainbow Awesome WM config 2.0 Rainbow Awesome WM config 3.0
github.com/copycat-killer github.com/copycat-killer
--]] --]]

View file

@ -7,7 +7,7 @@
local awful = require("awful") local awful = require("awful")
local beautiful = require("beautiful") local beautiful = require("beautiful")
require('freedesktop') require('third-party/freedesktop')
-- require("debian.menu") -- require("debian.menu")
freedesktop.utils.terminal = terminal -- defined in rc.lua, otherwise define it here (default: "xterm") freedesktop.utils.terminal = terminal -- defined in rc.lua, otherwise define it here (default: "xterm")

5
third-party/freedesktop/init.lua vendored Normal file
View file

@ -0,0 +1,5 @@
require("third-party/freedesktop.utils")
require("third-party/freedesktop.menu")
require("third-party/freedesktop.desktop")
module("freedesktop")

View file

@ -190,7 +190,7 @@ function parse_desktop_file(arg)
end end
end end
if program.Exec then if program.Exec and program.Name then
local cmdline = program.Exec:gsub('%%c', program.Name) local cmdline = program.Exec:gsub('%%c', program.Name)
cmdline = cmdline:gsub('%%[fmuFMU]', '') cmdline = cmdline:gsub('%%[fmuFMU]', '')
cmdline = cmdline:gsub('%%k', program.file) cmdline = cmdline:gsub('%%k', program.file)