Skip to content

Instantly share code, notes, and snippets.

View fooblahblah's full-sized avatar

Jeff Simpson fooblahblah

View GitHub Profile
@fooblahblah
fooblahblah / toggle.sh
Created July 24, 2018 15:31
Script to raise and lower a window quake-style
#!/run/current-system/sw/bin/bash
SEARCHED_WINDOW=$1
WINDOW_ID=$(xdotool search --classname $SEARCHED_WINDOW|tail -n 1)
VISIBLE_WINDOW_ID=$(xdotool search --onlyvisible --classname $SEARCHED_WINDOW|tail -n 1)
if [ -z "$VISIBLE_WINDOW_ID" ]; then
xdotool windowmap $WINDOW_ID
xdotool windowsize $WINDOW_ID 100% 100%
xdotool windowactivate $WINDOW_ID
@fooblahblah
fooblahblah / default.nix
Last active August 25, 2018 08:19
Nix shell definition for Purescript
with import <nixpkgs> {}; let
runtimeLibs = [ gmp nodejs haskellPackages.stack ghc ncurses ];
libPaths = map (x: ":${x}/lib") runtimeLibs;
in rec {
env = stdenv.mkDerivation {
name = "purescript";
buildInputs = [ stdenv haskellPackages.stack ghc ncurses ];
LD_LIBRARY_PATH = lib.foldl (x: y: x + y) "" libPaths;
shellHook = ''
export PATH=$PATH:$HOME/.local/bin/
@fooblahblah
fooblahblah / default.nix
Created November 19, 2015 19:04
Nix JS shell template
with import <nixpkgs> {}; let
runtimeLibs = [ dbus glib gnome.gtk gnome.pango atk cairo freetype fontconfig gdk_pixbuf
xorg.libX11 xorg.libXrandr xorg.libXext xorg.libXi xorg.libXcursor xorg.libXfixes
xorg.libXrender xorg.libXcomposite xorg.libXdamage xorg.libXtst
gnome.GConf nss nspr alsaLib cups expat libcap systemd ];
libPaths = map (x: ":${x}/lib") runtimeLibs;
in rec {
N1Env = stdenv.mkDerivation {
name = "N1";
buildInputs = [ stdenv cmake pkgconfig libgnome_keyring nodejs python ];
@fooblahblah
fooblahblah / config.nix
Last active August 29, 2015 14:17
Nix profiles
{
allowUnfree = true;
packageOverrides = pkgs: rec {
# jre = pkgs.oraclejre8;
# jdk = pkgs.oraclejdk8;
sbt = pkgs.sbt.override {
jre = pkgs.oraclejre8;
};
};
}
@fooblahblah
fooblahblah / gist:8324644
Last active January 2, 2016 15:39
Given a window name, toggle window over - ala visor, yakuake, etc
#!/bin/bash
usage() { echo "Usage: $0 [-mh]" 1>&2; exit 1; }
while getopts ":mh" o; do
case "${o}" in
m)
echo "found m"
m="enabled"
;;