Skip to content

Instantly share code, notes, and snippets.

View csssuf's full-sized avatar

James Forcier csssuf

  • Brooklyn
  • 14:02 (UTC -04:00)
View GitHub Profile
@csssuf
csssuf / glfw-i3-floating-window.patch
Created September 20, 2017 20:36
GLFW patch to fix GLFW_FLOATING windows in i3
diff --git a/src/x11_init.c b/src/x11_init.c
index f7a06c1..5be293f 100644
--- a/src/x11_init.c
+++ b/src/x11_init.c
@@ -436,6 +436,8 @@ static void detectEWMH(void)
getSupportedAtom(supportedAtoms, atomCount, "_NET_WM_STATE");
_glfw.x11.NET_WM_STATE_ABOVE =
getSupportedAtom(supportedAtoms, atomCount, "_NET_WM_STATE_ABOVE");
+ _glfw.x11.NET_WM_STATE_MODAL =
+ getSupportedAtom(supportedAtoms, atomCount, "_NET_WM_STATE_MODAL");
@csssuf
csssuf / bar.sh
Last active April 19, 2023 10:52
Adds now playing indicator from spotify or MPD to i3status
#!/bin/bash
i3status | while :
do
read line
dir=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)
spotify_status=$(dbus-send --print-reply --session --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'PlaybackStatus' | tail -n1 | cut -d'"' -f2)
spotify_artist=$(dbus-send --print-reply --session --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata' | awk -f ${dir}/spotify_song.awk | head -n 1 | cut -d':' -f2)
spotify_song=$(dbus-send --print-reply --session --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata' | awk -f ${dir}/spotify_song.awk | tail -n 1 | cut -d':' -f2)