From 065deec4c33e6c2f65eb0aa8e68d7fffca8de555 Mon Sep 17 00:00:00 2001 From: David Runge Date: Thu, 21 Dec 2017 21:45:39 +0100 Subject: .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. --- .config/SuperCollider/startup.scd | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 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 + -- cgit v1.2.3-70-g09d2 From 137c73e192333a3f3c940d11e35db26ab32c2459 Mon Sep 17 00:00:00 2001 From: David Runge Date: Thu, 21 Dec 2017 21:46:52 +0100 Subject: .config/SuperCollider/startupfiles: Removing obsolete startupfiles. --- .config/SuperCollider/startupfiles/behringer_xusb.scd | 5 ----- .config/SuperCollider/startupfiles/focusrite_scarlett18i20.scd | 4 ---- .config/SuperCollider/startupfiles/rme_babyface.scd | 5 ----- .config/SuperCollider/startupfiles/rme_fireface800.scd | 8 -------- 4 files changed, 22 deletions(-) delete mode 100644 .config/SuperCollider/startupfiles/behringer_xusb.scd delete mode 100644 .config/SuperCollider/startupfiles/focusrite_scarlett18i20.scd delete mode 100644 .config/SuperCollider/startupfiles/rme_babyface.scd delete mode 100644 .config/SuperCollider/startupfiles/rme_fireface800.scd 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"); - -- cgit v1.2.3-70-g09d2 From e9ffa93aeee3934ad83f2d12149c8b1d58565b6e Mon Sep 17 00:00:00 2001 From: David Runge Date: Thu, 21 Dec 2017 21:47:32 +0100 Subject: .config/jack/fw-fireface800-44100: Lowering frame size to 64, for near zero latency setup. --- .config/jack/fw-fireface800-44100 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" -- cgit v1.2.3-70-g09d2 From b7b81f3e2a285a3a2064ce6a56abf4785e8e0352 Mon Sep 17 00:00:00 2001 From: David Runge Date: Fri, 22 Dec 2017 00:53:01 +0100 Subject: .config/qtile/config.py: Adding separate screen for spatialization software. Fixing many re.compiles. Reworking the use of floating windows. --- .config/qtile/config.py | 75 ++++++++++++++++++++++++++++++------------------- 1 file changed, 46 insertions(+), 29 deletions(-) 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 -- cgit v1.2.3-70-g09d2