{"id":214411,"date":"2014-03-03T14:57:03","date_gmt":"2014-03-03T10:57:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=214411"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=214411","title":{"rendered":"<span class=\"post_title\">\u041c\u043e\u0451 \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u043e \u0441 WM Awesome. \u0427\u0430\u0441\u0442\u044c 1<\/span>"},"content":{"rendered":"<div class=\"content html_format\"> \t\t\t\u0420\u0430\u0437\u0433\u043e\u0432\u043e\u0440 \u043f\u043e\u0439\u0434\u0451\u0442 \u043e \u043c\u043e\u0451\u043c \u043f\u0435\u0440\u0432\u043e\u043c \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u0435 \u0441 \u0442\u0430\u043a\u0438\u043c \u043e\u043a\u043e\u043d\u043d\u044b\u043c \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u043e\u043c, \u043a\u0430\u043a Awesome. \u0414\u043e\u043b\u0433\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b Gnome2, \u043f\u043e\u0442\u043e\u043c \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b Gnome3, \u0440\u0435\u0448\u0438\u043b \u0438\u0441\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c kde, \u043d\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u0438\u043b\u043e \u043c\u0435\u043d\u044f. \u0414\u0430, \u043a \u0441\u043b\u043e\u0432\u0443, \u0443 \u043c\u0435\u043d\u044f Gentoo. \u0414\u0430, \u0441\u0442\u0430\u0442\u044c\u044f \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 \u0442\u0430\u043a\u0438\u0445 \u0436\u0435 \u043a\u0430\u043a \u0438 \u044f \u043d\u043e\u0432\u0438\u0447\u043a\u043e\u0432 \u2014 \u0434\u0430\u0431\u044b \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0436\u0438\u0437\u043d\u044c.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0412 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0432\u0435\u0442\u043a\u0435 \u043f\u043e\u0440\u0442\u0430\u0436\u0430 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0435\u0440\u0441\u0438\u044f 3.4.15, \u043d\u043e \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u044e\u044e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0443\u044e \u2014 3.5.2-r1, \u0441 USE \u0444\u043b\u0430\u0433\u043e\u043c \u00abdbus\u00bb. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043b\u043e\u0433\u0438\u043d \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430 \u044f \u0432\u044b\u0431\u0440\u0430\u043b SLiM. \u041f\u043e\u0441\u043b\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 \u0432\u0441\u0435\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \/etc\/conf.d\/xdm \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c SLiM \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e:<\/p>\n<p>  <code>DISPLAYMANAGER=&quot;slim&quot;<\/code><\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u044f \/etc\/slim.conf<\/p>\n<p>  <code># login_cmd           exec \/bin\/sh - ~\/.xinitrc %session<\/code><br \/>  <code>login_cmd           exec \/bin\/bash -login ~\/.xinitrc %session<\/code><br \/>  <code># login_cmd           exec \/bin\/bash -login \/usr\/share\/slim\/Xsession %session<\/code><\/p>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0435 \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u0432\u0448\u0443\u044e\u0441\u044f \u0442\u0435\u043c\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043b\u0435\u0436\u0430\u0442 \u0432 \/usr\/share\/slim\/themes. \u042f \u043e\u0431\u0445\u043e\u0436\u0443\u0441\u044c \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u043e\u0439. \u0422\u0430\u043a \u0436\u0435 \u0442\u0430\u043c \u0435\u0441\u0442\u044c \u0435\u0449\u0451 \u043f\u0430\u0440\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u043d\u043e \u044f \u0438\u0445 \u043d\u0435 \u0442\u0440\u043e\u0433\u0430\u043b \u2014 \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438.<\/p>\n<p>  \u0422\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u044f \u0440\u0435\u0448\u0438\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c urxvt. \u0423 \u043c\u0435\u043d\u044f \u043e\u043d \u0441\u043e\u0431\u0440\u0430\u043d:<\/p>\n<p>  <code>rxvt USE=&quot;xgetdefaults&quot;<\/code><br \/>  <code>rxvt-unicode USE=&quot;256-color focused-urgency font-styles mousewheel perl startup-notification vanilla xft&quot;<\/code><\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b, \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0441\u044f \u043d\u0430\u0448 wm \u043d\u0443\u0436\u043d\u043e \u0432\u043c\u0435\u0441\u0442\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0444\u0430\u0439\u043b ~\/.xinitrc (\u0435\u0441\u043b\u0438 \u0435\u0433\u043e \u043d\u0435\u0442\u0443 \u2014 \u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c), \u043d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u043e\u0436\u0443 \u0441\u0432\u043e\u0439:<\/p>\n<p>  <code>urxvtd --quiet --opendisplay --fork &<\/code><br \/>  <code>pulseaudio --start &<\/code><br \/>  <code>exec ck-launch-session dbus-launch awesome<\/code><\/p>\n<p>  \u041f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u2014 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e \u0434\u0435\u043c\u043e\u043d urxvt (\u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043a\u043b\u0438\u0435\u043d\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f urxvtc), \u043d\u0443, \u0432\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u043d\u044f\u0442\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c pulseaudio, \u0438 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u0430\u043c awesome. \u0421\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 systemd, \u0430 \u043d\u0435 consolekit \u2014 \u0442\u043e \u0443 \u0432\u0430\u0441 \u0432\u044b\u0437\u043e\u0432 awesome \u0432\u0440\u043e\u0434\u0435 \u043a\u0430\u043a \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f, \u043d\u043e \u044f \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e systemd, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u0431\u0435\u0440\u0443\u0441\u044c \u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0442\u044c.<\/p>\n<p>  \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c xdm:<br \/>  <code>sudo \/etc\/init.d\/xdm start<\/code><\/p>\n<p>  \u041b\u043e\u0433\u0438\u043d\u0438\u043c\u0441\u044f \u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c \u0432\u043e\u0442 \u0442\u0430\u043a\u0443\u044e \u0432\u043e\u0442 \u043a\u0430\u0440\u0442\u0438\u043d\u0443: <br \/>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/2a5\/92f\/5d2\/2a592f5d20f2442fa306791b68bb10b6.png\"\/><\/p>\n<p>  \u042f \u0434\u043e\u043b\u0433\u043e \u043b\u0430\u0437\u0438\u043b \u043f\u043e \u0440\u0430\u0437\u043d\u044b\u043c \u0444\u043e\u0440\u0443\u043c\u0430\u043c \u0432 \u043f\u043e\u0438\u0441\u043a\u0430\u0445 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0445 \u0442\u0435\u043c\u043e\u043a, \u043a\u043e\u043d\u0444\u0438\u0433\u043e\u0432, \u0432\u0438\u0434\u0436\u0435\u0442\u043e\u0432 \u0434\u043b\u044f awesome. \u041d\u0430\u0442\u043a\u0443\u043b\u0441\u044f \u043d\u0430 \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f unligic (\u0443 \u043d\u0435\u0433\u043e \u043c\u043d\u043e\u0433\u043e \u0441\u0442\u0430\u0442\u0435\u0439 \u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0432\u0435\u0449\u0435\u0439 \u043d\u0430 github)<\/p>\n<p>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/9d3\/c28\/cfb\/9d3c28cfb6bb4f77ad7ab8bdddb132aa.png\"\/><\/p>\n<p>  \u0418 \u0431\u043e\u043b\u0435\u0435 \u043d\u043e\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0435\u0433\u043e \u0442\u0435\u043c\u044b:<\/p>\n<p>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/855\/e80\/ec7\/855e80ec75ba4140a2e716c57a472981.png\"\/><\/p>\n<p>  \u041c\u0435\u043d\u044f \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u0438\u043b\u043e \u0438 \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0435\u0431\u0435 \u0435\u0433\u043e \u0442\u0435\u043c\u0443 \u2014 \u043d\u043e \u044d\u0442\u043e \u043d\u0435 \u0443\u0432\u0435\u043d\u0447\u0430\u043b\u043e\u0441\u044c \u0443\u0441\u043f\u0435\u0445\u043e\u043c. \u0422\u0435\u043c\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e. \u041f\u0440\u0438 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043e\u0434\u043d\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u043e\u044f\u0432\u043b\u044f\u043b\u0430\u0441\u044c \u043d\u043e\u0432\u0430\u044f \u0438 \u0442.\u0434. \u041f\u043e\u0437\u0436\u0435 \u044f \u0443\u0432\u0438\u0434\u0435\u043b \u0435\u0433\u043e \u043f\u043e\u0441\u0442, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u043e\u0435 \u00ab\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u0438\u0447\u043a\u0443 \u043d\u0435 \u0441\u043e\u0432\u0435\u0442\u0443\u044e, \u0442\u0430\u043a \u043a\u0430\u043a \u0442\u0430\u043c \u043c\u043d\u043e\u0433\u043e \u043a\u043e\u0441\u0442\u044b\u043b\u0435\u0439, \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u0442\u0435 \u043a\u0443\u0447\u0443 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u043d\u0435 \u0444\u0430\u043a\u0442, \u0447\u0442\u043e \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u00bb. \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0442\u0430\u043a \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c. \u0422\u043e\u0433\u0434\u0430 \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433 \u0441\u0430\u043c. \u0417\u043d\u0430\u043d\u0438\u0439 \u0432 Lua \u0443 \u043c\u0435\u043d\u044f \u043d\u0435 \u0431\u044b\u043b\u043e \u0432\u043e\u043e\u0431\u0449\u0435, \u043d\u043e \u0433\u0443\u0433\u043b \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442. <\/p>\n<p>  \u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u043b\u0435\u0436\u0438\u0442 \u0432 \/etc\/xdg\/awesome\/rc.lua \u2014 \u043d\u043e \u0435\u0433\u043e \u044f \u0442\u0440\u043e\u0433\u0430\u0442\u044c \u043d\u0435 \u0441\u043e\u0432\u0435\u0442\u0443\u044e, \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0435\u0433\u043e<br \/>  <code>cp \/etc\/xdg\/awesome\/rc.lua ~\/.config\/awesome\/rc.lua<\/code><br \/>  (\u0423 \u043a\u043e\u0433\u043e-\u0442\u043e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 .config \u043c\u043e\u0436\u0435\u0442 \u043d\u0435 \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f, \u043d\u0435 \u043f\u0443\u0433\u0430\u0439\u0442\u0435\u0441\u044c \u2014 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435. <br \/>  <code>mkdir ~\/.config<\/code><br \/>  <code>mkdir ~\/.config\/awesome<\/code><\/p>\n<p>  \u041d\u0430\u0447\u043d\u0451\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e. (\u0414\u0430, \u044f, \u043f\u043e\u043b\u044c\u0437\u0443\u044f\u0441\u044c \u043c\u043d\u043e\u0433\u0438\u043c\u0438 \u0441\u0442\u0430\u0442\u044c\u044f\u043c\u0438, \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u043b \u0435\u0433\u043e)<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0422\u0443\u0442 \u043c\u044b \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u0432\u0441\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"lua\">--------------------------------------------- --- \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 --- --------------------------------------------- local gears = require(&quot;gears&quot;) local awful = require(&quot;awful&quot;) local vicious = require(&quot;vicious&quot;) awful.rules = require(&quot;awful.rules&quot;) require(&quot;awful.autofocus&quot;) local wibox = require(&quot;wibox&quot;) local beautiful = require(&quot;beautiful&quot;) local naughty = require(&quot;naughty&quot;) local menubar = require(&quot;menubar&quot;) local dbus = require(&quot;dbus&quot;) <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0412\u0440\u043e\u0434\u0435 \u0432\u0441\u0451 \u043f\u043e\u043d\u044f\u0442\u043d\u043e \ud83d\ude42<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"lua\">--------------------------------------------------------- --- \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u0443\u044e \u043b\u043e\u043a\u0430\u043b\u044c --- --------------------------------------------------------- os.setlocale(&quot;ru_RU.UTF-8&quot;) <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u042d\u0442\u0443 \u0447\u0430\u0441\u0442\u044c \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u0431\u0435\u0437 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 &#8212; \u044d\u0442\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043e\u0448\u0438\u0431\u043e\u043a<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"lua\">-- {{{ 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) if awesome.startup_errors then     naughty.notify({ preset = naughty.config.presets.critical,                      title = &quot;Oops, there were errors during startup!&quot;,                      text = awesome.startup_errors }) end  -- Handle runtime errors after startup do     local in_error = false     awesome.connect_signal(&quot;debug::error&quot;, function (err)         -- Make sure we don't go into an endless error loop         if in_error then return end         in_error = true          naughty.notify({ preset = naughty.config.presets.critical,                          title = &quot;Oops, an error happened!&quot;,                          text = err })         in_error = false     end) end -- }}} <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u042f \u0432\u0437\u044f\u043b \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0442\u0435\u043c\u0443 zenburn (\u043b\u0435\u0436\u0438\u0442 \u0432 \/usr\/share\/awesome\/themes\/zenburn). \u0418 \u0440\u0435\u0448\u0438\u043b \u0435\u0451 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u043f\u043e\u0434 \u0441\u0435\u0431\u044f (\u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u043f\u043e\u043a\u0430 \u0447\u0442\u043e)<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"lua\">------------------------------------- --- \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0442\u0435\u043c\u0443 --- ------------------------------------- beautiful.init(&quot;\/home\/worm2fed\/.config\/awesome\/themes\/worm2fed\/theme.lua&quot;) <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 -nw \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c emacs \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"lua\">---------------------------------------------------------------------- --- \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e --- ---------------------------------------------------------------------- terminal         = &quot;urxvtc&quot; -- \u0422\u0435\u0440\u043c\u0438\u043d\u0430\u043b \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e browser         = &quot;google-chrome-stable&quot; -- \u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e editor              = os.getenv(&quot;EDITOR&quot;) or &quot;emacs&quot; -- \u0420\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e editor_cmd    = terminal .. &quot; -nw&quot; .. editor -- \u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041e\u0442\u0441\u0442\u0443\u043f\u044b \u0443\u0436\u0430\u0441\u043d\u043e \u0441\u044a\u0435\u0445\u0430\u043b\u0438, \u043d\u043e \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 \u043e\u043d\u043e \u0432\u0441\u0451 \u043a\u0440\u0430\u0441\u0438\u0432\u043e. \u041a\u043b\u0430\u0432\u0438\u0448\u0430 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u2014 \u0435\u0451 \u0435\u0449\u0451 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u0443\u043f\u0435\u0440, \u043a\u043b\u0430\u0432\u0438\u0448\u0430 \u0441 \u043b\u043e\u0433\u043e\u0442\u0438\u043f\u043e\u043c \u0448\u0438\u043d\u0434\u043e\u0443\u0441\u0430. \u0427\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u044d\u0442\u043e Mod4, \u043d\u043e \u043c\u043e\u0436\u0435\u0442 \u0438 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f. \u0418 \u0434\u0430\u043b\u0435\u0435 \u043a\u043e\u0434\u044b \u043a\u043d\u043e\u043f\u043e\u043a \u043c\u044b\u0448\u0438 \u0438 \u043d\u0443\u0436\u043d\u044b\u0445 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0435 \u043a\u043b\u0430\u0432\u0438\u0448. \u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043a\u043e\u0434\u043e\u0432 \u043c\u044b\u0448\u0438:<br \/>  <code>xev | grep 'button'<\/code><\/p>\n<p>  \u0414\u043b\u044f \u043a\u043b\u0430\u0432\u0438\u0448\u0438 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u0438 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u043a\u043b\u0430\u0432\u0438\u0448:<br \/>  <code>xev | grep 'keycode'<\/code><\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u043e\u0434\u044b \u043a\u043d\u043e\u043f\u043e\u043a \u0438 \u043a\u043b\u0430\u0432\u0438\u0448<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"lua\">----------------------------------------- --- \u041a\u043b\u0430\u0432\u0438\u0448\u0430-\u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 --- ----------------------------------------- modkey             = &quot;Mod4&quot;  --------------------------- --- \u041a\u043d\u043e\u043f\u043a\u0438 \u043c\u044b\u0448\u0438 --- --------------------------- left_button                  = 1 wheel_button            = 2 right_button               = 3 plus_button               = 4  minus_button           = 5 wheel_left_button    = 6 wheel_write_button = 7  ----------------------------------- --- \u0421\u043a\u0430\u043d-\u043a\u043e\u0434\u044b \u043a\u043b\u0430\u0432\u0438\u0448 --- ----------------------------------- key_V              = &quot;#55&quot; key_Z              = &quot;#52&quot; key_Y               = &quot;#29&quot; key_J                = &quot;#44&quot; key_K               = &quot;#45&quot; key_N               = &quot;#57&quot; key_M               = &quot;#58&quot; key_F                = &quot;#41&quot; key_R               = &quot;#27&quot; key_L                = &quot;#46&quot; key_C               = &quot;#54&quot; key_W               = &quot;#25&quot; key_X                = &quot;#53&quot; key_Q                = &quot;#24&quot; key_H                = &quot;#43&quot; key_Tab             = &quot;#23&quot; key_Tilda           = &quot;#49&quot; key_U                  = &quot;#30&quot; key_E                  = &quot;#26&quot; key_T                   = &quot;#28&quot; key_P                   = &quot;#33&quot; key_O                   = &quot;#32&quot; key_Return          = &quot;#36&quot; key_Left               = &quot;#113&quot; key_Right            = &quot;#114&quot; key_Esc               = &quot;#9&quot; key_Print              = &quot;#107&quot; key_Alt_R             = &quot;#108&quot; key_Alt_L              = &quot;#64&quot; key_Space           = &quot;#65&quot; key_Ctrl_R           = &quot;#105&quot; key_Ctrl_L            = &quot;#37&quot; key_Home            = &quot;#110&quot; key_F1                   = &quot;#67&quot; key_Mute               = &quot;#121&quot; key_Vol_Down     = &quot;#122&quot; key_Vol_Up          = &quot;#123&quot; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0417\u0434\u0435\u0441\u044c \u044f \u0432\u044b\u0431\u0440\u0430\u043b \u043d\u0443\u0436\u043d\u044b\u0435 \u043c\u043d\u0435 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438 \u043e\u043a\u043e\u043d<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"lua\">------------------------------------------------------------------------------ --- Layouts - \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e\u043a\u043e\u043d \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 --- ----------------------------------------------------------------------------- local layouts = {     awful.layout.suit.floating,          -- 1       awful.layout.suit.tile,                  -- 2 \u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u043e\u043a\u043d\u043e \u0441\u043b\u0435\u0432\u0430, \u0441\u043f\u0440\u0430\u0432\u0430 \u0432\u0442\u043e\u0440\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u044b\u0435 (\u043c\u0435\u043b\u043a\u0438\u0435)     --awful.layout.suit.tile.left,         -- * \u0421\u043b\u0435\u0432\u0430 \u0432\u0442\u043e\u0440\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u043d\u0430     awful.layout.suit.tile.bottom,    -- 3 \u0412\u043d\u0438\u0437\u0443 \u0432\u0442\u043e\u0440\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u043d\u0430     --awful.layout.suit.tile.top,         -- * \u0412\u0442\u043e\u0440\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u043d\u0430 \u0432\u0432\u0435\u0440\u0445\u0443     awful.layout.suit.fair,                  -- 4     --awful.layout.suit.fair.horizontal,     --awful.layout.suit.spiral,     awful.layout.suit.spiral.dwindle,    -- 5     awful.layout.suit.max,                      -- 6     --awful.layout.suit.max.fullscreen,     awful.layout.suit.magnifier             -- 7 } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0422\u0443\u0442 \u0432\u0441\u0451 \u044f\u0441\u043d\u043e<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"lua\">-------------------------------------- --- \u041e\u0431\u043e\u0438 \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u0441\u0442\u043e\u043b\u0430 --- -------------------------------------- -- \u0415\u0441\u043b\u0438 \u0432 \u0442\u0435\u043c\u0435 \u0437\u0430\u0434\u0430\u043d\u044b \u043e\u0431\u043e\u0438 if beautiful.wallpaper then   -- \u041f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u0441\u0435 \u044d\u043a\u0440\u0430\u043d\u044b   for s = 1, screen.count() do     -- \u041d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u044d\u043a\u0440\u0430\u043d \u043a\u043b\u0430\u0434\u0435\u043c \u043e\u0431\u043e\u0438 (\u043c\u043e\u0436\u043d\u043e \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u044d\u043a\u0440\u0430\u043d \u0441\u0432\u043e\u0438)     gears.wallpaper.maximized(beautiful.wallpaper, s, true)   end end <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0418\u043c\u0435\u043d\u0430 \u0442\u0435\u0433\u043e\u0432 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043b\u044e\u0431\u044b\u043c\u0438 \u2014 \u044f \u0432\u044b\u0431\u0440\u0430\u043b \u0433\u0440\u0435\u0447\u0435\u0441\u043a\u0438\u0435 \u0431\u0443\u043a\u0432\u044b \u2014 \u043a\u0430\u043a \u043d\u0430 \u0441\u043a\u0440\u0438\u043d\u0435 unligic. \u041a\u0430\u0436\u0434\u043e\u043c\u0443 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c\u0443 \u0442\u0435\u0433\u0443 \u044f \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u044e \u0441\u0432\u043e\u0451 \u043c\u0430\u043a\u0435\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438 \u0432\u044b\u0448\u0435.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0422\u044d\u0433\u0438<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"lua\">--------------------------------------------------------- --- \u0422\u044d\u0433\u0438 - \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u0440\u0430\u0431\u043e\u0447\u0438\u0435 \u0441\u0442\u043e\u043b\u044b --- --------------------------------------------------------- -- \u0421\u043f\u0438\u0441\u043e\u043a \u0442\u044d\u0433\u043e\u0432 tags = {    -- \u0418\u043c\u0435\u043d\u0430 \u0442\u044d\u0433\u043e\u0432    names  = { &quot;  \u03b1  &quot;, &quot;  \u03b2  &quot;, &quot;  \u03b6  &quot;, &quot;  \u0398  &quot;, &quot;  \u039e  &quot;, &quot;  \u03c2  &quot;, &quot;  \u03c8  &quot;},    -- \u041c\u0430\u043a\u0435\u0442\u044b \u0442\u044d\u0433\u043e\u0432    layout = { layouts[1], layouts[2], layouts[3], layouts[4], layouts[5],               layouts[6],  layouts[7] }} -- \u041f\u0435\u0440\u0435\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u0441\u0435 \u044d\u043a\u0440\u0430\u043d\u044b for s = 1, screen.count() do    -- \u041d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u044d\u0433\u043e\u0432, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044f \u043c\u0430\u043a\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043e\u043a\u043e\u043d    tags[s] = awful.tag(tags.names, s, tags.layout) end <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043c\u0435\u043d\u044e\u0448\u043a\u0443 (\u043d\u0435 \u0437\u043d\u0430\u044e \u0437\u0430\u0447\u0435\u043c \u043e\u043d\u0430 \u043d\u0443\u0436\u043d\u0430, \u0442\u0430\u043a \u043d\u0438 \u0440\u0430\u0437\u0443 \u0438 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b)<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"lua\">------------------------------ --- \u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u043c\u0435\u043d\u044e --- ------------------------------ --- \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f internet_menu = {     -- \u0424\u043e\u0440\u043c\u0430\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043f\u0443\u043d\u043a\u0442\u0430 \u043c\u0435\u043d\u044e     -- {&lt;\u041d\u0430\u0437\u0430\u0432\u0430\u043d\u0438\u0435 \u043f\u0443\u043d\u043a\u0442\u0430 \u043c\u0435\u043d\u044e&gt;, &lt;\u041a\u043e\u043c\u0430\u043d\u0434\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430&gt;, &lt;\u0418\u043a\u043e\u043d\u043a\u0430&gt;}     {&quot; Firefox&quot;, &quot;firefox-bin&quot;, beautiful.firefox_icon},     {&quot; Chrome&quot;, &quot;google-chrome-stable&quot;, beautiful.chrome_icon},     {&quot; Pidgin&quot;, &quot;pidgin&quot;} } ---  editors_menu = {   {&quot; Eclipse&quot;, &quot;eclipse-bin-4.2&quot;},   {&quot; Emacs&quot;, &quot;emacs&quot;} } ---  office_menu = {   {&quot; Word&quot;, &quot;libreoffice --writer&quot;},   {&quot; Exel&quot;, &quot;libreoffice --calc&quot;} }  main_menu = awful.menu({   -- \u0422\u0430\u0431\u043b\u0438\u0446\u0430 \u043f\u0443\u043d\u043a\u0442\u043e\u0432 \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u044e   items = {       {&quot; \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442&quot;, internet_menu},       {&quot; \u0420\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u044b&quot;, editors_menu},       {&quot; LibreOffice&quot;, office_menu},       {&quot; &quot;},       {&quot; \u041f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430&quot;, &quot;reboot&quot;, beautiful.reboot_icon},       {&quot; \u0412\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435&quot;, &quot;halt&quot;, beautiful.poweroff_icon},       {&quot; \u0412\u044b\u0445\u043e\u0434&quot;, awesome.quit, beautiful.logout_icon}   } })  ------------------------------------------------------------------ --- \u041b\u0430\u0443\u043d\u0447\u0435\u0440 - \u0442\u0430 \u043a\u043d\u043e\u043f\u043a\u0430 \u0447\u0442\u043e \u043d\u0430 \u043f\u0430\u043d\u0435\u043b\u0438 \u0441\u043b\u0435\u0432\u0430 ---  ------------------------------------------------------------------ launcher = awful.widget.launcher({ image = beautiful.gentoo_icon, menu = main_menu }) <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0410 \u0432\u043e\u0442 \u044d\u0442\u043e \u0442\u0430\u043a \u0438 \u043d\u0435 \u043f\u043e\u043d\u044f\u043b \u0434\u043b\u044f \u0447\u0435\u0433\u043e<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"lua\">-- Menubar configuration menubar.utils.terminal = terminal -- Set the terminal for applications that require it -- }}} <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0422\u0443\u0442 \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u043c \u0432\u0441\u0435 \u0432\u0438\u0434\u0436\u0435\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f. \u0421\u0440\u0430\u0437\u0443 \u0441\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c \u0431\u0430\u0433 \u2014 \u043f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043a\u043b\u0430\u0432\u0438\u0448\u0438 \u00ab\u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0437\u0432\u0443\u043a\u00bb \u0437\u0432\u0443\u043a \u0438\u0441\u0447\u0435\u0437\u0430\u0435\u0442, \u043f\u0440\u0438 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u043c \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u2014 \u043d\u0430 \u0432\u0438\u0434\u0436\u0435\u0442\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u0442, \u0447\u0442\u043e \u0437\u0432\u0443\u043a \u0432\u043a\u043b\u044e\u0447\u0451\u043d, \u043d\u043e \u0435\u0433\u043e \u043d\u0435\u0442\u0443. \u041f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438, \u0441\u0442\u0440\u0430\u043d\u043d\u043e. \u041f\u043e\u043a\u0430 \u043d\u0435 \u043d\u0430\u0448\u0451\u043b \u043a\u0430\u043a \u0435\u0433\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c. \u0418 \u0435\u0449\u0451 \u0441\u043c\u0443\u0449\u0430\u0435\u0442 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043d\u0438\u0435 \u0433\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u0438 \u2014 90% \u043f\u043e \u0444\u0430\u043a\u0442\u0443 ~70 \u0435\u0434\u0438\u043d\u0438\u0446 \u0432 alsamixer, \u043d\u0430\u0434\u043e \u0431\u044b \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c, \u043d\u043e \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0434\u043e\u0439\u0434\u0451\u0442 \u0440\u0443\u043a\u0438. \u041d\u0443 \u0430 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u043e\u0434\u0435 \u043a\u0430\u043a \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0412\u0438\u0434\u0436\u0435\u0442\u044b<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"lua\">--------------------- --- \u0412\u0438\u0434\u0436\u0435\u0442\u044b --- --------------------- opening_brace = '&lt;span foreground=&quot;white&quot; font_desc=&quot;Ubuntu&quot;&gt;[&lt;\/span&gt;' closing_brace = '&lt;span foreground=&quot;white&quot; font_desc=&quot;Ubuntu&quot;&gt;] &lt;\/span&gt;' function enbrace(str)    return &quot; &quot;..opening_brace..str..closing_brace..' ' end  function colorify(str, color)    return '&lt;span foreground=&quot;'..color..'&quot;&gt;'..str..'&lt;\/span&gt;' end  function get_colorload(val)    local color = 'green'    if val &gt; 85 then       color = 'red'    elseif val &gt; 60 then       color = 'yellow'    end    return color end  function format_throughput(val)    if (val &lt; 1000) then       return string.format('%3dKB\/s', val)    elseif (val &lt; 10240) then       return string.format('%.1fMB\/s', val\/1024)    else       return string.format('%3dMB\/s', val\/1024)    end end  one_sec_timer = timer{timeout = 1} ten_sec_timer = timer{timeout = 10}  spacer_big = wibox.widget.textbox()   spacer_big:set_text('     ') spacer_small = wibox.widget.textbox()   spacer_small:set_text('  ') volumecfg = {} volumecfg.cardid  = 0 volumecfg.channel = &quot;Master&quot; volumecfg.widget = wibox.widget.textbox() vol_color = {} -- command must start with a space! volumecfg.mixercommand = function (command)        local fd = io.popen(&quot;amixer -c &quot; .. volumecfg.cardid .. command)        local status = fd:read(&quot;*all&quot;)        fd:close()         local volume = string.match(status, &quot;(%d?%d?%d)%%&quot;)        volume = string.format(&quot;% 3d&quot;, volume)        status = string.match(status, &quot;%[(o[^%]]*)%]&quot;)        if string.find(status, &quot;on&quot;, 1, true) then                volume = volume .. &quot;%&quot; \t       vol_color=&quot;cyan&quot;        else                volume = volume .. &quot;\u00d7&quot; \t\tvol_color = &quot;red&quot;        end        volumecfg.widget:set_markup(enbrace(colorify(volume, vol_color)))  end volumecfg.update = function ()        volumecfg.mixercommand(&quot; sget &quot; .. volumecfg.channel) end volumecfg.up = function ()        volumecfg.mixercommand(&quot; sset &quot; .. volumecfg.channel .. &quot; 1%+&quot;) end volumecfg.down = function ()        volumecfg.mixercommand(&quot; sset &quot; .. volumecfg.channel .. &quot; 1%-&quot;) end volumecfg.toggle = function ()        volumecfg.mixercommand(&quot; sset &quot; .. volumecfg.channel .. &quot; toggle&quot;) end volumecfg.update()  client.connect_signal(&quot;manage&quot;, function (c, startup)     c.size_hints_honor = false end)  batterybox = wibox.widget.textbox()  function battery ()    local io_info = io.open(&quot;\/proc\/acpi\/battery\/BAT0\/info&quot;)    local io_state  = io.open(&quot;\/proc\/acpi\/battery\/BAT0\/state&quot;)    local str_info = io_info:read(&quot;*a&quot;)    local str_state = io_state:read(&quot;*a&quot;)    io.close(io_info)    io.close(io_state)     local capacity = str_info:match(&quot;last full capacity:%s+(%d+)&quot;)    local current  = str_state:match(&quot;remaining capacity:%s+(%d+)&quot;)    local state    = str_state:match(&quot;charging state:%s+(%a+)&quot;)    local rate     = str_state:match(&quot;present rate:%s+(%d+)&quot;)     local st_color = 'green'    if state == 'discharging' then       st_color = 'red'    elseif state == 'charging' then       st_color = 'yellow'    end     local remain_time_str = 'inf'    remain_chrg = ((current * 100) \/ capacity)    if (('discharging' == state) and (nil ~= rate) and (rate &gt; '0')) then       remain_time = current\/rate       remain_time_str = string.format('%dh %.2dm', remain_time, remain_time*60%60)    end    local rem_color = 'red'    if remain_chrg &gt; 15 then       rem_color = 'yellow'    end    if remain_chrg &gt; 60 then       rem_color = 'green'    end    batterybox:set_markup( enbrace(colorify('bat: ', 'orange')                            ..colorify(string.format(&quot;%d%%&quot;, remain_chrg), rem_color)                            ..', '                            ..colorify(remain_time_str, rem_color)                            ..', '                            ..colorify(state, st_color))) end  battery() ten_sec_timer:connect_signal(&quot;timeout&quot;, battery)   membox = wibox.widget.textbox() function memory()    local io_meminfo      = io.open(&quot;\/proc\/meminfo&quot;)    local str_meminfo     = io_meminfo:read(&quot;*a&quot;)    io.close(io_meminfo)     local total           = str_meminfo:match(&quot;MemTotal:%s+(%d+)&quot;)    local free            = str_meminfo:match(&quot;MemFree:%s+(%d+)&quot;)    local buffers         = str_meminfo:match(&quot;Buffers:%s+(%d+)&quot;)    local cached          = str_meminfo:match(&quot;Cached:%s+(%d+)&quot;)    local swap_total      = str_meminfo:match(&quot;SwapTotal:%s+(%d+)&quot;)    local swap_free       = str_meminfo:match(&quot;SwapFree:%s+(%d+)&quot;)    local swap_cached     = str_meminfo:match(&quot;SwapCached:%s+(%d+)&quot;)     local total_free      = free + buffers + cached    local total_swap_free = swap_free + swap_cached     local p_mem           = 100*(total - total_free)\/total    local mem_color       = get_colorload(p_mem)    local sw_mem          = 100*(swap_total - total_swap_free)\/swap_total    local sw_mem_color    = get_colorload(sw_mem)     local p_mem           = 100*(total - total_free)\/total    local mem_color       = get_colorload(p_mem)    local sw_mem          = 100*(swap_total - total_swap_free)\/swap_total    local sw_mem_color    = get_colorload(sw_mem)     membox:set_markup(enbrace(                              colorify('mem: ', 'orange')                              ..colorify(string.format('%2d%%', p_mem), mem_color)                              ..'('..colorify(string.format('%3dMb', (total - total_free)\/1024), mem_color)                              ..colorify(string.format('\/%3dMb', (total)\/1024), 'white')                              ..')'                              ..' | '                              ..colorify('swap: ', 'orange')                              ..colorify(string.format('%2d%%', sw_mem), sw_mem_color)                              ..'('..colorify(string.format('%3dMb', (swap_total - total_swap_free)\/1024), sw_mem_color)                              ..colorify(string.format('\/%3dMb', (swap_total)\/1024), 'white')                              ..')'                             )                      ) end memory() one_sec_timer:connect_signal(&quot;timeout&quot;, memory)  -- CPU usage widget cpugraph = awful.widget.graph() cpugraph:set_width(75) cpugraph:set_height(25) cpugraph:set_background_color(&quot;#494B4F&quot;) --cpugraph:set_color(&quot;#FF5656&quot;) cpugraph:set_color({ type = &quot;horisontal&quot;, from = { 0, 0 }, to = { 0, 20 }, stops = { { 0, &quot;#FF5656&quot; }, { 0.5, &quot;#88A175&quot; }, { 1, &quot;#AECF96&quot; } }}) -- Register CPU widget vicious.register(cpugraph, vicious.widgets.cpu,                      function (widget, args)                         return args[1]                     end) cpubox = wibox.widget.textbox() cpubox_img = wibox.widget.imagebox() cpu_arr = {} cpu0_arr = {} cpu1_arr = {} for i = 0, 4 do    cpu_arr[i] = 0    cpu0_arr[i] = 0    cpu1_arr[i] = 0 end function parse_cpu(cpu, stat)    local cpu_new = {}    local ret = {}    cpu_new[0], cpu_new[1], cpu_new[2], cpu_new[3], cpu_new[4] = stat:match(&quot;cpu%d*%s+(%d+)%s+(%d+)%s+(%d+)%s+(%d+)%s+(%d+)&quot;)     local idle   = (cpu_new[3] - cpu[3]) + (cpu_new[4] - cpu[4])    local user   = (cpu_new[1] - cpu[1]) + (cpu_new[0] - cpu[0])    local system = (cpu_new[2] - cpu[2])    local total  = idle + user + system    local busy   = user + system     ret['busy'] = busy*100\/total    ret['sys'] = system*100\/total    ret['user'] = user*100\/total    ret['cpu'] = cpu_new     return ret end  function cpu()    local io_stat  = io.open(&quot;\/proc\/stat&quot;)    local str_stat = io_stat:read(&quot;*l&quot;)    io.close(io_stat)     local ret = parse_cpu(cpu_arr, str_stat)    cpu_arr = ret['cpu']       cpubox:set_markup (enbrace(colorify('cpu: ', 'orange')                        ..'('                        ..colorify(string.format('%3d%%', ret['busy']), get_colorload(ret['busy']))                        ..') | (u:'                        ..colorify(string.format('%3d%%', ret['user']), get_colorload(ret['user']))                        ..', s:'                        ..colorify(string.format('%3d%%', ret['sys']), get_colorload(ret['sys']))                        ..')')) end  cpu() one_sec_timer:connect_signal(&quot;timeout&quot;, cpu)  \t\t     hddbox = wibox.widget.textbox() hdd_r = 0 hdd_w = 0 hddlist = {'\/sys\/block\/sda\/stat', '\/sys\/block\/sdb\/stat'}  function hdd()    local new_r = 0    local new_w = 0    for i = 1, 2 do       local io_stat = io.open(hddlist[i])       local str_stat = io_stat:read(&quot;*a&quot;)       io.close(io_stat)       local rd, wr = str_stat:match(&quot;%s+%d+%s+%d+%s+(%d+)%s+%d+%s+%d+%s+%d+%s+(%d+)&quot;)       new_w = new_w + wr       new_r = new_r + rd    end    local r = (new_r - hdd_r)\/2    local w = (new_w - hdd_w)\/2    hdd_w = new_w    hdd_r = new_r     hddbox:set_markup ( enbrace(colorify('i\/o: ', 'orange')                        ..'(r: '                        ..colorify(format_throughput(r), 'green')                        ..', w:'                        ..colorify(format_throughput(w), 'green')                        ..')')) end -- RAM usage widget memwidget = awful.widget.progressbar() memwidget:set_width(30) memwidget:set_height(25) memwidget:set_vertical(true) memwidget:set_background_color('#494B4F') memwidget:set_color('#AECF96') cpugraph:set_color({ type = &quot;linear&quot;, from = { 0, 0 }, to = { 0, 20 }, stops = { { 0, &quot;#AECF96&quot; }, { 0.5, &quot;#88A175&quot; }, { 1, &quot;#FF5656&quot; } }})  vicious.cache(vicious.widgets.mem) vicious.register(memwidget, vicious.widgets.mem,                 function (widget, args)                     return args[1]                  end, 1)                  --update every 13 seconds  hdd() one_sec_timer:connect_signal(&quot;timeout&quot;, hdd)   -- Start timers to update widgets one_sec_timer:start() ten_sec_timer:start() -- \u0427\u0430\u0441\u044b \u0438 \u0434\u0430\u0442\u0430 text_clock = awful.widget.textclock() -- Create a systray systray = wibox.widget.systray() <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0421\u0442\u0430\u0442\u044c\u044f \u0432\u044b\u0448\u043b\u0430 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u0430\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u043d\u0430 \u0434\u0432\u0435 \u0447\u0430\u0441\u0442\u0438. \t\t\t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/214411\/\"> http:\/\/habrahabr.ru\/post\/214411\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\"> \t\t\t\u0420\u0430\u0437\u0433\u043e\u0432\u043e\u0440 \u043f\u043e\u0439\u0434\u0451\u0442 \u043e \u043c\u043e\u0451\u043c \u043f\u0435\u0440\u0432\u043e\u043c \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u0435 \u0441 \u0442\u0430\u043a\u0438\u043c \u043e\u043a\u043e\u043d\u043d\u044b\u043c \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u043e\u043c, \u043a\u0430\u043a Awesome. \u0414\u043e\u043b\u0433\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b Gnome2, \u043f\u043e\u0442\u043e\u043c \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b Gnome3, \u0440\u0435\u0448\u0438\u043b \u0438\u0441\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c kde, \u043d\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0443\u0434\u043e\u0432\u043b\u0435\u0442\u0432\u043e\u0440\u0438\u043b\u043e \u043c\u0435\u043d\u044f. \u0414\u0430, \u043a \u0441\u043b\u043e\u0432\u0443, \u0443 \u043c\u0435\u043d\u044f Gentoo. \u0414\u0430, \u0441\u0442\u0430\u0442\u044c\u044f \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043d\u0430 \u0442\u0430\u043a\u0438\u0445 \u0436\u0435 \u043a\u0430\u043a \u0438 \u044f \u043d\u043e\u0432\u0438\u0447\u043a\u043e\u0432 \u2014 \u0434\u0430\u0431\u044b \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0436\u0438\u0437\u043d\u044c.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-214411","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/214411","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=214411"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/214411\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=214411"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=214411"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=214411"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}