Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --------------------------------------------------------------------------------
- require("widgets")
- require("naughty")
- --------------------------------------------------------------------------------
- local io = {
- lines = io.lines,
- popen = io.popen
- }
- local capi = {
- screen = screen
- }
- --------------------------------------------------------------------------------
- os.execute("bash " .. uhawesome .. "/scripts/.uptime &")
- --------------------------------------------------------------------------------
- if awesome.startup_errors then
- naughty.notify({
- font = "Terminus 8",
- timeout = 4,
- preset = naughty.config.presets.critical,
- title = "Еррор на старте осома, программист хуев!..",
- text = awesome.startup_errors })
- end
- --------------------------------------------------------------------------------
- do
- local in_error = false
- awesome.add_signal("debug::error", function (err)
- -- Make sure we don't go into an endless error loop
- if in_error then return end
- in_error = true
- naughty.notify({
- font = "Terminus 8",
- timeout = 4,
- preset = naughty.config.presets.critical,
- title = "Еб ты, ошибка нашлась!.. Писатель никудышный, смотри сюда!..",
- text = err })
- in_error = false
- end)
- end
- --------------------------------------------------------------------------------
- modkey = "Mod4" -- мод-клавиша WINDOWS
- --------------------------------------------------------------------------------
- layouts = -- определяем конфигурации расположения окон на тегах
- {
- awful.layout.suit.max,
- awful.layout.suit.floating,
- awful.layout.suit.fair,
- awful.layout.suit.tile.bottom
- }
- -------------------------------------------------------------------------------- ⣿⣾⣶⣴⣤⣠⣀⢀
- tags = {
- names = { "~", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "+" },
- layout = { layouts[3], layouts[3], layouts[3], layouts[3], layouts[3], layouts[1], layouts[1], layouts[1], layouts[1], layouts[1], layouts[1], layouts[3], layouts[3] },
- keynum = { "49", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22" }
- }
- --------------------------------------------------------------------------------
- tags[screen_num] = awful.tag(tags.names, screen_num, tags.layout)
- for tgs in pairs(tags.names) do
- awful.tag.setnmaster(1, tags[screen_num][tgs])
- awful.tag.setncol( 1, tags[screen_num][tgs])
- awful.tag.setproperty( tags[screen_num][tgs], "mwfact", 0.65)
- end
- --------------------------------------------------------------------------------
- bwibox = {}
- bwibox[screen_num] = awful.wibox({ position = "bottom", screen = screen_num, height = 18, opacity = 0.90 })
- bwibox[screen_num].widgets = {
- {
- btaglist[screen_num],
- layout = awful.widget.layout.horizontal.leftright
- },
- screen_num == 1 and tsystray or nil,
- tncslock,
- ttextclock,
- tvolume,
- tuptime,
- tbat,
- tmem,
- thdd_temp,
- ttemp,
- tloadavg,
- tcpu,
- layout = awful.widget.layout.horizontal.rightleft
- }
- --------------------------------------------------------------------------------
- twibox = {}
- twibox[screen_num] = awful.wibox({ position = "top", screen = screen_num, height = 18, opacity = 0.90 })
- twibox[screen_num].widgets = {
- {
- tlayoutbox[screen_num],
- layout = awful.widget.layout.horizontal.leftright
- },
- tnet,
- ttasklist[screen_num],
- layout = awful.widget.layout.horizontal.rightleft
- }
- --------------------------------------------------------------------------------
- local scrgeom = capi.screen[screen_num].geometry
- --------------------------------------------------------------------------------
- wbox_info0:geometry(
- {
- x = scrgeom.x + 0,
- y = scrgeom.y + (scrgeom.height - wbox_info0.height) / 2
- }
- )
- wbox_info0.screen = screen_num
- wbox_info0.widgets = {
- tlauncher,
- layout = awful.widget.layout.horizontal.leftright
- }
- --------------------------------------------------------------------------------
- wbox_info1:geometry(
- {
- x = scrgeom.x + wbox_info0.width + 5,
- y = scrgeom.y + (scrgeom.height - wbox_info1.height) / 2
- }
- )
- wbox_info1.screen = screen_num
- wbox_info1.widgets = {
- winfo1,
- layout = awful.widget.layout.horizontal.leftright
- }
- --------------------------------------------------------------------------------
- wbox_info2:geometry(
- {
- x = scrgeom.x + (scrgeom.width - wbox_info2.width) - 5 ,
- y = scrgeom.y + (scrgeom.height - wbox_info2.height) / 2
- }
- )
- wbox_info2.screen = screen_num
- wbox_info2.widgets = {
- winfo2,
- layout = awful.widget.layout.horizontal.leftright
- }
- --------------------------------------------------------------------------------
- --[[
- wbox_info3:geometry(
- {
- x = scrgeom.x + (scrgeom.width - wbox_info3.width) - 5 ,
- y = scrgeom.y + (scrgeom.height - wbox_info3.height) - 23
- }
- )
- wbox_info3.screen = screen_num
- wbox_info3.widgets = {
- winfo3,
- winfo4,
- layout = awful.widget.layout.vertical.flex
- }
- --------------------------------------------------------------------------------
- --[
- lwibox = {}
- lwibox[screen_num] = awful.wibox({ position = "left", screen = screen_num, width = 44, opacity = 0.50 })
- lwibox[screen_num].widgets = {
- {
- tlauncher,
- -- layout = awful.widget.layout.vertical.flex
- },
- layout = awful.widget.layout.vertical.flex
- }
- ]]
- --------------------------------------------------------------------------------
- globalkeys = awful.util.table.join(
- awful.key({ modkey, }, "l",
- function ()
- awful.client.focus.byidx( 1)
- if client.focus then client.focus:raise() end
- end),
- awful.key({ modkey, }, "j",
- function ()
- awful.client.focus.byidx(-1)
- if client.focus then client.focus:raise() end
- end),
- -- Layout manipulation:: ПЛОХОЙ СПИСОК ИСКАТЬ!!!!
- awful.key({ modkey, "Shift" }, "l", function () awful.client.swap.byidx( 1) end),
- awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( -1) end),
- awful.key({ modkey, "Control" }, "l", function () awful.screen.focus_relative( 1) end),
- awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative(-1) end),
- awful.key({ modkey, }, "u", awful.client.urgent.jumpto),
- awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal1) end),
- awful.key({ modkey, "Control"}, "Return", function () awful.util.spawn(terminal2) end),
- awful.key({ modkey, "Control", "Shift" }, "Return", function () awful.util.spawn("scrot -cd 1 -e 'mv $f ~/scrot/'") end),
- awful.key({ modkey, "Control", "Shift" }, "o", function () awful.util.spawn("bash " .. uhome .. "/SCR/.screen_off") end),
- awful.key({ modkey, "Control", "Shift" }, "l", function () awful.util.spawn("libreoffice --nologo") end),
- awful.key({ modkey, "Control", "Shift" }, "p", function () awful.util.spawn(terminal3 .. "-e /usr/sbin/pon e352") end), --urxvt -e /usr/sbin/pon e352 --bash /etc/ppp/scripts/.ppp_up_modem
- --[[
- awful.key({ modkey, "Control", "Shift" }, "w", function () awful.util.spawn("xterm -e 'wvdial ForAll'") end),
- ]]
- awful.key({ modkey, "Control", "Shift" }, "c", function () awful.util.spawn("conkeror") end),
- awful.key({ modkey, "Control", "Shift" }, "i", function () awful.util.spawn("iceweasel") end),
- awful.key({ modkey, "Control", "Shift" }, "f", function () awful.util.spawn("firefox") end),
- --[[
- awful.key({ modkey, "Control", "Shift" }, "f", function () awful.util.spawn(uhome .. "/.fehbg") end),
- ]]
- awful.key({ modkey, "Control", "Shift" }, "h", function () awful.util.spawn("urxvt -e htop -d 10") end),
- awful.key({ modkey, "Control", "Shift" }, "a", function () awful.util.spawn("urxvt -e alsamixer") end),
- awful.key({ modkey, "Control", "Shift" }, "g", function () awful.util.spawn("geany") end),
- awful.key({ modkey, "Control", "Shift" }, "d", function () awful.util.spawn("deadbeef") end),
- awful.key({ modkey, "Control", "Shift" }, "F11", function ()
- naughty.notify(
- {
- font = 'Neuropol 16',
- title = '<span color="#5050C0"> На хуй </span>',
- text = ' перезагрузку ',
- timeout = 8,
- hover_timeout = 0.5
- }
- )
- awful.util.spawn("/sbin/reboot")
- end),
- awful.key({ modkey, "Control", "Shift" }, "F12", function ()
- naughty.notify(
- {
- font = 'Neuropol 16',
- title = '<span color="#5050C0"> На хуй </span>',
- text = ' выключение ',
- timeout = 8,
- hover_timeout = 0.5
- }
- )
- awful.util.spawn("/sbin/poweroff")
- end),
- awful.key({ }, "XF86AudioPlay", function () awful.util.spawn("deadbeef --play-pause > /dev/null") end),
- awful.key({ }, "XF86AudioStop", function () awful.util.spawn("deadbeef --stop > /dev/null") end),
- awful.key({ }, "XF86AudioPrev", function () awful.util.spawn("deadbeef --prev > /dev/null") end),
- awful.key({ }, "XF86AudioNext", function () awful.util.spawn("deadbeef --next > /dev/null") end),
- awful.key({ }, "XF86AudioMute", function () awful.util.spawn("bash /etc/acpi/amixer_state.sh mute") end),
- awful.key({ }, "XF86AudioLowerVolume", function () awful.util.spawn("bash /etc/acpi/amixer_state.sh down") end),
- awful.key({ }, "XF86AudioRaiseVolume", function () awful.util.spawn("bash /etc/acpi/amixer_state.sh up") end),
- awful.key({ }, "Scroll_Lock", function () awful.util.spawn("slock") end),
- awful.key({ modkey, "Control" }, "r", awesome.restart),
- awful.key({ modkey, "Control",
- "Shift" }, "q", awesome.quit),
- awful.key({ modkey, }, "p", function () awful.util.spawn(top_dmenu) end),
- awful.key({ modkey, }, "i", function () awful.tag.incmwfact( 0.09) end),
- awful.key({ modkey, }, "k", function () awful.tag.incmwfact(-0.09) end),
- awful.key({ modkey, "Shift" }, "i", function () awful.tag.incnmaster( 1) end),
- awful.key({ modkey, "Shift" }, "k", function () awful.tag.incnmaster(-1) end),
- awful.key({ modkey, "Control" }, "i", function () awful.tag.incncol( 1) end),
- awful.key({ modkey, "Control" }, "k", function () awful.tag.incncol(-1) end),
- awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end),
- awful.key({ modkey, }, "w", function () awful.layout.set(layouts[1]) end),
- awful.key({ modkey, }, "s", function () awful.layout.set(layouts[2]) end),
- awful.key({ modkey, }, "d", function () awful.layout.set(layouts[3]) end),
- awful.key({ modkey, }, "e", function () awful.layout.set(layouts[4]) end),
- awful.key({ modkey, }, "Tab", awful.tag.history.restore)
- )
- --------------------------------------------------------------------------------
- clientkeys = awful.util.table.join(
- awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end),
- awful.key({ modkey, }, "f", function (c) c.fullscreen = not c.fullscreen end),
- awful.key({ modkey, "Shift" }, "q", function (c) c:kill() end),
- awful.key({ modkey, "Shift" }, "space", awful.client.floating.toggle ),
- awful.key({ modkey, "Shift" }, "r", function (c) c:redraw() end),
- awful.key({ modkey, }, "m",
- function (c)
- c.maximized_horizontal = not c.maximized_horizontal
- c.maximized_vertical = not c.maximized_vertical
- end)
- )
- --------------------------------------------------------------------------------
- keynumber = 0
- for s = 1, screen.count() do
- keynumber = math.min(20, math.max(#tags[s], keynumber));
- end
- --------------------------------------------------------------------------------
- for i = 1, keynumber do
- globalkeys = awful.util.table.join(globalkeys,
- awful.key({ modkey }, "#" .. tags.keynum[i],
- function ()
- local screen = mouse.screen
- if tags[screen][i] then
- awful.tag.viewonly(tags[screen][i])
- end
- end),
- awful.key({ modkey, "Shift" }, "#" .. tags.keynum[i],
- function ()
- if client.focus and tags[client.focus.screen][i] then
- awful.client.movetotag(tags[client.focus.screen][i])
- end
- end))
- end
- --------------------------------------------------------------------------------
- clientbuttons = awful.util.table.join(
- awful.button({ modkey }, 1, awful.mouse.client.move),
- awful.button({ modkey }, 3, awful.mouse.client.resize))
- --------------------------------------------------------------------------------
- root.keys(globalkeys)
- --------------------------------------------------------------------------------
- awful.rules.rules = {
- { rule = { },
- properties = {
- border_width = beautiful.border_width,
- border_color = beautiful.border_normal,
- focus = true,
- keys = clientkeys,
- buttons = clientbuttons,
- floating = true,
- callback = awful.placement.centered
- }
- },
- --[[
- { rule = { class = "Captstatusui" },
- properties = { floating = true } },
- { rule = { class = "XCalc" },
- properties = { floating = true } },
- { rule = { class = "Thunar" },
- properties = { floating = true } },
- { rule = { class = "Lxpanel" },
- properties = { floating = true } },
- { rule = { class = "Nautilus" },
- properties = { floating = true } },
- { rule = { class = "XFontSel" },
- properties = { floating = true } },
- { rule = { class = "Geany" },
- properties = { floating = true } },
- { rule = { class = "Qjackctl" },
- properties = { floating = true } },
- { rule = { class = "Volumeicon" },
- properties = { floating = true } },
- { rule = { class = "Gvolwheel" },
- properties = { floating = true } },
- { rule = { class = "Wine" },
- properties = { floating = true } },
- { rule = { class = "Gtk" },
- properties = { floating = true } },
- { rule = { class = "Torchlight.bin.x86" },
- properties = { floating = true } },
- { rule = { class = "ioquake3.i386" },
- properties = { floating = true } },
- { rule = { class = "ut-bin" },
- properties = { floating = true } },
- { rule = { class = "warzone2100" },
- properties = { floating = true } },
- { rule = { class = "avp" },
- properties = { floating = true } },
- { rule = { class = "SDL_App" },
- properties = { floating = true } },
- { rule = { name = "ALSA Mixer"},
- properties = { floating = true } },
- { rule = { name = "/proc/asound"},
- properties = { floating = true } },
- { rule = { name = "Fieldrunners"},
- properties = { floating = true } },
- { rule = { name = "LGP Security System Manager"},
- properties = { floating = true } },
- { rule = { name = "Launch Sacred"},
- properties = { floating = true } },
- { rule = { name = "Event Tester"},
- properties = { floating = true } },
- { rule = { class = "Paman" },
- properties = { floating = true } },
- ]]
- { rule = { class = "Gimp", role = "gimp-startup" },
- properties = { floating = true, tag = tags[1][3] } },
- { rule = { class = "Gimp", role = "gimp-toolbox" },
- properties = { floating = true, tag = tags[1][3], geometry = {0000,015,0175,770} } },
- { rule = { class = "Gimp", role = "gimp-dock" },
- properties = { floating = true, tag = tags[1][3], geometry = {1105,015,0175,770} } },
- { rule = { class = "Gimp", role = "gimp-image-window" },
- properties = { floating = false, tag = tags[1][3] } },
- { rule = { class = "Xsane" },
- properties = { floating = true, tag = tags[1][3] } },
- { rule = { class = "Xscanimage" },
- properties = { floating = true, tag = tags[1][3], callback = awful.placement.centered } },
- { rule = { class = "System-config-printer" },
- properties = { floating = true, tag = tags[1][3] } },
- { rule = { class = "Djview" },
- properties = { floating = false, tag = tags[1][4] } },
- { rule = { class = "Evince" },
- properties = { floating = false, tag = tags[1][4] } },
- { rule = { class = "Deluge" },
- properties = { floating = false, tag = tags[1][5] } },
- { rule = { class = "Deluge-gtk" },
- properties = { floating = false, tag = tags[1][5] } },
- { rule = { class = "Flush" },
- properties = { floating = false, tag = tags[1][5] } },
- { rule = { class = "XPaint" },
- properties = { floating = true, tag = tags[1][6] } },
- { rule = { class = "TopLevelShell" },
- properties = { floating = false, tag = tags[1][6] } },
- { rule = { class = "Gpaint" },
- properties = { floating = false, tag = tags[1][6] } },
- { rule = { class = "Mtpaint" },
- properties = { floating = false, tag = tags[1][6] } },
- { rule = { class = "MyPaint" },
- properties = { floating = false, tag = tags[1][6] } },
- { rule = { class = "Gpicview" },
- properties = { floating = false, tag = tags[1][6] } },
- { rule = { class = "Pythoncad" },
- properties = { floating = false, tag = tags[1][6] } },
- { rule = { class = "Librecad" },
- properties = { floating = false, tag = tags[1][6] } },
- { rule = { class = "Gnome-paint" },
- properties = { floating = false, tag = tags[1][6] } },
- { rule = { class = "GQview" },
- properties = { floating = false, tag = tags[1][6] } },
- { rule = { class = "Brasero" },
- properties = { floating = false, tag = tags[1][7] } },
- { rule = { class = "Xfburn" },
- properties = { floating = false, tag = tags[1][7] } },
- { rule = { class = "Qutim", role = "buddy_list" },
- properties = { floating = false, tag = tags[1][7] } },
- { rule = { class = "Qutim", role = "conversation" },
- properties = { floating = false, tag = tags[1][7], callback = awful.client.setslave } },-- установить, узнать и доделать
- { rule = { class = "Deadbeef" },
- properties = { floating = false, tag = tags[1][8] } },
- { rule = { class = "Audacity" },
- properties = { floating = false, tag = tags[1][8] } },
- { rule = { class = "Audacious" },
- properties = { floating = true, tag = tags[1][8] } },
- { rule = { class = "Exfalso" },
- properties = { floating = false, tag = tags[1][8] } },
- { rule = { class = "Volumeicon" },
- properties = { floating = false, tag = tags[1][8] } },
- { rule = { class = "Conkeror" },
- properties = { floating = false, tag = tags[1][9] } },
- { rule = { class = "Midori" },
- properties = { floating = false, tag = tags[1][9] } },
- { rule = { class = "Uzbl-core" },
- properties = { floating = false, tag = tags[1][9] } },
- { rule = { class = "Iceweasel" },
- properties = { floating = false, tag = tags[1][9] } },
- { rule = { class = "Firefox" },
- properties = { floating = true, tag = tags[1][9] } },
- { rule = { class = "Download" },
- properties = { floating = true, tag = tags[1][9] } },
- { rule = { instance = "Download" },
- properties = { floating = true, tag = tags[1][9] } },
- { rule = { instance = "Dialog" },
- properties = { floating = true, tag = tags[1][9] } },
- { rule = { instance = "Navigator" },
- properties = { floating = false, tag = tags[1][9] } },
- { rule = { instance = "VCLSalFrame" },
- properties = { floating = false, tag = tags[1][10] } },
- { rule = { name = "LibreOffice" },
- properties = { floating = false, tag = tags[1][10] } },
- { rule = { class = "Soffice" },
- properties = { floating = true, tag = tags[1][10] } },
- { rule = { class = "openoffice.org" },
- properties = { floating = false, tag = tags[1][10] } },
- { rule = { class = "Abiword" },
- properties = { floating = false, tag = tags[1][10] } },
- { rule = { class = "MPlayer" },
- properties = { floating = false, tag = tags[1][11] } },
- { rule = { class = "Smplayer" },
- properties = { floating = false, tag = tags[1][11] } },
- { rule = { class = "Gnome-mplayer" },
- properties = { floating = true, tag = tags[1][11] } },
- { rule = { class = "Lxappearance" },
- properties = { floating = true, tag = tags[1][11] } },
- { rule = { class = "Qtconfig" },
- properties = { floating = true, tag = tags[1][11] } },
- { rule = { class = "Gconf-editor" },
- properties = { floating = true, tag = tags[1][11] } },
- { rule = { name = "GParted" },
- properties = { floating = false, tag = tags[1][13] } },
- { rule = { class = "Gpartedbin" },
- properties = { tag = tags[1][13] } },
- { rule = { class = "URxvt" },
- properties = { floating = false, } },
- { rule = { class = "XTerm" },
- properties = { floating = true, } },
- { rule = { class = "XTerm", instance = "ppp_up_modem" },
- properties = { floating = true, tag = tags[1][12] } },
- { rule = { class = "feh" },
- properties = { floating = false, } },
- { rule = { name = "Print" },
- properties = { floating = true, } },
- { rule = { name = "Export" },
- properties = { floating = true, } },
- { rule = { name = "Import" },
- properties = { floating = true, } },
- { rule = { name = "Save" },
- properties = { floating = true, } },
- { rule = { name = "Open" },
- properties = { floating = true, } },
- { rule = { name = "Prefer" },
- properties = { floating = true, } },
- { rule = { name = "*title" },
- properties = { floating = true, } },
- { rule = { name = "Экспорт" },
- properties = { floating = true, } },
- { rule = { name = "Импорт" },
- properties = { floating = true, } },
- { rule = { name = "Настро" },
- properties = { floating = true, } },
- { rule = { name = "Параметр" },
- properties = { floating = true, } },
- { rule = { name = "Поиск" },
- properties = { floating = true, } },
- { rule = { name = "Добав" },
- properties = { floating = true, } },
- { rule = { name = "Печат" },
- properties = { floating = true, } },
- { rule = { name = "Сохран" },
- properties = { floating = true, } },
- { rule = { name = "Откры" },
- properties = { floating = true, } },
- { rule = { name = "Выреза" },
- properties = { floating = true, } },
- { rule = { name = "Удал" },
- properties = { floating = true, } },
- { rule = { name = "айл" },
- properties = { floating = true, } },
- { rule = { name = "Выбрать" },
- properties = { floating = true, } },
- { rule = { name = "Удал" },
- properties = { floating = true, } },
- { rule = { name = "Загруз" },
- properties = { floating = true, } },
- { rule = { name = "Предупреждение" },
- properties = { floating = true, } },
- { rule = { class = "Wine" },
- properties = { ontop = true, } }
- }
- --------------------------------------------------------------------------------
- client.add_signal("manage",
- function (c, startup)
- if not startup then
- -- Put windows in a smart way, only if they does not set an initial position.
- if not c.size_hints.user_position and not c.size_hints.program_position then
- awful.placement.no_overlap(c)
- awful.placement.no_offscreen(c)
- awful.placement.centered(c, nil)
- end
- end
- end
- )
- --------------------------------------------------------------------------------
- client.add_signal( "focus",
- function(c)
- c.border_color = beautiful.border_focus
- if ((c.opacity >= 0.95) or (c.opacity <= 0.95)) then
- c.opacity = 0.95
- end
- awful.placement.no_offscreen(c)
- end
- )
- --------------------------------------------------------------------------------
- client.add_signal("unfocus",
- function(c)
- c.border_color = beautiful.border_normal
- awful.placement.no_offscreen(c)
- end
- )
- --------------------------------------------------------------------------------
- --[[
- naughty.notify(
- {
- font = 'Neuropol 16',
- title = '<span color="#5050C0"> Трололо </span>',
- text = ' ешкин свет, опять работать?? ',
- timeout = 8,
- hover_timeout = 0.5
- }
- )
- ]]
Advertisement
Add Comment
Please, Sign In to add comment