Compare commits

...

2 Commits

5 changed files with 101 additions and 43 deletions

View File

@ -21,7 +21,7 @@
serviceConfig = { serviceConfig = {
ExecStart = "${pkgs.noisetorch}/bin/noisetorch -i -s ${ ExecStart = "${pkgs.noisetorch}/bin/noisetorch -i -s ${
if config.networking.hostName == "tears" then if config.networking.hostName == "tears" then
"UMC202HD_Left" "US-4x4HR_ch0"
else else
"alsa_input.pci-0000_00_1f.3.analog-stereo" "alsa_input.pci-0000_00_1f.3.analog-stereo"
}"; }";

View File

@ -54,6 +54,8 @@
services.sxhkd = { services.sxhkd = {
enable = true; enable = true;
keybindings = { keybindings = {
# Disable middle click paste
"~button2" = "echo -n | xclip -in";
# Terminal # Terminal
"super + Return" = "kitty"; "super + Return" = "kitty";
"Caps_Lock" = "kitty"; "Caps_Lock" = "kitty";
@ -62,11 +64,7 @@
# Program launcher # Program launcher
"super + @space" = "rofi -show drun"; "super + @space" = "rofi -show drun";
# Clipboard # Clipboard
"super + v" = '' "super + v" = "clipcat-menu";
CM_LAUNCHER=rofi clipmenu \
-theme-str 'listview \{ spacing: 0; \}' \
-theme-str 'window \{ width: 30em; \}'
'';
# Calculator # Calculator
"super + shift + c" = '' "super + shift + c" = ''
ROFI_PLUGIN_PATH=${pkgs.rofi-calc}/lib/rofi rofi -show calc -modi calc -calc-command '${pkgs.xdotool}/bin/xdotool type --clearmodifiers "\{result\}' ROFI_PLUGIN_PATH=${pkgs.rofi-calc}/lib/rofi rofi -show calc -modi calc -calc-command '${pkgs.xdotool}/bin/xdotool type --clearmodifiers "\{result\}'

View File

@ -0,0 +1,67 @@
{
# Persistent clipboard
services.clipcat.enable = true;
home-manager.users.agatha = {
xdg.configFile."clipcat/clipcatd.toml".text = ''
daemonize = true
pid_file = "/run/user/1000/clipcatd.pid"
max_history = 50
history_file_path = "/home/agatha/.cache/clipcat/clipcatd-history"
snippets = []
[log]
emit_journald = true
emit_stdout = false
emit_stderr = false
level = "INFO"
[watcher]
load_current = true
enable_clipboard = true
enable_primary = false
sensitive_x11_atoms = []
filter_text_min_length = 1
denied_text_regex_patterns = []
capture_image = true
[grpc]
enable_http = false
enable_local_socket = true
local_socket = "/run/user/1000/clipcat/grpc.sock"
[desktop_notification]
enable = true
icon = "accessories-clipboard"
timeout_ms = 2000
long_plaintext_length = 2000
'';
xdg.configFile."clipcat/clipcatctl.toml".text = ''
server_endpoint = "/run/user/1000/clipcat/grpc.sock"
[log]
emit_journald = true
emit_stdout = false
emit_stderr = false
level = "INFO"
'';
xdg.configFile."clipcat/clipcat-menu.toml".text = ''
server_endpoint = "/run/user/1000/clipcat/grpc.sock"
finder = "rofi"
[rofi]
line_length = 35
menu_length = 15
menu_prompt = "Clipboard"
extra_arguments = []
[log]
emit_journald = true
emit_stdout = false
emit_stderr = false
level = "INFO"
'';
};
}

View File

@ -3,6 +3,7 @@
../restic.nix ../restic.nix
./audio.nix ./audio.nix
./bspwm.nix ./bspwm.nix
./clipboard.nix
./dunst.nix ./dunst.nix
./element.nix ./element.nix
./iosevka.nix ./iosevka.nix
@ -32,7 +33,6 @@
brightnessctl brightnessctl
broot broot
bspm bspm
clipmenu
colmena colmena
darktable darktable
element-desktop element-desktop

View File

@ -54,43 +54,36 @@
hardware.cpu.amd.updateMicrocode = hardware.cpu.amd.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware; lib.mkDefault config.hardware.enableRedistributableFirmware;
# Workaround for UMC202HD only exposing a single stereo input # Creating separate mono sources for Tascam US-4x4HR
environment.etc."pipewire/pipewire.conf.d/91-umc202hd.conf".text = '' environment.etc."pipewire/pipewire.conf.d/91-us-4x4hr.conf".text = let
name = "US-4x4HR";
target = "alsa_input.usb-TASCAM_US-4x4HR_no_serial_number-00.pro-input-0";
input = ch: ''
{
name = libpipewire-module-loopback
args = {
node.description = "${name} Input ${toString ch} Mono"
capture.props = {
node.name = "capture.${name}_ch${toString ch}"
audio.position = [ AUX${toString ch} ]
stream.dont-remix = true
target.object = "${target}"
node.passive = true
}
playback.props = {
node.name = "${name}_ch${toString ch}"
media.class = "Audio/Source"
audio.position = [ MONO ]
}
}
}
'';
in ''
context.modules = [ context.modules = [
{ name = libpipewire-module-loopback ${input 0}
args = { ${input 1}
node.description = "UMC202HD Left Input Mono" ${input 2}
capture.props = { ${input 3}
node.name = "capture.UMC202HD_Left"
audio.position = [ AUX0 ]
stream.dont-remix = true
target.object = "alsa_input.usb-BEHRINGER_UMC202HD_192k-00.analog-stereo"
node.passive = true
}
playback.props = {
node.name = "UMC202HD_Left"
media.class = "Audio/Source"
audio.position = [ MONO ]
}
}
}
{ name = libpipewire-module-loopback
args = {
node.description = "UMC202HD Right Input Mono"
capture.props = {
node.name = "capture.UMC_202HD_Right"
audio.position = [ AUX1 ]
stream.dont-remix = true
target.object = "alsa_input.usb-BEHRINGER_UMC202HD_192k-00.analog-stereo"
node.passive = true
}
playback.props = {
node.name = "UMC202HD_Right"
media.class = "Audio/Source"
audio.position = [ MONO ]
}
}
}
] ]
''; '';
} }