Skip to content

Instantly share code, notes, and snippets.

View sitepodmatt's full-sized avatar

Mãtt Freèman sitepodmatt

  • Everywhere
View GitHub Profile
--
-- xmonad example config file for xmonad-0.9
--
-- A template showing all available configuration hooks,
-- and how to override the defaults in your own xmonad.hs conf file.
--
-- Normally, you'd only override those defaults you care about.
--
-- NOTE: Those updating from earlier xmonad versions, who use
-- EwmhDesktops, safeSpawn, WindowGo, or the simple-status-bar
#!/bin/bash
existingWindow=$(xdotool search --class terminal | head -n1)
existingScratch=$(tmux list-sessions | cut -d: -f1 | grep ^scratch)
if [[ -z $existingScratch ]]; then
tmux new-session -d -s scratch
fi
if [[ -n $existingWindow ]]; then
existingClient=$(tmux list-clients | cut -d: -f1 | head -n1)