Browse Source

Add pulse config. Guard nim options behind version check. misc bspwm.

master
SolitudeSF 2 months ago
parent
commit
f9669a326e
Signed by: SolitudeSF <solitudesf@protonmail.com> GPG Key ID: 789B06817C385387
5 changed files with 28 additions and 9 deletions
  1. 6
    6
      bspwm
  2. 7
    3
      nim.nim
  3. 2
    0
      pulse/daemon.conf
  4. 9
    0
      pulse/default.pa
  5. 4
    0
      setup

+ 6
- 6
bspwm View File

@@ -4,17 +4,17 @@ bspc monitor -d 0 1 2 3 4 5 6 7 8 9
4 4
 bspc config border_width          1
5 5
 bspc config window_gap            3
6 6
 bspc config split_ratio           0.5
7
-bspc config removal_adjustment    longest_side
7
+bspc config removal_adjustment    false
8 8
 bspc config borderless_monocle    true
9 9
 bspc config gapless_monocle       true
10 10
 bspc config focus_follows_pointer true
11 11
 bspc config click_to_focus        button1
12 12
 
13
-bspc rule -a Firefox desktop='^2'
13
+bspc rule -a Firefox desktop=^2
14 14
 bspc rule -a mpv state=floating
15 15
 bspc rule -a Peek state=floating
16 16
 bspc rule -a kittyfloat state=floating
17
-bspc rule -a TelegramDesktop desktop='^3'
18
-bspc rule -a Hexchat desktop='^3'
19
-bspc rule -a Ripcord desktop='^3'
20
-bspc rule -a Steam desktop='^4'
17
+bspc rule -a TelegramDesktop desktop=^3
18
+bspc rule -a Hexchat desktop=^3
19
+bspc rule -a Ripcord desktop=^3
20
+bspc rule -a Steam desktop=^4

+ 7
- 3
nim.nim View File

@@ -2,7 +2,7 @@ from macros import error
2 2
 
3 3
 type Compiler = enum gcc = "gcc", clang = "clang"
4 4
 
5
-switch "styleCheck", "hint"
5
+const is199 = (NimMajor, NimMinor, NimPatch) >= (0, 19, 9)
6 6
 
7 7
 proc setCompiler(s: string, compiler = gcc, cpp = false) =
8 8
   let c = findExe s
@@ -34,11 +34,15 @@ when defined(musl):
34 34
   setCompiler "x86_64-linux-musl-gcc"
35 35
   switch "passL", "-static"
36 36
 
37
+when is199:
38
+  switch "styleCheck", "hint"
39
+
37 40
 when defined(release):
38
-  switch "nimcache", "/tmp/nim/" & projectName() & "_r"
41
+  when is199:
42
+    switch "nimcache", "/tmp/nim/" & projectName() & "_r"
39 43
   switch "passC", "-flto"
40 44
   switch "passL", "-s"
41
-else:
45
+elif is199:
42 46
   switch "nimcache", "/tmp/nim/" & projectName() & "_d"
43 47
 
44 48
 when defined(hotcodereloading):

+ 2
- 0
pulse/daemon.conf View File

@@ -0,0 +1,2 @@
1
+allow-module-loading = no
2
+use-pid-file = no

+ 9
- 0
pulse/default.pa View File

@@ -0,0 +1,9 @@
1
+#!/usr/bin/pulseaudio -nF
2
+
3
+.fail
4
+load-module module-alsa-sink
5
+load-module module-alsa-source
6
+load-module module-null-sink
7
+load-module module-always-sink
8
+load-module module-native-protocol-unix auth-cookie-enabled=0
9
+load-module module-suspend-on-idle

+ 4
- 0
setup View File

@@ -33,6 +33,7 @@ zathura
33 33
 neofetch
34 34
 gtk
35 35
 user-dirs
36
+pulse
36 37
 fontconfig'
37 38
 }
38 39
 
@@ -124,6 +125,9 @@ for arg; do
124 125
 			_install $arg/settings.ini "$CONF/gtk-3.0/settings.ini";;
125 126
 		user-dirs)
126 127
 			_install $arg "$CONF/user-dirs.dirs";;
128
+		pulse)
129
+			_install $arg/default.pa "$CONF/pulse/default.pa"
130
+			_install $arg/daemon.conf "$CONF/pulse/daemon.conf";;
127 131
 		fontconfig)
128 132
 			_install $arg "$CONF/fontconfig/fonts.conf";;
129 133
 		*)

Loading…
Cancel
Save