Skip to content

Instantly share code, notes, and snippets.

@ixxra
ixxra / auctex-synctex-evince.el
Created September 15, 2018 21:14 — forked from dandrake/auctex-synctex-evince.el
Make AUCTeX do forward and inverse search with SyncTeX and Evince
;; This is originally from
;; http://ubuntuforums.org/showthread.php?s=618526e60dfcf25e6413439603fa08ad&t=1716268&page=2.
;; Thanks to user "florenzen". I've included the fixes for Ubuntu 11.10
;; and wrapped buffer-file-name in a call to file-truename because
;; kpathsea/SyncTeX follow symlinks; see
;; http://tex.stackexchange.com/questions/25578/why-is-synctex-in-tl-2011-so-fussy-about-filenames.
;; Forward/inverse search with evince using D-bus.
(if (require 'dbus "dbus" t)
(progn
@ixxra
ixxra / volume.sh
Created July 29, 2018 17:59 — forked from sebastiencs/volume.sh
Script to get volume notification with dunst http://imgur.com/a/qWgAw
#!/bin/bash
# You can call this script like this:
# $./volume.sh up
# $./volume.sh down
# $./volume.sh mute
function get_volume {
amixer get Master | grep '%' | head -n 1 | cut -d '[' -f 2 | cut -d '%' -f 1
}
@ixxra
ixxra / HUD.py
Created July 20, 2018 23:59 — forked from snippins/HUD.py
HUD Menu
#!/usr/bin/env python3
import gi
gi.require_version("Gtk", "3.0")
import dbus
import psutil
import subprocess
from Xlib import display, protocol, X
import time
@ixxra
ixxra / mpvctl
Created May 10, 2018 15:07 — forked from dwgill/mpvctl
A small script for controlling mpv via the JSON IPC. Intended to resemble playerctl.
#!/usr/bin/env bash
# This script requires:
# - that the directory $HOME/.mpv exist
# - that the program socat be installed
# - that you start mpv with the unix socket feature pointing at that directory
# I recommend an alias in your .bashrc or equivalent file:
# alias mpv="mpv --input-unix-socket=$HOME/.mpv/socket"
socket="$HOME/.mpv/socket"
@ixxra
ixxra / calendar.css
Created August 27, 2017 00:54 — forked from evaldas-raisutis/calendar.css
Responsive html calendar with javascript
#calendar {
margin-top:5em;
width: 100%;
}
#month {
text-align:center;
text-transform:uppercase;
}
#include "linklabel.h"
#include <QtWidgets>
LinkLabel::LinkLabel(QWidget * parent)
:QLabel(parent)
{
connect( this, SIGNAL( clicked() ), this, SLOT( slotClicked() ) );
}
void LinkLabel::slotClicked()