<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>i3 FAQ - Individual question feed</title><link>https://faq.i3wm.org/questions/</link><description>Frequently asked questions and answers about the i3 window manager</description><atom:link href="http://faq.i3wm.org/feeds/question/5342/" rel="self"></atom:link><language>en</language><copyright>Copyright i3, 2012</copyright><lastBuildDate>Mon, 19 Jan 2015 21:33:55 +0000</lastBuildDate><item><title>can if-then conditional statements be used in .i3/config</title><link>https://faq.i3wm.org/question/5342/can-if-then-conditional-statements-be-used-in-i3config/</link><description>i'd like to use the same i3 config across multiple machines, so i'd like to be able to run exec conditionally to only start up (e.g. redshift) on some machines (where the hostname matches a string).  

are if-then blocks allowed in i3's configuration?</description><pubDate>Fri, 16 Jan 2015 17:49:48 +0000</pubDate><guid>https://faq.i3wm.org/question/5342/can-if-then-conditional-statements-be-used-in-i3config/</guid></item><item><title>Answer by Michael for &lt;p&gt;i'd like to use the same i3 config across multiple machines, so i'd like to be able to run exec conditionally to only start up (e.g. redshift) on some machines (where the hostname matches a string).  &lt;/p&gt;

&lt;p&gt;are if-then blocks allowed in i3's configuration?&lt;/p&gt;
 </title><link>https://faq.i3wm.org/question/5342/can-if-then-conditional-statements-be-used-in-i3config/?answer=5343#post-id-5343</link><description>No. See also https://faq.i3wm.org/question/1367/anyway-to-include-in-config-file/, which provides an answer that should be useful for you :).</description><pubDate>Fri, 16 Jan 2015 17:54:24 +0000</pubDate><guid>https://faq.i3wm.org/question/5342/can-if-then-conditional-statements-be-used-in-i3config/?answer=5343#post-id-5343</guid></item><item><title>Comment by diffalot for &lt;p&gt;No. See also &lt;a href="https://faq.i3wm.org/question/1367/anyway-to-include-in-config-file/"&gt;https://faq.i3wm.org/question/1367/an...&lt;/a&gt;, which provides an answer that should be useful for you :).&lt;/p&gt;
</title><link>https://faq.i3wm.org/question/5342/can-if-then-conditional-statements-be-used-in-i3config/?comment=5352#comment-5352</link><description>Thanks, Michael.  that's a great solution, the other one i'm considering is executing a shell script that does the conditional checking, it may not be as elegant, but it'll work :)</description><pubDate>Mon, 19 Jan 2015 21:33:55 +0000</pubDate><guid>https://faq.i3wm.org/question/5342/can-if-then-conditional-statements-be-used-in-i3config/?comment=5352#comment-5352</guid></item></channel></rss>