Skip to content

Instantly share code, notes, and snippets.

@khaytsus
khaytsus / keepassx-2.0.3-minimize_on_close.patch
Created November 12, 2017 17:16
Simple patch for keepassx to minimize to tray on window close rather than exit. For some reason the developer insists that this is a bad pattern, but at least the change is very simple. I'm not claiming this is the best way, some of the conditionals I'm removing should likely stay but this works fine.
--- keepassx-2.0.3/src/gui/MainWindow.cpp 2017-11-11 09:36:25.000000000 -0500
+++ keepassx-2.0.3-fixed/src/gui/MainWindow.cpp 2017-11-11 09:51:22.898728108 -0500
@@ -441,19 +441,20 @@
if (accept) {
- if ((event->type() == QEvent::WindowStateChange) && isMinimized()
- && isTrayIconEnabled() && m_trayIcon && m_trayIcon->isVisible()
+ if (isTrayIconEnabled() && m_trayIcon && m_trayIcon->isVisible()
&& config()->get("GUI/MinimizeToTray").toBool())
@khaytsus
khaytsus / gist:716f2ee176ed8bdac49adda6696ed00c
Last active August 30, 2018 17:00
Ignore suggestions for freenode spammers in irssi format
//ignore -regexp -pattern "^.*fascinating.blog.by.freenode.staff.*$" * ALL
//ignore -regexp -pattern "^.*Read what IRC investigative journalists.*$" * ALL
//ignore -regexp -pattern "^.*interested in this blog by freenode.*$" * ALL
//ignore -regexp -pattern "^.*With our IRC ad service you can reach a global audience.*$" * ALL
//ignore -regexp -pattern "^.*This channel has been hacked by Australia.*$" * ALL
//ignore -regexp -pattern "^.*MattSTrout.com.*$" * ALL
//ignore -regexp -pattern "^.*williampitcock.com.*$" * ALL
//ignore -regexp -pattern "^.*bryanostergaard.com.*$" * ALL
//ignore -regexp -pattern "^.*This channel has moved to.*$" * ALL
//ignore -regexp -pattern "^.*After the acquisition by Private Internet Access.*$" * ALL