Skip to content

Instantly share code, notes, and snippets.

View Lokaltog's full-sized avatar

Kim A. Ødegaard Lokaltog

View GitHub Profile
@Lokaltog
Lokaltog / wm.c
Last active August 29, 2015 13:56
Dump window manager info to JSON (for usage with wkline)
#include <fcntl.h>
#include <gdk/gdk.h>
#include <gdk/gdkx.h>
#include <glib.h>
#include <gtk/gtk.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <webkit/webkit.h>
@Lokaltog
Lokaltog / gist:9365062
Created March 5, 2014 10:51
wkline segfault
GNU gdb (GDB) 7.7
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
diff --git a/util/load_config.c b/util/load_config.c
index 7734f36..473cef4 100644
--- a/util/load_config.c
+++ b/util/load_config.c
@@ -2,6 +2,8 @@
#include "src/widgets/widgets.h"
#include "src/wkline.h"
+static GMutex m;
+
src/wkline.c: (in function wk_context_menu_cb)
src/wkline.c:7:36: Parameter web_view not used
A function parameter is not used in the body of the function. If the argument
is needed for type compatibility or future plans, use /*@unused@*/ in the
argument declaration. (Use -paramuse to inhibit warning)
src/wkline.c:7:57: Parameter window not used
src/wkline.c: (in function wk_realize_handler)
src/wkline.c:21:8: Operand of ! is non-boolean (int):
!strcmp(wkline->position, "top")
The operand of a boolean operator is not a boolean. Use +ptrnegate to allow !
src/widgets/widgets.c: (in function update_widget)
src/widgets/widgets.c:13:18: Format string parameter to snprintf is not a
compile-time constant: script_template
Format parameter is not known at compile-time. This can lead to security
vulnerabilities because the arguments cannot be type checked. (Use
-formatconst to inhibit warning)
src/widgets/widgets.c:13:27: Null storage passed as non-null param:
snprintf (NULL, ...)
A possibly null pointer is passed as a parameter corresponding to a formal
parameter with no /*@null@*/ annotation. If NULL may be used for this
diff --git a/src/widgets/battery.c b/src/widgets/battery.c
index 9b9df18..5644b69 100644
--- a/src/widgets/battery.c
+++ b/src/widgets/battery.c
@@ -3,15 +3,15 @@
#include "util/dbus_helpers.h"
static int
-widget_send_update (struct widget *widget, DBusGProxy *properties_proxy, char *pathbuf) {
+widget_send_update (struct widget *widget, DBusGProxy *properties_proxy, char *dbus_path) {
From 06097e37f73b8236c022c3a56cbd768162728b2d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Kim=20Silkeb=C3=A6kken?= <kim.silkebaekken@gmail.com>
Date: Fri, 18 Apr 2014 23:31:11 +0200
Subject: [PATCH] Install fish completion
---
Makefile | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
@Lokaltog
Lokaltog / grammar.json
Last active August 29, 2015 14:01
Dynamic sentences for the Baba Grammar Designer
{
"transforms": {
"children": [
{
"id": "geew4jan3d",
"children": [
{
"id": "19jkvwd4ea",
"transforms": [
[
@Lokaltog
Lokaltog / grammar.json
Last active August 29, 2015 14:01
Git man page generator grammar for Baba
{
"transforms": {
"children": [
{
"id": "jti2urlqps",
"label": "Adjective",
"children": [
{
"id": "07z8wo05hy",
"label": "Convert",
@Lokaltog
Lokaltog / grammar.json
Last active August 29, 2015 14:02
Tumblr argument generator
{
"transforms": {
"children": [
{
"id": "d2c2uckdqg",
"children": [
{
"id": "javk2b7lj5",
"transforms": [
[