Compare commits
No commits in common. "6c0805c1f4de283627c1eaddd482b898844372c9" and "15f45a446a2c5d41db781a1d58a5d16b5e3747e8" have entirely different histories.
6c0805c1f4
...
15f45a446a
39
rc.lua
39
rc.lua
@ -32,8 +32,6 @@ local function batteryarc() -- detect if there are any batteries before showing
|
||||
end
|
||||
end
|
||||
|
||||
local zombies = {}
|
||||
|
||||
-- {{{ Error handling
|
||||
-- Check if awesome encountered an error during startup and fell back to
|
||||
-- another config (This code will only ever execute for the fallback config)
|
||||
@ -97,19 +95,13 @@ awful.layout.layouts = {
|
||||
}
|
||||
-- }}}
|
||||
|
||||
function restart()
|
||||
for k,v in pairs(zombies) do
|
||||
awful.spawn.easy_async(string.format("kill %d",v))
|
||||
end
|
||||
awesome.restart()
|
||||
end
|
||||
-- {{{ Menu
|
||||
-- Create a launcher widget and a main menu
|
||||
myawesomemenu = {
|
||||
{ "hotkeys", function() hotkeys_popup.show_help(nil, awful.screen.focused()) end },
|
||||
{ "manual", terminal .. " -e man awesome" },
|
||||
{ "edit config", editor_cmd .. " " .. awesome.conffile },
|
||||
{ "restart", restart },
|
||||
{ "restart", awesome.restart },
|
||||
{ "quit", function() awesome.quit() end },
|
||||
}
|
||||
|
||||
@ -121,24 +113,6 @@ mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesom
|
||||
mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon,
|
||||
menu = mymainmenu })
|
||||
|
||||
mpdwidget = wibox.widget({
|
||||
align = 'center',
|
||||
valign = 'center',
|
||||
widget = wibox.widget.textbox
|
||||
})
|
||||
function updatempdwidget()
|
||||
local states = {}
|
||||
states.playing = "▶"
|
||||
states.paused = "||"
|
||||
awful.spawn.easy_async("mpc status", function(s)
|
||||
song,status = s:match("([^\n]+)\n%[(.-)%]")
|
||||
mpdwidget.text = string.format("🎶 %s %s ",(status and states[status]) or "■", song or "")
|
||||
end)
|
||||
end
|
||||
updatempdwidget()
|
||||
|
||||
zombies[#zombies+1] = awful.spawn.with_line_callback("mpc idleloop", {stdout=updatempdwidget})
|
||||
|
||||
-- Menubar configuration
|
||||
menubar.utils.terminal = terminal -- Set the terminal for applications that require it
|
||||
menubar.menu_gen.all_menu_dirs = { "/usr/share/applications/", ".local/share/applications/" }
|
||||
@ -150,6 +124,8 @@ menubar.menu_gen.all_menu_dirs = { "/usr/share/applications/", ".local/share/app
|
||||
-- Create a textclock widget
|
||||
mytextclock = wibox.widget.textclock("%Y-%m-%d %H:%M")
|
||||
mysystray = wibox.widget.systray()
|
||||
print(mysystray)
|
||||
for k,v in pairs(mysystray) do print(k,v) end
|
||||
|
||||
-- Create a wibox for each screen and add it
|
||||
local taglist_buttons = gears.table.join(
|
||||
@ -195,9 +171,9 @@ local function set_wallpaper(s)
|
||||
print(s)
|
||||
local wpath
|
||||
if s.geometry.width > s.geometry.height then -- landscape
|
||||
wpath = "/home/izaya/Pictures/Wallpapers"
|
||||
wpath = "/home/izaya/Nextcloud/Pictures/Wallpapers"
|
||||
else -- portrait
|
||||
wpath = "/home/izaya/Pictures/Wallpapers/Phone"
|
||||
wpath = "/home/izaya/Nextcloud/Pictures/Wallpapers/Phone"
|
||||
end
|
||||
return awful.spawn.easy_async_with_shell(string.format('ls "%s"',wpath), function(out)
|
||||
local tWP = {}
|
||||
@ -302,7 +278,6 @@ awful.screen.connect_for_each_screen(function(s)
|
||||
s.mytasklist, -- Middle widget
|
||||
{ -- Right widgets
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
mpdwidget,
|
||||
mysystray,
|
||||
cpu_widget(),
|
||||
ram_widget(),
|
||||
@ -387,7 +362,7 @@ globalkeys = gears.table.join(
|
||||
-- Standard program
|
||||
awful.key({ modkey, }, "Return", function () awful.spawn(terminal) end,
|
||||
{description = "open a terminal", group = "launcher"}),
|
||||
awful.key({ modkey, "Control" }, "r", restart,
|
||||
awful.key({ modkey, "Control" }, "r", awesome.restart,
|
||||
{description = "reload awesome", group = "awesome"}),
|
||||
awful.key({ modkey, "Shift" }, "q", awesome.quit,
|
||||
{description = "quit awesome", group = "awesome"}),
|
||||
@ -659,7 +634,7 @@ awful.rules.rules = {
|
||||
-- { rule = { class = "Firefox" },
|
||||
-- properties = { screen = 1, tag = "2" } },
|
||||
{ rule = { class = "Steam", name = "Steam" },
|
||||
properties = {screen = 1, tag = "3", titlebars_enabled = false } },
|
||||
properties = {tag = "3", titlebars_enabled = false } },
|
||||
{ rule = { class = "Steam", name = "Friends List.*"},
|
||||
properties = {tag = "6", titlebars_enabled = false } },
|
||||
{ rule = { class = "Pidgin"},
|
||||
|
Loading…
Reference in New Issue
Block a user