aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Runge <dave@sleepmap.de>2018-01-01 01:32:34 +0100
committerDavid Runge <dave@sleepmap.de>2018-01-01 01:32:34 +0100
commitca9bb1eaaf107d4fb3a0e6f43277781530f16c0d (patch)
tree724b5f1e15d95a23bc43192245177b0199df4310
parentfb62e74e683b98b307815a931a959cbb3991fcd8 (diff)
parentb7b81f3e2a285a3a2064ce6a56abf4785e8e0352 (diff)
downloaddotfiles-ca9bb1eaaf107d4fb3a0e6f43277781530f16c0d.tar.gz
dotfiles-ca9bb1eaaf107d4fb3a0e6f43277781530f16c0d.tar.bz2
dotfiles-ca9bb1eaaf107d4fb3a0e6f43277781530f16c0d.tar.xz
dotfiles-ca9bb1eaaf107d4fb3a0e6f43277781530f16c0d.zip
Merge branch 'master' of sleepmap.de:config/dotfiles
* 'master' of sleepmap.de:config/dotfiles: .config/qtile/config.py: Adding separate screen for spatialization software. Fixing many re.compiles. Reworking the use of floating windows. .config/jack/fw-fireface800-44100: Lowering frame size to 64, for near zero latency setup. .config/SuperCollider/startupfiles: Removing obsolete startupfiles. .config/SuperCollider/startup.scd: Using easier and more unified way to load standard num{Input,Output}BusChannels per interface. Using ffado-test still has to be setup for firewire devices.
-rw-r--r--.config/SuperCollider/startup.scd35
-rw-r--r--.config/SuperCollider/startupfiles/behringer_xusb.scd5
-rw-r--r--.config/SuperCollider/startupfiles/focusrite_scarlett18i20.scd4
-rw-r--r--.config/SuperCollider/startupfiles/rme_babyface.scd5
-rw-r--r--.config/SuperCollider/startupfiles/rme_fireface800.scd8
-rw-r--r--.config/jack/fw-fireface800-441002
-rw-r--r--.config/qtile/config.py75
7 files changed, 67 insertions, 67 deletions
diff --git a/.config/SuperCollider/startup.scd b/.config/SuperCollider/startup.scd
index 9d905a2..0c12dc3 100644
--- a/.config/SuperCollider/startup.scd
+++ b/.config/SuperCollider/startup.scd
@@ -1,23 +1,28 @@
-Server.local.options.numOutputBusChannels = 2;
-Server.local.options.numInputBusChannels = 2;
-Server.local.options.sampleRate = 48000.0;
-
if(PathName("/dev/fw1").isFile, {
- load(Platform.userConfigDir++"/startupfiles/rme_fireface800.scd");
-});
-if(("aplay -l |grep Babyface > /dev/null".systemCmd) == 0, {
- load(Platform.userConfigDir++"/startupfiles/rme_babyface.scd");
-});
-if(("aplay -l |grep XUSB > /dev/null".systemCmd) == 0, {
- load(Platform.userConfigDir++"/startupfiles/behringer_xusb.scd");
+// if(("which ffado-test").systemCmd == 0, {
+// ~ffadoDevice = ("ffado-test ListDevices |tail -1").unixCmdGetStdOut;
+// ~ffadoDevice.asArray.postln;
+// });
+ ~audioInterfaceOptions = ['RME Fireface 800', 28, 28];
+ "SC_JACK_DEFAULT_INPUTS".setenv("firewire_pcm");
+ "SC_JACK_DEFAULT_OUTPUTS".setenv("firewire_pcm");
+},{
+ if(("which aplay").systemCmd == 0, {
+ ~alsaDevices = ("aplay -l").unixCmdGetStdOut;
+ ~audioInterfaceOptions = case
+ {~alsaDevices.contains("Babyface")}{['RME Babyface', 12, 10]}
+ {~alsaDevices.contains("XUSB")}{['Behringer XUSB', 32, 32]}
+ {~alsaDevices.contains("Scarlett 18i20")}{['Focusrite Scarlett 18i20', 20, 18]};
+ });
});
-if(("aplay -l |grep 'Scarlett 18i20' > /dev/null".systemCmd) == 0, {
- load(Platform.userConfigDir++"/startupfiles/focusrite_scarlett18i20.scd");
-});
-postln("Loaded settings for: "++Server.local.options.device);
+~audioInterface = ~audioInterfaceOptions[0];
+Server.local.options.numOutputBusChannels = ~audioInterfaceOptions[1];
+Server.local.options.numInputBusChannels = ~audioInterfaceOptions[2];
+postln("Loaded settings for: "++~audioInterface);
postln("Initializing and connecting MIDI devices.");
MIDIClient.init;
MIDIIn.connectAll;
//TODO: load all quarks from ~/git/audio automatically, don't use symlinks
+
diff --git a/.config/SuperCollider/startupfiles/behringer_xusb.scd b/.config/SuperCollider/startupfiles/behringer_xusb.scd
deleted file mode 100644
index fce30ef..0000000
--- a/.config/SuperCollider/startupfiles/behringer_xusb.scd
+++ /dev/null
@@ -1,5 +0,0 @@
-Server.local.options.numOutputBusChannels = 32;
-Server.local.options.numInputBusChannels = 32;
-Server.local.options.blockSize = 128; // default: 64
-Server.local.options.device = "Behringer XUSB";
-
diff --git a/.config/SuperCollider/startupfiles/focusrite_scarlett18i20.scd b/.config/SuperCollider/startupfiles/focusrite_scarlett18i20.scd
deleted file mode 100644
index d8c9060..0000000
--- a/.config/SuperCollider/startupfiles/focusrite_scarlett18i20.scd
+++ /dev/null
@@ -1,4 +0,0 @@
-Server.local.options.numOutputBusChannels = 20;
-Server.local.options.numInputBusChannels = 18;
-Server.local.options.blockSize = 128; // default: 64
-Server.local.options.device = "Focusrite Scarlett 18i20";
diff --git a/.config/SuperCollider/startupfiles/rme_babyface.scd b/.config/SuperCollider/startupfiles/rme_babyface.scd
deleted file mode 100644
index f778262..0000000
--- a/.config/SuperCollider/startupfiles/rme_babyface.scd
+++ /dev/null
@@ -1,5 +0,0 @@
-Server.local.options.numOutputBusChannels = 12;
-Server.local.options.numInputBusChannels = 10;
-Server.local.options.blockSize = 128; // default: 64
-Server.local.options.device = "RME Babyface";
-
diff --git a/.config/SuperCollider/startupfiles/rme_fireface800.scd b/.config/SuperCollider/startupfiles/rme_fireface800.scd
deleted file mode 100644
index fbf1390..0000000
--- a/.config/SuperCollider/startupfiles/rme_fireface800.scd
+++ /dev/null
@@ -1,8 +0,0 @@
-Server.local.options.numOutputBusChannels = 28;
-Server.local.options.numInputBusChannels = 28;
-Server.local.options.blockSize = 128; // default: 64
-Server.local.options.device = "RME Fireface 800";
-
-"SC_JACK_DEFAULT_INPUTS".setenv("firewire_pcm");
-"SC_JACK_DEFAULT_OUTPUTS".setenv("firewire_pcm");
-
diff --git a/.config/jack/fw-fireface800-44100 b/.config/jack/fw-fireface800-44100
index b36a168..4d28bed 100644
--- a/.config/jack/fw-fireface800-44100
+++ b/.config/jack/fw-fireface800-44100
@@ -9,5 +9,5 @@ UNLOCK="-u"
VERBOSE="-v"
DRIVER_SETTINGS="\
-n 3 \
- -p 256\
+ -p 64\
-r 44100"
diff --git a/.config/qtile/config.py b/.config/qtile/config.py
index 8a800b7..bf7e17c 100644
--- a/.config/qtile/config.py
+++ b/.config/qtile/config.py
@@ -1,9 +1,12 @@
from libqtile.config import Key, Screen, Group, Drag, Click, Match
from libqtile.command import lazy
from libqtile import layout, bar, widget, hook
+import logging
import os
import re
import subprocess
+from libqtile.log_utils import logger
+
mod = "mod4"
alt = "mod1"
@@ -140,8 +143,8 @@ keys = [
matchers = {
'web': [
Match(wm_class=[
- "Firefox",
- "chromium",
+ re.compile('Chromium$'),
+ re.compile('Firefox$'),
re.compile('TorLauncher'),
re.compile('Tor Browser'),
]),
@@ -150,15 +153,12 @@ matchers = {
Match(wm_class=[
re.compile('Processing'),
re.compile('processing-app-Base'),
- re.compile('scide'),
- "pdwindow",
- "PdWindow",
- "PatchWindow",
]),
Match(title=[
- re.compile('SuperCollider'),
- "Pd",
- re.compile('Arduino'),
+ re.compile("SuperCollider\sIDE$"),
+ re.compile("^SuperCollider"),
+ re.compile("^Loading"),
+ re.compile("Pd$"),
]),
],
'games': [
@@ -184,12 +184,24 @@ matchers = {
],
'audio': [
Match(wm_class=[
- "Ardour",
+ re.compile('Ardour'),
re.compile('Audacity'),
re.compile('Calfjackhost'),
re.compile('Ffado-mixer'),
re.compile('Guitarix'),
- ])
+ re.compile('Session Setup'),
+ ]),
+ Match(title=[
+ re.compile('^JACK'),
+ re.compile("^Calf\sJACK\sHost"),
+ re.compile("^Patchage"),
+ ]),
+ ],
+ 'spat': [
+ Match(title=[
+ re.compile('BinauralRenderer'),
+ re.compile('Controls'),
+ ]),
],
'photo': [
Match(wm_class=[
@@ -222,10 +234,10 @@ workspaces = [
{"key": "3", "name": "dev", "matches": matchers["dev"]},
{"key": "4", "name": "games", "matches": matchers["games"]},
{"key": "5", "name": "audio", "matches": matchers["audio"]},
- {"key": "6", "name": "photo", "matches": matchers["photo"]},
- {"key": "7", "name": "office", "matches": matchers["office"]},
- {"key": "8", "name": "admin", "matches": matchers["admin"]},
- {"key": "9", "name": "9"},
+ {"key": "6", "name": "spat", "matches": matchers["spat"]},
+ {"key": "7", "name": "photo", "matches": matchers["photo"]},
+ {"key": "8", "name": "office", "matches": matchers["office"]},
+ {"key": "9", "name": "admin", "matches": matchers["admin"]},
{"key": "0", "name": "0"},
]
@@ -315,21 +327,21 @@ screens = [
widget.HDDGraph(
graph_color=colors["blue"],
border_width=0,
- samples=60,
+ samples=20,
frequency=5,
type="box",
),
widget.MemoryGraph(
graph_color=colors["green"],
border_width=0,
- samples=60,
+ samples=20,
frequency=2,
type="box",
),
widget.CPUGraph(
graph_color=colors["red"],
border_width=0,
- samples=60,
+ samples=20,
frequency=2,
type="box",
),
@@ -387,6 +399,10 @@ mouse = [
)
]
+floating_clients = [
+ re.compile('^JACK'),
+]
+
dgroups_key_binder = None
dgroups_app_rules = []
follow_mouse_focus = True
@@ -407,16 +423,17 @@ def restart_on_randr(qtile, ev):
@hook.subscribe.client_new
-def floating_dialogs(window):
- float_clients = [
- 'DialogWindow',
- 'HelpBrowser',
- ]
- wm_class = window.window.get_wm_class()
- for client in float_clients:
- if client in wm_class:
- window.floating = True
- transient = window.window.get_wm_transient_for()
+def floating_dialogs(client):
+ wm_class = client.window.get_wm_class()
+ logger.setLevel(logging.INFO)
+ logger.info('New client window name: %s' % client.name)
+# logger.info('New client window class: %c' % wm_class)
+ logger.setLevel(logging.WARNING)
+ for client_regex in floating_clients:
+ match = client_regex.match(client.name)
+ if match:
+ client.floating = True
+ transient = client.window.get_wm_transient_for()
if transient:
- window.floating = True
+ client.floating = True