<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Keepassx on technocracy</title><link>https://www.ericsimmerman.com/tags/keepassx/</link><description>Recent content in Keepassx on technocracy</description><generator>Hugo</generator><language>en</language><lastBuildDate>Mon, 06 Apr 2009 00:00:00 +0000</lastBuildDate><atom:link href="https://www.ericsimmerman.com/tags/keepassx/index.xml" rel="self" type="application/rss+xml"/><item><title>Fix for KeePassX window positioning off screen after changing monitors</title><link>https://www.ericsimmerman.com/blog/2009/04/06/fix-for-keepassx-window-positioning-off-screen-after-changing-monitors/</link><pubDate>Mon, 06 Apr 2009 00:00:00 +0000</pubDate><guid>https://www.ericsimmerman.com/blog/2009/04/06/fix-for-keepassx-window-positioning-off-screen-after-changing-monitors/</guid><description>&lt;div class='post'&gt;
After removing a secondary monitor from a MacBook, some apps do not properly re-position themselves on your laptop display. KeePassX is one such offender and I was previously manually editing ~/.keepass/config and restarting KeePassX in order to resolve the issue.I came across &lt;a href="http://blog.bittube.com/2008/05/08/moving-application-windows-in-os-x-via-apple-script/comment-page-1/#comment-100554"&gt;a much nicer solution on bittube&lt;/a&gt;. The solution is great, but the source found there is a bit tricky to copy &amp;amp; paste so I've re-posted here for posterity. Enjoy!&lt;div class="CodeRay"&gt; &lt;div class="code"&gt;&lt;pre&gt;property processesToIgnore : {}tell application &amp;quot;Finder&amp;quot;set _b to bounds of window of desktopset screen_width to item 3 of _bset screen_height to item 4 of _bend telltell application &amp;quot;System Events&amp;quot;set allProcesses to application processesset _results to &amp;quot;&amp;quot;repeat with i from 1 to count allProcessesset doIt to 1repeat with z from 1 to count processesToIgnoreif process i = process (item z of processesToIgnore) thenset doIt to 0end ifend repeatif doIt = 1 thentell process irepeat with x from 1 to (count windows)set winPos to position of window xset _x to item 1 of winPosset _y to item 2 of winPosif (_x &amp;lt; 0 or _y screen_width or _y &amp;gt; screen_height) thenset position of window x to {0, 22}end ifend repeatend tellend ifend repeatend tell&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description></item></channel></rss>