Guest User

rc.lua

a guest
Apr 22nd, 2013
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 37.60 KB | None | 0 0
  1. --------------------------------------------------------------------------------
  2. require("widgets")
  3. require("naughty")
  4. --------------------------------------------------------------------------------
  5. local io = {
  6. lines = io.lines,
  7. popen = io.popen
  8. }
  9. local capi = {
  10. screen = screen
  11. }
  12. --------------------------------------------------------------------------------
  13. os.execute("bash " .. uhawesome .. "/scripts/.uptime &")
  14. --------------------------------------------------------------------------------
  15. if awesome.startup_errors then
  16. naughty.notify({
  17. font = "Terminus 8",
  18. timeout = 4,
  19. preset = naughty.config.presets.critical,
  20. title = "Еррор на старте осома, программист хуев!..",
  21. text = awesome.startup_errors })
  22. end
  23. --------------------------------------------------------------------------------
  24. do
  25. local in_error = false
  26. awesome.add_signal("debug::error", function (err)
  27. -- Make sure we don't go into an endless error loop
  28. if in_error then return end
  29. in_error = true
  30. naughty.notify({
  31. font = "Terminus 8",
  32. timeout = 4,
  33. preset = naughty.config.presets.critical,
  34. title = "Еб ты, ошибка нашлась!.. Писатель никудышный, смотри сюда!..",
  35. text = err })
  36. in_error = false
  37. end)
  38. end
  39. --------------------------------------------------------------------------------
  40. modkey = "Mod4" -- мод-клавиша WINDOWS
  41. --------------------------------------------------------------------------------
  42. layouts = -- определяем конфигурации расположения окон на тегах
  43. {
  44. awful.layout.suit.max,
  45. awful.layout.suit.floating,
  46. awful.layout.suit.fair,
  47. awful.layout.suit.tile.bottom
  48. }
  49. -------------------------------------------------------------------------------- ⣿⣾⣶⣴⣤⣠⣀⢀
  50. tags = {
  51. names = { "~", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "+" },
  52. 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] },
  53. keynum = { "49", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22" }
  54. }
  55. --------------------------------------------------------------------------------
  56. tags[screen_num] = awful.tag(tags.names, screen_num, tags.layout)
  57. for tgs in pairs(tags.names) do
  58. awful.tag.setnmaster(1, tags[screen_num][tgs])
  59. awful.tag.setncol( 1, tags[screen_num][tgs])
  60. awful.tag.setproperty( tags[screen_num][tgs], "mwfact", 0.65)
  61. end
  62. --------------------------------------------------------------------------------
  63. bwibox = {}
  64. bwibox[screen_num] = awful.wibox({ position = "bottom", screen = screen_num, height = 18, opacity = 0.90 })
  65. bwibox[screen_num].widgets = {
  66. {
  67. btaglist[screen_num],
  68. layout = awful.widget.layout.horizontal.leftright
  69. },
  70. screen_num == 1 and tsystray or nil,
  71. tncslock,
  72. ttextclock,
  73. tvolume,
  74. tuptime,
  75. tbat,
  76. tmem,
  77. thdd_temp,
  78. ttemp,
  79. tloadavg,
  80. tcpu,
  81. layout = awful.widget.layout.horizontal.rightleft
  82. }
  83. --------------------------------------------------------------------------------
  84. twibox = {}
  85. twibox[screen_num] = awful.wibox({ position = "top", screen = screen_num, height = 18, opacity = 0.90 })
  86. twibox[screen_num].widgets = {
  87. {
  88. tlayoutbox[screen_num],
  89. layout = awful.widget.layout.horizontal.leftright
  90. },
  91. tnet,
  92. ttasklist[screen_num],
  93. layout = awful.widget.layout.horizontal.rightleft
  94. }
  95. --------------------------------------------------------------------------------
  96. local scrgeom = capi.screen[screen_num].geometry
  97. --------------------------------------------------------------------------------
  98. wbox_info0:geometry(
  99. {
  100. x = scrgeom.x + 0,
  101. y = scrgeom.y + (scrgeom.height - wbox_info0.height) / 2
  102. }
  103. )
  104. wbox_info0.screen = screen_num
  105. wbox_info0.widgets = {
  106. tlauncher,
  107. layout = awful.widget.layout.horizontal.leftright
  108. }
  109. --------------------------------------------------------------------------------
  110. wbox_info1:geometry(
  111. {
  112. x = scrgeom.x + wbox_info0.width + 5,
  113. y = scrgeom.y + (scrgeom.height - wbox_info1.height) / 2
  114. }
  115. )
  116. wbox_info1.screen = screen_num
  117. wbox_info1.widgets = {
  118. winfo1,
  119. layout = awful.widget.layout.horizontal.leftright
  120. }
  121. --------------------------------------------------------------------------------
  122. wbox_info2:geometry(
  123. {
  124. x = scrgeom.x + (scrgeom.width - wbox_info2.width) - 5 ,
  125. y = scrgeom.y + (scrgeom.height - wbox_info2.height) / 2
  126. }
  127. )
  128. wbox_info2.screen = screen_num
  129. wbox_info2.widgets = {
  130. winfo2,
  131. layout = awful.widget.layout.horizontal.leftright
  132. }
  133. --------------------------------------------------------------------------------
  134. --[[
  135. wbox_info3:geometry(
  136. {
  137. x = scrgeom.x + (scrgeom.width - wbox_info3.width) - 5 ,
  138. y = scrgeom.y + (scrgeom.height - wbox_info3.height) - 23
  139. }
  140. )
  141. wbox_info3.screen = screen_num
  142. wbox_info3.widgets = {
  143. winfo3,
  144. winfo4,
  145. layout = awful.widget.layout.vertical.flex
  146. }
  147. --------------------------------------------------------------------------------
  148. --[
  149. lwibox = {}
  150. lwibox[screen_num] = awful.wibox({ position = "left", screen = screen_num, width = 44, opacity = 0.50 })
  151. lwibox[screen_num].widgets = {
  152. {
  153. tlauncher,
  154. -- layout = awful.widget.layout.vertical.flex
  155. },
  156. layout = awful.widget.layout.vertical.flex
  157. }
  158. ]]
  159. --------------------------------------------------------------------------------
  160. globalkeys = awful.util.table.join(
  161. awful.key({ modkey, }, "l",
  162. function ()
  163. awful.client.focus.byidx( 1)
  164. if client.focus then client.focus:raise() end
  165. end),
  166. awful.key({ modkey, }, "j",
  167. function ()
  168. awful.client.focus.byidx(-1)
  169. if client.focus then client.focus:raise() end
  170. end),
  171.  
  172. -- Layout manipulation:: ПЛОХОЙ СПИСОК ИСКАТЬ!!!!
  173. awful.key({ modkey, "Shift" }, "l", function () awful.client.swap.byidx( 1) end),
  174. awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( -1) end),
  175. awful.key({ modkey, "Control" }, "l", function () awful.screen.focus_relative( 1) end),
  176. awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative(-1) end),
  177. awful.key({ modkey, }, "u", awful.client.urgent.jumpto),
  178.  
  179. awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal1) end),
  180. awful.key({ modkey, "Control"}, "Return", function () awful.util.spawn(terminal2) end),
  181. awful.key({ modkey, "Control", "Shift" }, "Return", function () awful.util.spawn("scrot -cd 1 -e 'mv $f ~/scrot/'") end),
  182. awful.key({ modkey, "Control", "Shift" }, "o", function () awful.util.spawn("bash " .. uhome .. "/SCR/.screen_off") end),
  183. awful.key({ modkey, "Control", "Shift" }, "l", function () awful.util.spawn("libreoffice --nologo") end),
  184. 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
  185. --[[
  186. awful.key({ modkey, "Control", "Shift" }, "w", function () awful.util.spawn("xterm -e 'wvdial ForAll'") end),
  187. ]]
  188. awful.key({ modkey, "Control", "Shift" }, "c", function () awful.util.spawn("conkeror") end),
  189. awful.key({ modkey, "Control", "Shift" }, "i", function () awful.util.spawn("iceweasel") end),
  190. awful.key({ modkey, "Control", "Shift" }, "f", function () awful.util.spawn("firefox") end),
  191. --[[
  192. awful.key({ modkey, "Control", "Shift" }, "f", function () awful.util.spawn(uhome .. "/.fehbg") end),
  193. ]]
  194. awful.key({ modkey, "Control", "Shift" }, "h", function () awful.util.spawn("urxvt -e htop -d 10") end),
  195. awful.key({ modkey, "Control", "Shift" }, "a", function () awful.util.spawn("urxvt -e alsamixer") end),
  196.  
  197. awful.key({ modkey, "Control", "Shift" }, "g", function () awful.util.spawn("geany") end),
  198. awful.key({ modkey, "Control", "Shift" }, "d", function () awful.util.spawn("deadbeef") end),
  199.  
  200. awful.key({ modkey, "Control", "Shift" }, "F11", function ()
  201. naughty.notify(
  202. {
  203. font = 'Neuropol 16',
  204. title = '<span color="#5050C0"> На хуй </span>',
  205. text = ' перезагрузку ',
  206. timeout = 8,
  207. hover_timeout = 0.5
  208. }
  209. )
  210. awful.util.spawn("/sbin/reboot")
  211. end),
  212. awful.key({ modkey, "Control", "Shift" }, "F12", function ()
  213. naughty.notify(
  214. {
  215. font = 'Neuropol 16',
  216. title = '<span color="#5050C0"> На хуй </span>',
  217. text = ' выключение ',
  218. timeout = 8,
  219. hover_timeout = 0.5
  220. }
  221. )
  222. awful.util.spawn("/sbin/poweroff")
  223. end),
  224.  
  225. awful.key({ }, "XF86AudioPlay", function () awful.util.spawn("deadbeef --play-pause > /dev/null") end),
  226. awful.key({ }, "XF86AudioStop", function () awful.util.spawn("deadbeef --stop > /dev/null") end),
  227. awful.key({ }, "XF86AudioPrev", function () awful.util.spawn("deadbeef --prev > /dev/null") end),
  228. awful.key({ }, "XF86AudioNext", function () awful.util.spawn("deadbeef --next > /dev/null") end),
  229. awful.key({ }, "XF86AudioMute", function () awful.util.spawn("bash /etc/acpi/amixer_state.sh mute") end),
  230. awful.key({ }, "XF86AudioLowerVolume", function () awful.util.spawn("bash /etc/acpi/amixer_state.sh down") end),
  231. awful.key({ }, "XF86AudioRaiseVolume", function () awful.util.spawn("bash /etc/acpi/amixer_state.sh up") end),
  232.  
  233. awful.key({ }, "Scroll_Lock", function () awful.util.spawn("slock") end),
  234.  
  235. awful.key({ modkey, "Control" }, "r", awesome.restart),
  236. awful.key({ modkey, "Control",
  237. "Shift" }, "q", awesome.quit),
  238.  
  239. awful.key({ modkey, }, "p", function () awful.util.spawn(top_dmenu) end),
  240.  
  241. awful.key({ modkey, }, "i", function () awful.tag.incmwfact( 0.09) end),
  242. awful.key({ modkey, }, "k", function () awful.tag.incmwfact(-0.09) end),
  243. awful.key({ modkey, "Shift" }, "i", function () awful.tag.incnmaster( 1) end),
  244. awful.key({ modkey, "Shift" }, "k", function () awful.tag.incnmaster(-1) end),
  245. awful.key({ modkey, "Control" }, "i", function () awful.tag.incncol( 1) end),
  246. awful.key({ modkey, "Control" }, "k", function () awful.tag.incncol(-1) end),
  247. awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end),
  248. awful.key({ modkey, }, "w", function () awful.layout.set(layouts[1]) end),
  249. awful.key({ modkey, }, "s", function () awful.layout.set(layouts[2]) end),
  250. awful.key({ modkey, }, "d", function () awful.layout.set(layouts[3]) end),
  251. awful.key({ modkey, }, "e", function () awful.layout.set(layouts[4]) end),
  252.  
  253. awful.key({ modkey, }, "Tab", awful.tag.history.restore)
  254.  
  255. )
  256. --------------------------------------------------------------------------------
  257. clientkeys = awful.util.table.join(
  258. awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end),
  259. awful.key({ modkey, }, "f", function (c) c.fullscreen = not c.fullscreen end),
  260. awful.key({ modkey, "Shift" }, "q", function (c) c:kill() end),
  261. awful.key({ modkey, "Shift" }, "space", awful.client.floating.toggle ),
  262. awful.key({ modkey, "Shift" }, "r", function (c) c:redraw() end),
  263. awful.key({ modkey, }, "m",
  264. function (c)
  265. c.maximized_horizontal = not c.maximized_horizontal
  266. c.maximized_vertical = not c.maximized_vertical
  267. end)
  268. )
  269. --------------------------------------------------------------------------------
  270. keynumber = 0
  271. for s = 1, screen.count() do
  272. keynumber = math.min(20, math.max(#tags[s], keynumber));
  273. end
  274. --------------------------------------------------------------------------------
  275. for i = 1, keynumber do
  276. globalkeys = awful.util.table.join(globalkeys,
  277. awful.key({ modkey }, "#" .. tags.keynum[i],
  278. function ()
  279. local screen = mouse.screen
  280. if tags[screen][i] then
  281. awful.tag.viewonly(tags[screen][i])
  282. end
  283. end),
  284. awful.key({ modkey, "Shift" }, "#" .. tags.keynum[i],
  285. function ()
  286. if client.focus and tags[client.focus.screen][i] then
  287. awful.client.movetotag(tags[client.focus.screen][i])
  288. end
  289. end))
  290. end
  291. --------------------------------------------------------------------------------
  292. clientbuttons = awful.util.table.join(
  293. awful.button({ modkey }, 1, awful.mouse.client.move),
  294. awful.button({ modkey }, 3, awful.mouse.client.resize))
  295. --------------------------------------------------------------------------------
  296. root.keys(globalkeys)
  297. --------------------------------------------------------------------------------
  298. awful.rules.rules = {
  299. { rule = { },
  300. properties = {
  301. border_width = beautiful.border_width,
  302. border_color = beautiful.border_normal,
  303. focus = true,
  304. keys = clientkeys,
  305. buttons = clientbuttons,
  306. floating = true,
  307. callback = awful.placement.centered
  308. }
  309. },
  310. --[[
  311. { rule = { class = "Captstatusui" },
  312. properties = { floating = true } },
  313. { rule = { class = "XCalc" },
  314. properties = { floating = true } },
  315. { rule = { class = "Thunar" },
  316. properties = { floating = true } },
  317. { rule = { class = "Lxpanel" },
  318. properties = { floating = true } },
  319. { rule = { class = "Nautilus" },
  320. properties = { floating = true } },
  321. { rule = { class = "XFontSel" },
  322. properties = { floating = true } },
  323. { rule = { class = "Geany" },
  324. properties = { floating = true } },
  325. { rule = { class = "Qjackctl" },
  326. properties = { floating = true } },
  327. { rule = { class = "Volumeicon" },
  328. properties = { floating = true } },
  329. { rule = { class = "Gvolwheel" },
  330. properties = { floating = true } },
  331. { rule = { class = "Wine" },
  332. properties = { floating = true } },
  333. { rule = { class = "Gtk" },
  334. properties = { floating = true } },
  335. { rule = { class = "Torchlight.bin.x86" },
  336. properties = { floating = true } },
  337. { rule = { class = "ioquake3.i386" },
  338. properties = { floating = true } },
  339. { rule = { class = "ut-bin" },
  340. properties = { floating = true } },
  341. { rule = { class = "warzone2100" },
  342. properties = { floating = true } },
  343. { rule = { class = "avp" },
  344. properties = { floating = true } },
  345. { rule = { class = "SDL_App" },
  346. properties = { floating = true } },
  347.  
  348. { rule = { name = "ALSA Mixer"},
  349. properties = { floating = true } },
  350. { rule = { name = "/proc/asound"},
  351. properties = { floating = true } },
  352. { rule = { name = "Fieldrunners"},
  353. properties = { floating = true } },
  354. { rule = { name = "LGP Security System Manager"},
  355. properties = { floating = true } },
  356. { rule = { name = "Launch Sacred"},
  357. properties = { floating = true } },
  358. { rule = { name = "Event Tester"},
  359. properties = { floating = true } },
  360. { rule = { class = "Paman" },
  361. properties = { floating = true } },
  362.  
  363. ]]
  364. { rule = { class = "Gimp", role = "gimp-startup" },
  365. properties = { floating = true, tag = tags[1][3] } },
  366.  
  367. { rule = { class = "Gimp", role = "gimp-toolbox" },
  368. properties = { floating = true, tag = tags[1][3], geometry = {0000,015,0175,770} } },
  369.  
  370. { rule = { class = "Gimp", role = "gimp-dock" },
  371. properties = { floating = true, tag = tags[1][3], geometry = {1105,015,0175,770} } },
  372.  
  373. { rule = { class = "Gimp", role = "gimp-image-window" },
  374. properties = { floating = false, tag = tags[1][3] } },
  375.  
  376. { rule = { class = "Xsane" },
  377. properties = { floating = true, tag = tags[1][3] } },
  378. { rule = { class = "Xscanimage" },
  379. properties = { floating = true, tag = tags[1][3], callback = awful.placement.centered } },
  380. { rule = { class = "System-config-printer" },
  381. properties = { floating = true, tag = tags[1][3] } },
  382.  
  383. { rule = { class = "Djview" },
  384. properties = { floating = false, tag = tags[1][4] } },
  385. { rule = { class = "Evince" },
  386. properties = { floating = false, tag = tags[1][4] } },
  387.  
  388. { rule = { class = "Deluge" },
  389. properties = { floating = false, tag = tags[1][5] } },
  390. { rule = { class = "Deluge-gtk" },
  391. properties = { floating = false, tag = tags[1][5] } },
  392. { rule = { class = "Flush" },
  393. properties = { floating = false, tag = tags[1][5] } },
  394.  
  395. { rule = { class = "XPaint" },
  396. properties = { floating = true, tag = tags[1][6] } },
  397. { rule = { class = "TopLevelShell" },
  398. properties = { floating = false, tag = tags[1][6] } },
  399. { rule = { class = "Gpaint" },
  400. properties = { floating = false, tag = tags[1][6] } },
  401. { rule = { class = "Mtpaint" },
  402. properties = { floating = false, tag = tags[1][6] } },
  403. { rule = { class = "MyPaint" },
  404. properties = { floating = false, tag = tags[1][6] } },
  405. { rule = { class = "Gpicview" },
  406. properties = { floating = false, tag = tags[1][6] } },
  407. { rule = { class = "Pythoncad" },
  408. properties = { floating = false, tag = tags[1][6] } },
  409. { rule = { class = "Librecad" },
  410. properties = { floating = false, tag = tags[1][6] } },
  411. { rule = { class = "Gnome-paint" },
  412. properties = { floating = false, tag = tags[1][6] } },
  413. { rule = { class = "GQview" },
  414. properties = { floating = false, tag = tags[1][6] } },
  415.  
  416. { rule = { class = "Brasero" },
  417. properties = { floating = false, tag = tags[1][7] } },
  418. { rule = { class = "Xfburn" },
  419. properties = { floating = false, tag = tags[1][7] } },
  420. { rule = { class = "Qutim", role = "buddy_list" },
  421. properties = { floating = false, tag = tags[1][7] } },
  422. { rule = { class = "Qutim", role = "conversation" },
  423. properties = { floating = false, tag = tags[1][7], callback = awful.client.setslave } },-- установить, узнать и доделать
  424.  
  425. { rule = { class = "Deadbeef" },
  426. properties = { floating = false, tag = tags[1][8] } },
  427. { rule = { class = "Audacity" },
  428. properties = { floating = false, tag = tags[1][8] } },
  429. { rule = { class = "Audacious" },
  430. properties = { floating = true, tag = tags[1][8] } },
  431. { rule = { class = "Exfalso" },
  432. properties = { floating = false, tag = tags[1][8] } },
  433. { rule = { class = "Volumeicon" },
  434. properties = { floating = false, tag = tags[1][8] } },
  435.  
  436. { rule = { class = "Conkeror" },
  437. properties = { floating = false, tag = tags[1][9] } },
  438. { rule = { class = "Midori" },
  439. properties = { floating = false, tag = tags[1][9] } },
  440. { rule = { class = "Uzbl-core" },
  441. properties = { floating = false, tag = tags[1][9] } },
  442. { rule = { class = "Iceweasel" },
  443. properties = { floating = false, tag = tags[1][9] } },
  444. { rule = { class = "Firefox" },
  445. properties = { floating = true, tag = tags[1][9] } },
  446. { rule = { class = "Download" },
  447. properties = { floating = true, tag = tags[1][9] } },
  448. { rule = { instance = "Download" },
  449. properties = { floating = true, tag = tags[1][9] } },
  450. { rule = { instance = "Dialog" },
  451. properties = { floating = true, tag = tags[1][9] } },
  452. { rule = { instance = "Navigator" },
  453. properties = { floating = false, tag = tags[1][9] } },
  454.  
  455. { rule = { instance = "VCLSalFrame" },
  456. properties = { floating = false, tag = tags[1][10] } },
  457. { rule = { name = "LibreOffice" },
  458. properties = { floating = false, tag = tags[1][10] } },
  459. { rule = { class = "Soffice" },
  460. properties = { floating = true, tag = tags[1][10] } },
  461. { rule = { class = "openoffice.org" },
  462. properties = { floating = false, tag = tags[1][10] } },
  463. { rule = { class = "Abiword" },
  464. properties = { floating = false, tag = tags[1][10] } },
  465.  
  466. { rule = { class = "MPlayer" },
  467. properties = { floating = false, tag = tags[1][11] } },
  468. { rule = { class = "Smplayer" },
  469. properties = { floating = false, tag = tags[1][11] } },
  470. { rule = { class = "Gnome-mplayer" },
  471. properties = { floating = true, tag = tags[1][11] } },
  472.  
  473. { rule = { class = "Lxappearance" },
  474. properties = { floating = true, tag = tags[1][11] } },
  475. { rule = { class = "Qtconfig" },
  476. properties = { floating = true, tag = tags[1][11] } },
  477. { rule = { class = "Gconf-editor" },
  478. properties = { floating = true, tag = tags[1][11] } },
  479.  
  480. { rule = { name = "GParted" },
  481. properties = { floating = false, tag = tags[1][13] } },
  482.  
  483. { rule = { class = "Gpartedbin" },
  484. properties = { tag = tags[1][13] } },
  485.  
  486. { rule = { class = "URxvt" },
  487. properties = { floating = false, } },
  488. { rule = { class = "XTerm" },
  489. properties = { floating = true, } },
  490. { rule = { class = "XTerm", instance = "ppp_up_modem" },
  491. properties = { floating = true, tag = tags[1][12] } },
  492. { rule = { class = "feh" },
  493. properties = { floating = false, } },
  494.  
  495. { rule = { name = "Print" },
  496. properties = { floating = true, } },
  497. { rule = { name = "Export" },
  498. properties = { floating = true, } },
  499. { rule = { name = "Import" },
  500. properties = { floating = true, } },
  501. { rule = { name = "Save" },
  502. properties = { floating = true, } },
  503. { rule = { name = "Open" },
  504. properties = { floating = true, } },
  505. { rule = { name = "Prefer" },
  506. properties = { floating = true, } },
  507. { rule = { name = "*title" },
  508. properties = { floating = true, } },
  509.  
  510. { rule = { name = "Экспорт" },
  511. properties = { floating = true, } },
  512. { rule = { name = "Импорт" },
  513. properties = { floating = true, } },
  514. { rule = { name = "Настро" },
  515. properties = { floating = true, } },
  516. { rule = { name = "Параметр" },
  517. properties = { floating = true, } },
  518. { rule = { name = "Поиск" },
  519. properties = { floating = true, } },
  520. { rule = { name = "Добав" },
  521. properties = { floating = true, } },
  522. { rule = { name = "Печат" },
  523. properties = { floating = true, } },
  524. { rule = { name = "Сохран" },
  525. properties = { floating = true, } },
  526. { rule = { name = "Откры" },
  527. properties = { floating = true, } },
  528. { rule = { name = "Выреза" },
  529. properties = { floating = true, } },
  530. { rule = { name = "Удал" },
  531. properties = { floating = true, } },
  532. { rule = { name = "айл" },
  533. properties = { floating = true, } },
  534. { rule = { name = "Выбрать" },
  535. properties = { floating = true, } },
  536. { rule = { name = "Удал" },
  537. properties = { floating = true, } },
  538. { rule = { name = "Загруз" },
  539. properties = { floating = true, } },
  540. { rule = { name = "Предупреждение" },
  541. properties = { floating = true, } },
  542.  
  543. { rule = { class = "Wine" },
  544. properties = { ontop = true, } }
  545. }
  546. --------------------------------------------------------------------------------
  547. client.add_signal("manage",
  548. function (c, startup)
  549. if not startup then
  550. -- Put windows in a smart way, only if they does not set an initial position.
  551. if not c.size_hints.user_position and not c.size_hints.program_position then
  552. awful.placement.no_overlap(c)
  553. awful.placement.no_offscreen(c)
  554. awful.placement.centered(c, nil)
  555. end
  556. end
  557. end
  558. )
  559. --------------------------------------------------------------------------------
  560. client.add_signal( "focus",
  561. function(c)
  562. c.border_color = beautiful.border_focus
  563. if ((c.opacity >= 0.95) or (c.opacity <= 0.95)) then
  564. c.opacity = 0.95
  565. end
  566. awful.placement.no_offscreen(c)
  567. end
  568. )
  569. --------------------------------------------------------------------------------
  570. client.add_signal("unfocus",
  571. function(c)
  572. c.border_color = beautiful.border_normal
  573. awful.placement.no_offscreen(c)
  574. end
  575. )
  576. --------------------------------------------------------------------------------
  577. --[[
  578. naughty.notify(
  579. {
  580. font = 'Neuropol 16',
  581. title = '<span color="#5050C0"> Трололо </span>',
  582. text = ' ешкин свет, опять работать?? ',
  583. timeout = 8,
  584. hover_timeout = 0.5
  585. }
  586. )
  587. ]]
Advertisement
Add Comment
Please, Sign In to add comment