{"id":276314,"date":"2016-03-17T09:38:01","date_gmt":"2016-03-17T06:38:01","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=276314"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=276314","title":{"rendered":"\u041c\u043e\u0439 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434 \u0438\u043b\u0438 \u043e \u0442\u043e\u043c \u043a\u0430\u043a \u044f \u0441\u044d\u043a\u043e\u043d\u043e\u043c\u0438\u043b \u0441\u0432\u043e\u0438 \u043d\u0435\u0440\u0432\u043d\u044b\u0435 \u043a\u043b\u0435\u0442\u043a\u0438"},"content":{"rendered":"<p>       \u041f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e \u0445\u0430\u0431\u0440\u043e\u0432\u0447\u0430\u043d\u0435!<\/p>\n<p>  \u0412\u043e\u0442 \u0443\u0436\u0435 \u043f\u043e\u043b \u0433\u043e\u0434\u0430 \u043a\u0430\u043a \u043c\u043e\u0439 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 Desktop \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 Ubuntu, \u043e \u043f\u043b\u044e\u0441\u0430\u0445 \u0438 \u043c\u0438\u043d\u0443\u0441\u0430\u0445 Linux \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0443, \u043f\u043e\u0441\u0442 \u043d\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c.<br \/>  \u0422\u0430\u043a \u0432\u043e\u0442\u2026 \u044f \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e \u043d\u0435 \u0432\u043b\u0430\u0434\u0435\u044e \u0441\u043b\u0435\u043f\u044b\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043d\u0430\u0431\u043e\u0440\u0430 \u0442\u0435\u043a\u0441\u0442\u0430, \u0434\u0430 \u0438 \u043d\u0435 \u0431\u044b\u043b\u043e \u0441\u043c\u044b\u0441\u043b\u0430 \u043e\u0431\u0443\u0447\u0430\u0442\u044c\u0441\u044f \u0442\u0430\u043a \u043a\u0430\u043a \u0432 \u043e\u043a\u043d\u0430\u0445 \u043c\u0435\u043d\u044f \u0432\u043f\u043e\u043b\u043d\u0435 \u0441\u043d\u043e\u0441\u043d\u043e \u0441\u043f\u0430\u0441\u0430\u043b\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 PuntoSwitcher \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u043e\u043a\u043e\u043b\u043e 5-\u0442\u0438 \u043b\u0435\u0442, \u043e\u0434\u043d\u0430\u043a\u043e \u0435\u0451 \u0430\u043d\u0430\u043b\u043e\u0433 Xneur \u043d\u0430 Ubuntu \u043c\u044f\u0433\u043a\u043e \u0433\u043e\u0432\u043e\u0440\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u00ab\u043d\u0435 \u043e\u0447\u0435\u043d\u044c\u00bb \u0438 \u0432\u043e\u0432\u0441\u0435 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0432 Skype.<\/p>\n<p>  \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u044f \u043c\u0438\u0440\u0438\u043b\u0441\u044f \u0441 \u044d\u0442\u0438\u043c, \u043f\u043e\u0442\u043e\u043c \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u0431\u0435\u0437\u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043a\u0443 \u043d\u0430 Java.<\/p>\n<p>  \u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435:<\/p>\n<ol>\n<li>\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a<\/li>\n<li>\u0418\u043a\u043e\u043d\u043a\u0430 \u0432 \u0442\u0440\u0435\u0435 \u0434\u043b\u044f \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u043e\u0442\u043c\u0435\u043d\u044b \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438<\/li>\n<li>\u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044f \u043f\u043e \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u043a\u043b\u0430\u0432\u0438\u0448<\/li>\n<\/ol>\n<p>   \u2014 \u044d\u0442\u043e \u0442\u043e\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u044f \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u0432 PuntoSwitcher.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/aa8\/e47\/0cd\/aa8e470cd5b8dd8aae1f82ce1fe239b3.jpg\" alt=\"image\"\/><\/p>\n<p>  <a name=\"habracut\"><\/a><br \/>  \u0418 \u0432\u043e\u0442 \u0431\u0443\u043a\u0432\u0430\u043b\u044c\u043d\u043e \u044d\u0442\u043e\u0439 \u043d\u043e\u0447\u044c\u044e \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u0439\u0442\u0438 \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u0443\u0442\u0451\u043c \u0438 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c sh.<\/p>\n<p>  \u041d\u0435 \u043f\u0440\u0435\u0442\u0435\u043d\u0434\u0443\u044e \u043d\u0430 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u0430, \u043d\u043e \u043d\u0430 Kubuntu 15.10 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u043d\u0430\u0434\u043e.<\/p>\n<p>  \u041f\u0440\u0438\u043d\u0446\u0438\u043f \u0440\u0430\u0431\u043e\u0442\u044b:<\/p>\n<ol>\n<li>\u041d\u0430 \u044f\u0440\u043b\u044b\u043a sh \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0432\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u044f \u043a\u043b\u0430\u0432\u0438\u0448<\/li>\n<li>\u041f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e xclip \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442<\/li>\n<li>\u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0435\u0433\u043e \u0432 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u0443\u044e \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u043a\u0443<\/li>\n<li>\u0423\u0442\u0438\u043b\u0438\u0442\u043e\u0439 xdotool \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 \u0437\u0430\u043c\u0435\u0441\u0442\u043e \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e<\/li>\n<li>\u041c\u0435\u043d\u044f\u0435\u043c \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u043a\u0443 \u043d\u0430 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u043f\u043e\u043b\u043e\u0436\u043d\u0443\u044e \u0447\u0442\u043e \u0431\u044b \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0442\u044c \u043d\u0430\u0431\u0438\u0440\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442.<\/li>\n<\/ol>\n<p>  \u041e\u0442 \u0441\u043b\u043e\u0432 \u043a \u0434\u0435\u043b\u0443:  <\/p>\n<pre><code class=\"bash\"> #!\/bin\/bash   oldtemp=`xclip -o` #\u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0442\u0435\u043a\u0441\u0442 temp=`'\/home\/username\/desktop\/switch' &quot;$oldtemp&quot;` #\u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0442\u0435\u043a\u0441\u0442 xdotool keydown Shift+Control_L #\u0441\u043c\u0435\u043d\u0438\u043b\u0438 \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u043a\u0443 sleep 1  xdotool keyup Shift+Control_L xdotool type &quot;$temp&quot; #\u043f\u0435\u0447\u0430\u0442\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 notify-send &quot;$oldtemp -&gt; $temp&quot; -t 2000 #\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e \u0442\u043e\u043c \u0447\u0442\u043e \u0441\u043c\u0435\u043d\u0438\u043b\u0438 \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u043a\u0443 (\u043e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e) exit 0 <\/code><\/pre>\n<p>  xdotool keydown \/ xdotool keyup \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0432\u043c\u0435\u0441\u0442\u043e xdotool key \u043f\u043e\u0442\u043e\u043c\u0443 \u043a\u0430\u043a \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0443 \u043c\u0435\u043d\u044f \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b\u043e \u0447\u0435\u0440\u0435\u0437 \u0440\u0430\u0437.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044e \u0442\u0435\u043a\u0441\u0442\u0430.<br \/>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u044f \u0440\u0435\u0448\u0438\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u0443\u044e \u043d\u0430 \u0441++ \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u044b \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u043b\u0430 \u0442\u0435\u043a\u0441\u0442, \u043f\u043e\u043d\u0438\u043c\u0430\u043b\u0430 \u0432 \u043a\u0430\u043a\u0443\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u0435\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043e\u0442\u0434\u0430\u0432\u0430\u043b\u0430 \u0431\u044b \u0443\u0436\u0435 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c. <\/p>\n<p>  \u0414\u043e \u044d\u0442\u043e\u0433\u043e \u043d\u0430 \u0421++ \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c, \u0431\u043b\u0430\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u0443 \u044d\u0442\u043e\u0439 \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u00abHello world\u00bb.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0411\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c \u0434\u0435\u0442\u044f\u043c \u0441\u043e \u0441\u043b\u0430\u0431\u043e\u0439 \u043f\u0441\u0438\u0445\u0438\u043a\u043e\u0439 \u043d\u0435 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"cpp\">#include &lt;iostream&gt;  using namespace std;  std::string Toreplace(std::string text, std::string s, std::string d){     for(int index=0; index=text.find(s, index), index!=std::string::npos;)    {         text.replace(index, s.length(), d);         index+=d.length();     }     return text; }  int GetCurentLang(std::string str){     int thislang = 0;     const char *cstr = str.c_str();     std::string russtr[66] = {&quot;\u0439&quot;,&quot;\u0446&quot;,&quot;\u0443&quot;,&quot;\u043a&quot;,&quot;\u0435&quot;,&quot;\u043d&quot;,&quot;\u0433&quot;,&quot;\u0448&quot;,&quot;\u0449&quot;,&quot;\u0437&quot;,&quot;\u0445&quot;,&quot;\u044a&quot;,&quot;\u0444&quot;,&quot;\u044b&quot;,&quot;\u0432&quot;,&quot;\u0430&quot;,&quot;\u043f&quot;,&quot;\u0440&quot;,&quot;\u043e&quot;,&quot;\u043b&quot;,&quot;\u0434&quot;,&quot;\u0436&quot;,&quot;\u044d&quot;,&quot;\u044f&quot;,&quot;\u0447&quot;,&quot;\u0441&quot;,&quot;\u043c&quot;,&quot;\u0438&quot;,&quot;\u0442&quot;,&quot;\u044c&quot;,&quot;\u0431&quot;,&quot;\u044e&quot;,&quot;\u0451&quot;,&quot;\u0419&quot;,&quot;\u0426&quot;,&quot;\u0423&quot;,&quot;\u041a&quot;,&quot;\u0415&quot;,&quot;\u041d&quot;,&quot;\u0413&quot;,&quot;\u0428&quot;,&quot;\u0429&quot;,&quot;\u0417&quot;,&quot;\u0425&quot;,&quot;\u042a&quot;,&quot;\u0424&quot;,&quot;\u042b&quot;,&quot;\u0412&quot;,&quot;\u0410&quot;,&quot;\u041f&quot;,&quot;\u0420&quot;,&quot;\u041e&quot;,&quot;\u041b&quot;,&quot;\u0414&quot;,&quot;\u0416&quot;,&quot;\u042d&quot;,&quot;\u042f&quot;,&quot;\u0427&quot;,&quot;\u0421&quot;,&quot;\u041c&quot;,&quot;\u0418&quot;,&quot;\u0422&quot;,&quot;\u042c&quot;,&quot;\u0411&quot;,&quot;\u042e&quot;,&quot;\u0401&quot;};     std::string engstr[56] =  {&quot;q&quot;,&quot;w&quot;,&quot;e&quot;,&quot;r&quot;,&quot;t&quot;,&quot;y&quot;,&quot;u&quot;,&quot;i&quot;,&quot;o&quot;,&quot;p&quot;,&quot;[&quot;,&quot;]&quot;,&quot;a&quot;,&quot;s&quot;,&quot;d&quot;,&quot;f&quot;,&quot;g&quot;,&quot;h&quot;,&quot;j&quot;,&quot;k&quot;,&quot;l&quot;,&quot;z&quot;,&quot;x&quot;,&quot;c&quot;,&quot;v&quot;,&quot;b&quot;,&quot;n&quot;,&quot;m&quot;,&quot;&lt;&quot;,&quot;&gt;&quot;,&quot;Q&quot;,&quot;W&quot;,&quot;E&quot;,&quot;R&quot;,&quot;T&quot;,&quot;Y&quot;,&quot;U&quot;,&quot;I&quot;,&quot;O&quot;,&quot;P&quot;,&quot;A&quot;,&quot;S&quot;,&quot;D&quot;,&quot;F&quot;,&quot;G&quot;,&quot;H&quot;,&quot;J&quot;,&quot;K&quot;,&quot;L&quot;,&quot;Z&quot;,&quot;X&quot;,&quot;C&quot;,&quot;V&quot;,&quot;B&quot;,&quot;N&quot;,&quot;M&quot;};     for (int i = 0; i &lt; str.length() && thislang == 0; i++){         for (int a = 0; a &lt; 66; a++){             if (russtr[a].compare(new char (cstr[i])) == true) {                 thislang = 1;             }         }         for (int a = 0; a &lt; 56; a++){             if (engstr[a].compare(new char (cstr[i])) == true) {                 thislang = 2;             }         }     }     return thislang; }  std::string TranslateToRu(std::string str){     std::string translate = str;     std::string replacein[67] = {&quot;q&quot;,&quot;w&quot;,&quot;e&quot;,&quot;r&quot;,&quot;t&quot;,&quot;y&quot;,&quot;u&quot;,&quot;i&quot;,&quot;o&quot;,&quot;p&quot;,&quot;[&quot;,&quot;]&quot;,&quot;a&quot;,&quot;s&quot;,&quot;d&quot;,&quot;f&quot;,&quot;g&quot;,&quot;h&quot;,&quot;j&quot;,&quot;k&quot;,&quot;l&quot;,&quot;;&quot;,&quot;'&quot;,&quot;z&quot;,&quot;x&quot;,&quot;c&quot;,&quot;v&quot;,&quot;b&quot;,&quot;n&quot;,&quot;m&quot;,&quot;,&quot;,&quot;.&quot;,&quot;\/&quot;,&quot;Q&quot;,&quot;W&quot;,&quot;E&quot;,&quot;R&quot;,&quot;T&quot;,&quot;Y&quot;,&quot;U&quot;,&quot;I&quot;,&quot;O&quot;,&quot;P&quot;,&quot;[&quot;,&quot;]&quot;,&quot;A&quot;,&quot;S&quot;,&quot;D&quot;,&quot;F&quot;,&quot;G&quot;,&quot;H&quot;,&quot;J&quot;,&quot;K&quot;,&quot;L&quot;,&quot;;&quot;,&quot;'&quot;,&quot;Z&quot;,&quot;X&quot;,&quot;C&quot;,&quot;V&quot;,&quot;B&quot;,&quot;N&quot;,&quot;M&quot;,&quot;,&quot;,&quot;.&quot;,&quot;\/&quot;,&quot;&&quot;};     std::string replaceto[67] = {&quot;\u0439&quot;,&quot;\u0446&quot;,&quot;\u0443&quot;,&quot;\u043a&quot;,&quot;\u0435&quot;,&quot;\u043d&quot;,&quot;\u0433&quot;,&quot;\u0448&quot;,&quot;\u0449&quot;,&quot;\u0437&quot;,&quot;\u0445&quot;,&quot;\u044a&quot;,&quot;\u0444&quot;,&quot;\u044b&quot;,&quot;\u0432&quot;,&quot;\u0430&quot;,&quot;\u043f&quot;,&quot;\u0440&quot;,&quot;\u043e&quot;,&quot;\u043b&quot;,&quot;\u0434&quot;,&quot;\u0436&quot;,&quot;\u044d&quot;,&quot;\u044f&quot;,&quot;\u0447&quot;,&quot;\u0441&quot;,&quot;\u043c&quot;,&quot;\u0438&quot;,&quot;\u0442&quot;,&quot;\u044c&quot;,&quot;\u0431&quot;,&quot;\u044e&quot;,&quot;.&quot;,&quot;\u0419&quot;,&quot;\u0426&quot;,&quot;\u0423&quot;,&quot;\u041a&quot;,&quot;\u0415&quot;,&quot;\u041d&quot;,&quot;\u0413&quot;,&quot;\u0428&quot;,&quot;\u0429&quot;,&quot;\u0417&quot;,&quot;\u0425&quot;,&quot;\u042a&quot;,&quot;\u0424&quot;,&quot;\u042b&quot;,&quot;\u0412&quot;,&quot;\u0410&quot;,&quot;\u041f&quot;,&quot;\u0420&quot;,&quot;\u041e&quot;,&quot;\u041b&quot;,&quot;\u0414&quot;,&quot;\u0416&quot;,&quot;\u042d&quot;,&quot;\u042f&quot;,&quot;\u0427&quot;,&quot;\u0421&quot;,&quot;\u041c&quot;,&quot;\u0418&quot;,&quot;\u0422&quot;,&quot;\u042c&quot;,&quot;\u0411&quot;,&quot;\u042e&quot;,&quot;.&quot;,&quot;?&quot;};     for (int i = 0; i &lt; 67; i++){         translate = Toreplace(translate, replacein[i], replaceto[i]);     }     return translate; }  std::string TranslateToEng(std::string str){     std::string translate = str;     std::string replacein[67] = {&quot;\u0439&quot;,&quot;\u0446&quot;,&quot;\u0443&quot;,&quot;\u043a&quot;,&quot;\u0435&quot;,&quot;\u043d&quot;,&quot;\u0433&quot;,&quot;\u0448&quot;,&quot;\u0449&quot;,&quot;\u0437&quot;,&quot;\u0445&quot;,&quot;\u044a&quot;,&quot;\u0444&quot;,&quot;\u044b&quot;,&quot;\u0432&quot;,&quot;\u0430&quot;,&quot;\u043f&quot;,&quot;\u0440&quot;,&quot;\u043e&quot;,&quot;\u043b&quot;,&quot;\u0434&quot;,&quot;\u0436&quot;,&quot;\u044d&quot;,&quot;\u044f&quot;,&quot;\u0447&quot;,&quot;\u0441&quot;,&quot;\u043c&quot;,&quot;\u0438&quot;,&quot;\u0442&quot;,&quot;\u044c&quot;,&quot;\u0431&quot;,&quot;\u044e&quot;,&quot;.&quot;,&quot;\u0419&quot;,&quot;\u0426&quot;,&quot;\u0423&quot;,&quot;\u041a&quot;,&quot;\u0415&quot;,&quot;\u041d&quot;,&quot;\u0413&quot;,&quot;\u0428&quot;,&quot;\u0429&quot;,&quot;\u0417&quot;,&quot;\u0425&quot;,&quot;\u042a&quot;,&quot;\u0424&quot;,&quot;\u042b&quot;,&quot;\u0412&quot;,&quot;\u0410&quot;,&quot;\u041f&quot;,&quot;\u0420&quot;,&quot;\u041e&quot;,&quot;\u041b&quot;,&quot;\u0414&quot;,&quot;\u0416&quot;,&quot;\u042d&quot;,&quot;\u042f&quot;,&quot;\u0427&quot;,&quot;\u0421&quot;,&quot;\u041c&quot;,&quot;\u0418&quot;,&quot;\u0422&quot;,&quot;\u042c&quot;,&quot;\u0411&quot;,&quot;\u042e&quot;,&quot;.&quot;,&quot;?&quot;};     std::string replaceto[67] = {&quot;q&quot;,&quot;w&quot;,&quot;e&quot;,&quot;r&quot;,&quot;t&quot;,&quot;y&quot;,&quot;u&quot;,&quot;i&quot;,&quot;o&quot;,&quot;p&quot;,&quot;[&quot;,&quot;]&quot;,&quot;a&quot;,&quot;s&quot;,&quot;d&quot;,&quot;f&quot;,&quot;g&quot;,&quot;h&quot;,&quot;j&quot;,&quot;k&quot;,&quot;l&quot;,&quot;;&quot;,&quot;'&quot;,&quot;z&quot;,&quot;x&quot;,&quot;c&quot;,&quot;v&quot;,&quot;b&quot;,&quot;n&quot;,&quot;m&quot;,&quot;,&quot;,&quot;.&quot;,&quot;\/&quot;,&quot;Q&quot;,&quot;W&quot;,&quot;E&quot;,&quot;R&quot;,&quot;T&quot;,&quot;Y&quot;,&quot;U&quot;,&quot;I&quot;,&quot;O&quot;,&quot;P&quot;,&quot;[&quot;,&quot;]&quot;,&quot;A&quot;,&quot;S&quot;,&quot;D&quot;,&quot;F&quot;,&quot;G&quot;,&quot;H&quot;,&quot;J&quot;,&quot;K&quot;,&quot;L&quot;,&quot;;&quot;,&quot;'&quot;,&quot;Z&quot;,&quot;X&quot;,&quot;C&quot;,&quot;V&quot;,&quot;B&quot;,&quot;N&quot;,&quot;M&quot;,&quot;&lt;&quot;,&quot;&gt;&quot;,&quot;\/&quot;,&quot;&&quot;};     for (int i = 0; i &lt; 67; i++){         translate = Toreplace(translate, replacein[i], replaceto[i]);     }     return translate; }     int main(int argc, char *argv[]) {     std::string translate;     int currentlang = GetCurentLang(argv[1]);     if (currentlang == 2){         translate = TranslateToRu(argv[1]);     }else if (currentlang == 1){         translate = TranslateToEng(argv[1]);     }else{         translate = &quot;&quot;;     }       cout &lt;&lt; translate &lt;&lt; endl;     return 0; } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <b>GetCurentLang<\/b> \u041f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u0435\u0441\u044c \u0442\u0435\u043a\u0441\u0442 \u0446\u0435\u043b\u0438\u043a\u043e\u043c \u0438 \u0438\u0449\u0435\u0442 \u043f\u0435\u0440\u0432\u044b\u0439 \u0441\u0438\u043c\u0432\u043e\u043b \u0432 \u0440\u0443\u0441\u0441\u043a\u043e\u0439 \u0438\u043b\u0438 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u0439 \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u043a\u0435, \u0435\u0441\u043b\u0438 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0432\u0448\u0438\u0439\u0441\u044f \u043d\u0430\u043c \u0441\u0438\u043c\u0432\u043e\u043b \u0432 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u0439 \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u043a\u0435 \u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442 \u043d\u0443\u0436\u043d\u043e \u0432\u0441\u0451 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442\u044c \u0432 \u0440\u0443\u0441\u0441\u043a\u0443\u044e (\u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0440\u0430\u0437\u0443\u043c\u0435\u0435\u0442\u0441\u044f \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u0443\u0435\u043c)<\/p>\n<p>  <b>TranslateToEng<\/b>, <b>TranslateToRu<\/b> \u043c\u0430\u0441\u0441\u0438\u0432 \u0441 \u0431\u0443\u043a\u0432\u0430\u043c\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u0432\u043e\u0439 \u0447\u0442\u043e \u0431\u044b \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0437\u0430\u043c\u0435\u043d\u0443 \u0431\u043e\u043b\u0435\u0435 \u0433\u0438\u0431\u043a\u043e.<\/p>\n<p>  \u043f\u043e\u0447\u0435\u043c\u0443 std::string \u0430 \u043d\u0435 char[] \u2014 \u043a\u0430\u043a \u044f \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b \u0441 \u0421++ \u043d\u0435 \u0437\u043d\u0430\u043a\u043e\u043c, \u0430 \u0432 char[] \u043a\u0438\u0440\u0438\u043b\u043b\u0438\u0446\u0430 \u043d\u0435 \u0443\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f\u2026 (\u0438\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 \u044d\u0442\u043e\u0433\u043e)<\/p>\n<p>  \u041f\u043e\u043a\u0430 \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044f \u0438\u0434\u0451\u0442 \u0432 \u043e\u0434\u043d\u0443 \u0441\u0442\u043e\u0440\u043e\u043d\u0443, \u0442.\u0435 \u0435\u0441\u043b\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c:<br \/>  <code>\u0411\u0432\u0448\u043c \u0448\u0432=\u042d\u044c\u0444\u0448\u0442\u042d\u042edjn\u0411.\u0432\u0448\u043c\u042e <br \/>  <\/code><\/p>\n<p>  \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043c:<\/p>\n<pre><code class=\"html\">&lt;div id='main'&gt;djn&lt;\/div&gt; <\/code><\/pre>\n<p>  \u0446\u0435\u043b\u0435\u0441\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u00abdjn\u00bb \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u0436\u0435, \u043d\u043e \u0442\u043e\u0433\u0434\u0430 \u0432\u0441\u0442\u0430\u043d\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u0441 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 &quot;,. \/&quot; \u0438 \u0442.\u0434<br \/>  \u043f\u043e\u043c\u0438\u043c\u043e \u044d\u0442\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0447\u0435\u0440\u0435\u0437 Ctrl+A \u0432 xclip \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442, \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435 \u0432\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c:<\/p>\n<pre><code class=\"bash\">xdotool keyup Control_L+\u0421 <\/code><\/pre>\n<div class=\"clear\"><\/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=\"https:\/\/habrahabr.ru\/post\/279499\/\"> https:\/\/habrahabr.ru\/post\/279499\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u041f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e \u0445\u0430\u0431\u0440\u043e\u0432\u0447\u0430\u043d\u0435!<\/p>\n<p>  \u0412\u043e\u0442 \u0443\u0436\u0435 \u043f\u043e\u043b \u0433\u043e\u0434\u0430 \u043a\u0430\u043a \u043c\u043e\u0439 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 Desktop \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430 Ubuntu, \u043e \u043f\u043b\u044e\u0441\u0430\u0445 \u0438 \u043c\u0438\u043d\u0443\u0441\u0430\u0445 Linux \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0443, \u043f\u043e\u0441\u0442 \u043d\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c.<br \/>  \u0422\u0430\u043a \u0432\u043e\u0442\u2026 \u044f \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e \u043d\u0435 \u0432\u043b\u0430\u0434\u0435\u044e \u0441\u043b\u0435\u043f\u044b\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043d\u0430\u0431\u043e\u0440\u0430 \u0442\u0435\u043a\u0441\u0442\u0430, \u0434\u0430 \u0438 \u043d\u0435 \u0431\u044b\u043b\u043e \u0441\u043c\u044b\u0441\u043b\u0430 \u043e\u0431\u0443\u0447\u0430\u0442\u044c\u0441\u044f \u0442\u0430\u043a \u043a\u0430\u043a \u0432 \u043e\u043a\u043d\u0430\u0445 \u043c\u0435\u043d\u044f \u0432\u043f\u043e\u043b\u043d\u0435 \u0441\u043d\u043e\u0441\u043d\u043e \u0441\u043f\u0430\u0441\u0430\u043b\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 PuntoSwitcher \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u043e\u043a\u043e\u043b\u043e 5-\u0442\u0438 \u043b\u0435\u0442, \u043e\u0434\u043d\u0430\u043a\u043e \u0435\u0451 \u0430\u043d\u0430\u043b\u043e\u0433 Xneur \u043d\u0430 Ubuntu \u043c\u044f\u0433\u043a\u043e \u0433\u043e\u0432\u043e\u0440\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u00ab\u043d\u0435 \u043e\u0447\u0435\u043d\u044c\u00bb \u0438 \u0432\u043e\u0432\u0441\u0435 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0432 Skype.<\/p>\n<p>  \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u044f \u043c\u0438\u0440\u0438\u043b\u0441\u044f \u0441 \u044d\u0442\u0438\u043c, \u043f\u043e\u0442\u043e\u043c \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u0431\u0435\u0437\u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043a\u0443 \u043d\u0430 Java.<\/p>\n<p>  \u0422\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435:<\/p>\n<ol>\n<li>\u0411\u044b\u0441\u0442\u0440\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a<\/li>\n<li>\u0418\u043a\u043e\u043d\u043a\u0430 \u0432 \u0442\u0440\u0435\u0435 \u0434\u043b\u044f \u0432\u044b\u0445\u043e\u0434\u0430 \u0438\u0437 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u043e\u0442\u043c\u0435\u043d\u044b \u043a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u0438<\/li>\n<li>\u041a\u043e\u043d\u0432\u0435\u0440\u0442\u0430\u0446\u0438\u044f \u043f\u043e \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u043a\u043b\u0430\u0432\u0438\u0448<\/li>\n<\/ol>\n<p>   \u2014 \u044d\u0442\u043e \u0442\u043e\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u044f \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u0432 PuntoSwitcher.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/aa8\/e47\/0cd\/aa8e470cd5b8dd8aae1f82ce1fe239b3.jpg\" alt=\"image\"\/><\/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-276314","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/276314","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=276314"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/276314\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=276314"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=276314"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=276314"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}