Browse Source

Set User-Agent on the CLI

Requires writeas-cli v1.1
tags/v1.0.0
Matt Baer 6 years ago
parent
commit
6e530b33d2
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/window.vala

+ 2
- 1
src/window.vala View File

@@ -22,6 +22,7 @@ public class WriteAs.MainWindow : Gtk.ApplicationWindow {
private Gtk.ToggleButton darkmode_button;

private static string data_dir = ".writeas";
private static string version = "1.0.0-beta";

private int font_size = 12;
private bool dark_mode = false;
@@ -264,7 +265,7 @@ public class WriteAs.MainWindow : Gtk.ApplicationWindow {
text_changed = false;
}

var cmd = "sh -c 'cat ~/" + data_dir + "/draft.txt | writeas --font %s'";
var cmd = "sh -c 'cat ~/" + data_dir + "/draft.txt | writeas --font %s --user-agent \"writeas-gtk v" + version + "\"'";
cmd = cmd.printf(fontstyle);
string stdout, stderr;
int status;


Loading…
Cancel
Save