Skip to content

Instantly share code, notes, and snippets.

View PhrantiK's full-sized avatar
😐
Hacking with a butterknife.

PhrantiK

😐
Hacking with a butterknife.
View GitHub Profile
diff --git a/src/misc/extern.h b/src/misc/extern.h
index f1a5cfa..eb96253 100644
--- a/src/misc/extern.h
+++ b/src/misc/extern.h
@@ -29,6 +29,7 @@ extern CGError SLSClearWindowTags(int cid, uint32_t wid, uint64_t* tags, int tag
extern CGError SLSSetWindowShape(int cid, uint32_t wid, float x_offset, float y_offset, CFTypeRef shape);
extern CGError SLSSetWindowResolution(int cid, uint32_t wid, double res);
extern CGError SLSSetWindowOpacity(int cid, uint32_t wid, bool isOpaque);
+extern CGError SLSSetWindowLevel(int cid, uint32_t wid, int level);
extern CGError SLSSetWindowAlpha(int cid, uint32_t wid, float alpha);
diff --git a/src/bar_manager.c b/src/bar_manager.c
index 4235d2a..55addef 100644
--- a/src/bar_manager.c
+++ b/src/bar_manager.c
@@ -463,13 +463,27 @@ void bar_manager_update_alias_components(struct bar_manager* bar_manager, bool f
}
}
+void bar_manager_update_space_highlights(struct bar_item* bar_item, bool hi, bool forced) {
+ if ((hi && (!bar_item->selected || forced)) ||
diff --git a/src/media.m b/src/media.m
index c9d6ac9..aef481f 100644
--- a/src/media.m
+++ b/src/media.m
@@ -115,9 +115,12 @@ - (void)media_change:(NSNotification *)notification {
if (!g_media_events) return;
MRMediaRemoteGetNowPlayingApplicationDisplayName(0, dispatch_get_main_queue(), ^(CFStringRef name) {
@autoreleasepool {
+
+ NSString* app = [(NSString*)CFBridgingRelease(name) copy];
@PhrantiK
PhrantiK / layercake.c
Created November 19, 2023 17:34
layercake
#include <stdio.h>
#include <stdint.h>
#include <hidapi/hidapi.h>
hid_device *open_device(uint16_t vendor_id, uint16_t product_id, uint16_t usage_page, uint16_t usage) {
struct hid_device_info *devs, *cur_dev;
hid_device *handle = NULL;
devs = hid_enumerate(vendor_id, product_id);
cur_dev = devs;
{
"header": {
"Name": "MD1.1",
"Variant": "alphabet",
"Layout": "Alphabet",
"Base": "AlphabetBlank",
"Version": "0.3d",
"Author": "HaaTa (Jacob Alexander) 2014-2016",
"KLL": "0.3c",
"Date": "2016-02-06",