diff --git a/interfaces/main.ui b/interfaces/main.ui index 8167416..ff2461c 100644 --- a/interfaces/main.ui +++ b/interfaces/main.ui @@ -1,25 +1,22 @@ - + - False - True - dialog - blue-recorder - - - + False + True + dialog + blue-recorder - False + False vertical 2 - False + False True - end + end True @@ -32,73 +29,74 @@ 10000 - 1 - 2 + 1 + 2 1 200 30 - 1 - 10 + 1 + 10 100 - 1 - 10 + 1 + 10 100 - 1 - 10 + 1 + 10 area_chooser_window - False + False True True - center - blue-recorder + center + blue-recorder static True - False - False - True + False + False + True True - True - True + True + True half - True + True + True - False - 3 - True + False + 3 + True True - False - dialog-ok + False + dialog-ok - 0 - 0 + 0 + 0 True - False + False Apply - 1 - 0 + 1 + 0 @@ -110,174 +108,54 @@ True - False - media-playback-start + False + media-playback-start True - False + False gtk-media-stop True - False + False True - False + False True - True + True False - center + center center - - - True - False - False - True - - - True - True - True - half - - - True - False - 2 - True - - - True - False - media-record - - - 0 - 0 - - - - - True - False - Record - - - 1 - 0 - - - - - - - - - True - True - True - half - - - True - False - 2 - True - - - True - False - media-playback-stop - - - 0 - 0 - - - - - True - False - Stop Recording - - - 1 - 0 - - - - - - - 2 - - - - - True - True - True - image3 - half - True - - - 3 - - - - - True - True - True - none - menu1 - - - True - False - view-list-symbolic - - - - - end - 5 - - - - True - False + False vertical True - False - 5 - 5 - 5 + False + 5 + 5 + 5 True True - True - True - True - True - 5 - 5 - 5 - 5 + True + True + True + True + 5 + 5 + 5 + 5 True @@ -288,12 +166,12 @@ True - True - True - 5 - 5 - 5 - 5 + True + True + 5 + 5 + 5 + 5 select-folder @@ -312,11 +190,11 @@ True - False - 10 - 10 - 5 - 5 + False + 10 + 10 + 5 + 5 False @@ -327,21 +205,21 @@ True - False - 5 - 5 - 5 + False + 5 + 5 + 5 True button True - True - True - 5 - 5 - 5 - 5 + True + True + 5 + 5 + 5 + 5 True @@ -353,12 +231,12 @@ button True - True - True - 5 - 5 - 5 - 5 + True + True + 5 + 5 + 5 + 5 True @@ -374,140 +252,147 @@ + True - False - 10 - 10 - 5 - 5 - True - True + False + 10 + 10 + 5 + 5 + True + True + True - False - True - True + False + True + True checkbutton True - True - False - True + True + False + True + True - 0 - 0 + 0 + 0 checkbutton True - True - False - True + True + False + True + True - 1 - 0 + 1 + 0 checkbutton True - True - False - True + True + False + True + True - 0 - 1 + 0 + 1 checkbutton True - True - False - True + True + False + True + True - 1 - 1 + 1 + 1 - 0 - 0 + 0 + 0 + True - False - 3 - True - True + False + 3 + True + True True - False + False label - 0 - 0 + 0 + 0 True - True - 2 + True + 2 30 adjustment2 30 - 1 - 0 + 1 + 0 True - False + False label - 0 - 1 + 0 + 1 True - True - 2 + True + 2 0 adjustment1 - 1 + 1 - 1 - 1 + 1 + 1 - 1 - 0 + 1 + 0 @@ -518,65 +403,66 @@ + True - False - 10 - 10 - 5 - 5 - 2 - 5 + False + 10 + 10 + 5 + 5 + 2 + 5 True - True - 5 - 5 + True + 5 + 5 True True - 1 - 1 + 1 + 1 True - False - 5 - 5 + False + 5 + 5 label - 0 - 1 + 0 + 1 True - False - 5 - 5 + False + 5 + 5 label - 0 - 0 + 0 + 0 True - False + False True True - 1 - 0 + 1 + 0 @@ -588,5 +474,127 @@ + + + True + False + False + True + + + True + True + True + half + + + + True + False + 2 + True + + + True + False + media-record + + + 0 + 0 + + + + + True + False + Record + + + 1 + 0 + + + + + + + + + True + True + True + half + + + + True + False + 2 + True + + + True + False + media-playback-stop + + + 0 + 0 + + + + + True + False + Stop Recording + + + 1 + 0 + + + + + + + 2 + + + + + True + True + True + image3 + half + True + + + 3 + + + + + True + True + True + none + menu1 + + + True + False + view-list-symbolic + + + + + end + 5 + + + + diff --git a/src/main.rs b/src/main.rs index 3a81362..7079841 100644 --- a/src/main.rs +++ b/src/main.rs @@ -132,22 +132,27 @@ fn main() { // get audio sources let sources_descriptions: Vec = { + let list_sources_child = Command::new("pactl") + .args(&["list", "sources"]) + .stdout(Stdio::piped()) + .spawn(); let sources_descriptions = String::from_utf8( + if list_sources_child.is_ok() { Command::new("grep") .args(&["-e", "device.description"]) .stdin( - Command::new("pactl") - .args(&["list", "sources"]) - .stdout(Stdio::piped()) - .spawn() - .unwrap() - .stdout - .take() - .unwrap(), + list_sources_child + .unwrap() + .stdout + .take() + .unwrap(), ) .output() .unwrap() - .stdout, + .stdout + } else { + Vec::new() + } ) .unwrap(); sources_descriptions diff --git a/test.ogg b/test.ogg new file mode 100644 index 0000000..ac1e829 Binary files /dev/null and b/test.ogg differ