style: remove commented code from awesome's rc.lua

pull/1/head
anemofilia 2023-08-27 20:18:02 -03:00
parent f146ab5ff1
commit 32a96e9a05
No known key found for this signature in database
GPG Key ID: 5A8F3D62C87A2B33
1 changed files with 10 additions and 141 deletions

View File

@ -117,19 +117,9 @@ menubar.utils.terminal = terminal
tag.connect_signal("request::default_layouts", tag.connect_signal("request::default_layouts",
function() function()
awful.layout.append_default_layouts({ awful.layout.append_default_layouts({
--awful.layout.suit.floating,
awful.layout.suit.tile, awful.layout.suit.tile,
--awful.layout.suit.tile.left,
awful.layout.suit.tile.bottom, awful.layout.suit.tile.bottom,
--awful.layout.suit.tile.top,
awful.layout.suit.max, awful.layout.suit.max,
--awful.layout.suit.fair,
--awful.layout.suit.fair.horizontal,
--awful.layout.suit.spiral,
--awful.layout.suit.spiral.dwindle,
--awful.layout.suit.max.fullscreen,
--awful.layout.suit.magnifier,
--awful.layout.suit.corner.nw,
}) })
end) end)
-- }}} -- }}}
@ -220,27 +210,6 @@ beautiful.mpd = lain.widget.mpd({
end end
}) })
-- Mail IMAP check
--[[
local mailicon = wibox.widget.imagebox(beautiful.widget_mail)
mailicon:buttons(my_table.join(awful.button({ }, 1, function () awful.spawn(mail) end)))
beautiful.mail = lain.widget.imap({
timeout = 180,
server = "server",
mail = "luisguilhermecoelho@usp.br",
password = "",
settings = function()
if mailcount > 0 then
widget:set_markup(markup.font(beautiful.font, " " .. mailcount .. " "))
mailicon:set_image(beautiful.widget_mail_on)
else
widget:set_text("")
mailicon:set_image(beautiful.widget_mail)
end
end
})
--]]
-- MEM -- MEM
local memicon = wibox.widget.imagebox(beautiful.widget_mem) local memicon = wibox.widget.imagebox(beautiful.widget_mem)
local mem = lain.widget.mem({ local mem = lain.widget.mem({
@ -310,7 +279,8 @@ beautiful.volume = lain.widget.alsa({
widget:set_markup(markup.font(beautiful.font, volume_now.level .. "% ")) widget:set_markup(markup.font(beautiful.font, volume_now.level .. "% "))
end end
}) })
beautiful.volume.widget:buttons(awful.util.table.join( beautiful.volume.widget:buttons(
awful.util.table.join(
awful.button({}, 4, function () awful.button({}, 4, function ()
awful.util.spawn("amixer set Master 1%+") awful.util.spawn("amixer set Master 1%+")
beautiful.volume.update() beautiful.volume.update()
@ -374,9 +344,6 @@ screen.connect_signal("request::desktop_decoration", function(s)
client.focus:toggle_tag(t) client.focus:toggle_tag(t)
end end
end), end),
-- Changing workspaces with scroll is so irritating
-- awful.button({ }, 4, function(t) awful.tag.viewprev(t.screen) end),
-- awful.button({ }, 5, function(t) awful.tag.viewnext(t.screen) end),
} }
} }
@ -445,39 +412,6 @@ screen.connect_signal("request::desktop_decoration", function(s)
}, },
} }
} }
--[[
s.mybottomwibox = awful.wibar {
height = dpi(19),
position = "bottom",
screen = s,
-- @DOC_SETUP_WIDGETS@
widget = {
layout = wibox.layout.align.horizontal,
{ -- Left widgets
layout = wibox.layout.fixed.horizontal,
--s.mypromptbox,
spr,--mylauncher,
--s.mytaglist,
--s.mypromptbox,
},
-- Middle widget
--s.mytasklist,
spr,
{ -- Right widgets
layout = wibox.layout.fixed.horizontal,
--mykeyboardlayout,
--wibox.widget.systray(),
spr,
arrl_ld,
wibox.container.background(mpdicon, theme.bg_focus),
wibox.container.background(beautiful.mpd.widget, theme.bg_focus),
--arrl_dl,
--wibox.container.background(mailicon, theme.bg_normal),
--wibox.container.background(beautiful.mail.widget, theme.bg_normal),
},
}
}
--]]
end) end)
-- }}} -- }}}
@ -503,9 +437,6 @@ awful.keyboard.append_global_keybindings({
font = "Meslo LG M DZ 8", font = "Meslo LG M DZ 8",
description_font = "Meslo LG M DZ 8"}):show_help() end, description_font = "Meslo LG M DZ 8"}):show_help() end,
{description="show help", group="awesome"}), {description="show help", group="awesome"}),
--[[awful.key({ modkey, }, "w", function ()
mymainmenu:show() end,
{description = "show main menu", group = "awesome"}), ]]
awful.key({ modkey, "Control" }, "r", awesome.restart, awful.key({ modkey, "Control" }, "r", awesome.restart,
{description = "reload awesome", group = "awesome"}), {description = "reload awesome", group = "awesome"}),
awful.key({ modkey, "Control" }, "q", awesome.quit, awful.key({ modkey, "Control" }, "q", awesome.quit,
@ -561,21 +492,6 @@ awful.keyboard.append_global_keybindings({
awful.key({ modkey, }, ":", function () awful.key({ modkey, }, ":", function ()
awful.screen.focused().mypromptbox:run() end, awful.screen.focused().mypromptbox:run() end,
{description = "run prompt", group = "launcher"}), {description = "run prompt", group = "launcher"}),
--[[
awful.key({ modkey }, "p", function()
menubar.show() end,
{description = "show the menubar", group = "launcher"}),
awful.key({ modkey }, "x",
function ()
awful.prompt.run {
prompt = "Run Lua code: ",
textbox = awful.screen.focused().mypromptbox.widget,
exe_callback = awful.util.eval,
history_path = awful.util.get_cache_dir() .. "/history_eval"
}
end,
{description = "lua execute prompt", group = "awesome"}),
--]]
}) })
-- Tags related keybindings -- Tags related keybindings
@ -623,18 +539,6 @@ awful.keyboard.append_global_keybindings({
-- Layout related keybindings -- Layout related keybindings
awful.keyboard.append_global_keybindings({ awful.keyboard.append_global_keybindings({
--awful.key({ modkey, "Shift" }, "j", function ()
-- awful.client.swap.byidx( 1) end,
-- {description = "swap with next client by index", group = "client"}),
--awful.key({ modkey, "Shift" }, "k", function ()
-- awful.client.swap.byidx( -1) end,
-- {description = "swap with previous client by index", group = "client"}),
--awful.key({ modkey, }, "l", function ()
-- awful.tag.incmwfact( 0.05) end,
-- {description = "increase master width factor", group = "layout"}),
--awful.key({ modkey, }, "h", function ()
-- awful.tag.incmwfact(-0.05) end,
-- {description = "decrease master width factor", group = "layout"}),
awful.key({ modkey, }, "u", awful.client.urgent.jumpto, awful.key({ modkey, }, "u", awful.client.urgent.jumpto,
{description = "jump to urgent client", group = "client"}), {description = "jump to urgent client", group = "client"}),
awful.key({ modkey, "Control" }, "h", function () awful.key({ modkey, "Control" }, "h", function ()
@ -643,12 +547,6 @@ awful.keyboard.append_global_keybindings({
awful.key({ modkey, "Control" }, "l", function () awful.key({ modkey, "Control" }, "l", function ()
awful.tag.incnmaster(-1, nil, true) end, awful.tag.incnmaster(-1, nil, true) end,
{description = "decrease the number of master clients", group = "layout"}), {description = "decrease the number of master clients", group = "layout"}),
--awful.key({ modkey, "Control" }, "h", function ()
-- awful.tag.incncol( 1, nil, true) end,
-- {description = "increase the number of columns", group = "layout"}),
--awful.key({ modkey, "Control" }, "l", function ()
-- awful.tag.incncol(-1, nil, true) end,
-- {description = "decrease the number of columns", group = "layout"}),
awful.key({ modkey, }, "space", function () awful.key({ modkey, }, "space", function ()
awful.layout.inc( 1) end, awful.layout.inc( 1) end,
{description = "select next", group = "layout"}), {description = "select next", group = "layout"}),
@ -733,36 +631,20 @@ awful.keyboard.append_global_keybindings({
awful.keyboard.append_global_keybindings({ awful.keyboard.append_global_keybindings({
awful.key({ }, "XF86AudioPlay", function () awful.key({ }, "XF86AudioPlay", function ()
os.execute("mpc toggle") os.execute("mpc toggle")
-- beautiful.mpd.update() -- MPD widget must be set
end, end,
{description = "mpc toggle", group = "widgets"}), {description = "mpc toggle", group = "widgets"}),
awful.key({ }, "XF86AudioStop", function () awful.key({ }, "XF86AudioStop", function ()
os.execute("mpc stop") os.execute("mpc stop")
-- beautiful.mpd.update() -- MPD widget must be set
end, end,
{description = "mpc stop", group = "widgets"}), {description = "mpc stop", group = "widgets"}),
awful.key({ }, "XF86AudioPrev", function () awful.key({ }, "XF86AudioPrev", function ()
os.execute("mpc prev") os.execute("mpc prev")
-- beautiful.mpd.update() -- MPD widget must be set
end, end,
{description = "mpc prev", group = "widgets"}), {description = "mpc prev", group = "widgets"}),
awful.key({ }, "XF86AudioNext", function () awful.key({ }, "XF86AudioNext", function ()
os.execute("mpc next") os.execute("mpc next")
-- beautiful.mpd.update() -- MPD widget must be set
end, end,
{description = "mpc next", group = "widgets"}), {description = "mpc next", group = "widgets"}),
-- awful.key({ altkey }, "0", function ()
-- local common = { text = "MPD widget ", position = "top_middle", timeout = 2 }
-- if beautiful.mpd.timer.started then
-- beautiful.mpd.timer:stop()
-- common.text = common.text .. lain.util.markup.bold("OFF")
-- else
-- beautiful.mpd.timer:start()
-- common.text = common.text .. lain.util.markup.bold("ON")
-- end
-- naughty.notify(common)
-- end,
-- {description = "ncmpcpp on/off", group = "widgets"}),
}) })
-- Generic hotkeys -- Generic hotkeys
@ -786,13 +668,6 @@ awful.keyboard.append_global_keybindings({
end end
end, end,
{description = "toggle wibox", group = "awesome"}), {description = "toggle wibox", group = "awesome"}),
--[[ awful.key({ modkey }, "Down", function ()
for s in screen do
s.mybottomwibox.visible = not s.mybottomwibox.visible
end
end,
{description = "toggle bottom wibox", group = "awesome"}),
--]]
}) })
-- @DOC_CLIENT_BUTTONS@ -- @DOC_CLIENT_BUTTONS@
@ -934,11 +809,6 @@ ruled.client.connect_signal("request::rules", function()
properties = { titlebars_enabled = false } properties = { titlebars_enabled = false }
} }
-- Set Firefox to always map on the tag named "2" on screen 1.
-- ruled.client.append_rule {
-- rule = { class = "Firefox" },
-- properties = { screen = 1, tag = "2" }
-- }
end) end)
-- }}} -- }}}
@ -995,7 +865,6 @@ autorunApps = {
"xset b off", "xset b off",
"setxkbmap -layout 'us,br' -option 'grp:menu_switch,parens:swap_brackets,caps:swapescape'", "setxkbmap -layout 'us,br' -option 'grp:menu_switch,parens:swap_brackets,caps:swapescape'",
"xbanish", "xbanish",
-- "/home/radio/.config/tox/toxic-scripts/auto-open.sh",
"xset r rate 200 30", "xset r rate 200 30",
"pkill oneko", "pkill oneko",
"oneko -tofocus -bg '#606060' -fg '#101010' -speed 22", "oneko -tofocus -bg '#606060' -fg '#101010' -speed 22",