Skip to content

Instantly share code, notes, and snippets.

View dblsaiko's full-sized avatar

Katalin Rebhan dblsaiko

View GitHub Profile
package cuchaz.enigma.gui.elements.rpanel;
import java.awt.*;
import java.awt.event.*;
import javax.swing.JComponent;
import javax.swing.JLayer;
import javax.swing.SwingUtilities;
import javax.swing.plaf.LayerUI;
@dblsaiko
dblsaiko / mimetypedetection.patch
Created August 25, 2021 21:05
Fix KDE not opening links in mime type associated application
--- a/src/widgets/krun.cpp 2020-12-19 00:28:01.038900544 +0100
+++ b/src/widgets/krun.cpp 2020-12-19 00:28:13.410897823 +0100
@@ -387,7 +387,7 @@
m_followRedirections = true;
m_window = window;
m_asn = asn;
- q->setEnableExternalBrowser(true);
+ q->setEnableExternalBrowser(false);
// Start the timer. This means we will return to the event
@dblsaiko
dblsaiko / idleinhibit-visualizer.sh
Created September 4, 2021 15:42
swaywm: displays an [I] indicator in idle-inhibiting windows
#!/bin/bash
current=""
while true; do
new="$(swaymsg -t get_tree | jq -c 'recurse(.nodes[]) | del(.nodes) | select(.type == "con") | select(.inhibit_idle) | .id')"
for id in $new; do
re="\\b$id\\b"
if ! [[ "$current" =~ $re ]]; then
# /usr/local/sbin/mkbootentry
#!/bin/bash
ROOTFS=PARTUUID=90ab8cc5-82e3-c047-a162-2c8dde238121
#CMDLINE="net.ifnames=0 fbcon=font:SUN12x22 quiet"
CMDLINE="net.ifnames=0 quiet"
KERNEL=/usr/src/linux
ENTRY_NAME=Gentoo
@dblsaiko
dblsaiko / no-facebook.conf
Created November 18, 2021 16:41
/etc/dnsmasq.d/no-facebook.conf -- config file to block Facebook through dnsmasq
address=/.cdninstagram.com/127.0.0.1
address=/.facebook.com/127.0.0.1
address=/.facebook.de/127.0.0.1
address=/.facebook.fr/127.0.0.1
address=/.facebook.net/127.0.0.1
address=/.fb.com/127.0.0.1
address=/.fb.me/127.0.0.1
address=/.fbcdn.com/127.0.0.1
address=/.fbcdn.net/127.0.0.1
address=/.fbsbx.com/127.0.0.1
@dblsaiko
dblsaiko / FindGNUstep.cmake
Last active December 12, 2023 01:24
CMake find module for GNUstep
include(CMakeParseArguments)
include(FindPackageHandleStandardArgs)
set(_gnustep_not_found_message)
if (NOT GNUstep_FIND_COMPONENTS)
# FIXME: there's gotta be a better way to do this
# unfortunately find modules don't work at all like config modules
set(_gnustep_force_error)
find_package_handle_standard_args(GNUstep