143 lines
4.5 KiB
TOML
143 lines
4.5 KiB
TOML
# Run as a traditional UNIX daemon.
|
|
daemonize = true
|
|
# Maximum number of clip history.
|
|
max_history = 50
|
|
# File path of clip history,
|
|
# if you omit this value, clipcatd persists history in `$XDG_CACHE_HOME/clipcat/clipcatd-history`.
|
|
# history_file_path = "/home/<username>/.cache/clipcat/clipcatd-history"
|
|
# File path of PID file,
|
|
# if you omit this value, clipcatd places the PID file on `$XDG_RUNTIME_DIR/clipcatd.pid`.
|
|
# pid_file = "/run/linly/1000/clipcatd.pid"
|
|
# Controls how often the program updates its stored value of the Linux
|
|
# primary selection. In the Linux environment, the primary selection is a
|
|
# mechanism that automatically updates to reflect the current highlighted text or
|
|
# object, typically updating with every mouse movement.
|
|
primary_threshold_ms = 5000
|
|
|
|
[log]
|
|
# Emit log message to a log file.
|
|
# If you omit this value, clipcatd disables emitting to a log file.
|
|
# file_path = "/path/to/log/file"
|
|
# Emit log message to systemd-journald.
|
|
emit_journald = true
|
|
# Emit log message to stdout.
|
|
emit_stdout = false
|
|
# Emit log message to stderr.
|
|
emit_stderr = false
|
|
# Log level
|
|
level = "INFO"
|
|
|
|
[watcher]
|
|
# Enable watching X11/Wayland clipboard selection.
|
|
enable_clipboard = true
|
|
# Enable watching X11/Wayland primary selection.
|
|
enable_primary = true
|
|
# Ignore clips which match with one of the X11 `TARGETS`.
|
|
sensitive_x11_atoms = ["x-kde-passwordManagerHint"]
|
|
# Ignore text clips which match with one of the regular expressions.
|
|
# The regular expression engine is powered by https://github.com/rust-lang/regex .
|
|
denied_text_regex_patterns = []
|
|
# Ignore text clips with a length <= `filter_text_min_length`, in characters (Unicode scalar value), not in byte.
|
|
filter_text_min_length = 1
|
|
# Ignore text clips with a length > `filter_text_max_length`, in characters (Unicode scalar value), not in byte.
|
|
filter_text_max_length = 20000000
|
|
# Enable capturing image or not.
|
|
capture_image = true
|
|
# Ignore image clips with a size > `filter_image_max_size`, in byte.
|
|
filter_image_max_size = 5242880
|
|
|
|
[grpc]
|
|
# Enable gRPC over http.
|
|
enable_http = false
|
|
# Enable gRPC over unix domain socket.
|
|
enable_local_socket = true
|
|
# Host address for gRPC.
|
|
host = "127.0.0.1"
|
|
# Port number for gRPC.
|
|
port = 45045
|
|
# Path of unix domain socket.
|
|
# If you omit this value, clipcatd places the socket on `$XDG_RUNTIME_DIR/clipcat/grpc.sock`.
|
|
# local_socket = "/run/user/<user-id>/clipcat/grpc.sock"
|
|
|
|
[dbus]
|
|
# Enable D-Bus.
|
|
enable = true
|
|
|
|
# Specify the identifier for current clipcat instance.
|
|
# The D-Bus service name shows as "org.clipcat.clipcat.instance-0".
|
|
# If identifier is not provided, D-Bus service name shows as "org.clipcat.clipcat".
|
|
identifier = "instance-0"
|
|
|
|
[desktop_notification]
|
|
# Enable desktop notification.
|
|
enable = true
|
|
# Path of a icon, the given icon will be displayed on desktop notification,
|
|
# if your desktop notification server supports showing a icon.
|
|
# If this value is not provided, the value `accessories-clipboard` is applied.
|
|
icon = "/path/to/the/icon"
|
|
# Timeout duration in milliseconds.
|
|
# This sets the time from the time the notification is displayed until it is
|
|
# closed again by the notification server.
|
|
timeout_ms = 2000
|
|
# Define the length of a long plaintext,
|
|
# if the length of a plaintext is >= `long_plaintext_length`,
|
|
# desktop notification is emitted.
|
|
# If this value is 0, no desktop desktop notification is emitted when fetched a long plaintext.
|
|
long_plaintext_length = 2000
|
|
|
|
# Snippets, only UTF-8 text is supported.
|
|
[[snippets]]
|
|
[snippets.Directory]
|
|
# Name of snippet.
|
|
name = "my-snippets"
|
|
# File path to the directory containing snippets.
|
|
path = "/home/user/snippets"
|
|
|
|
[[snippets]]
|
|
[snippets.File]
|
|
# Name of snippet.
|
|
name = "os-release"
|
|
# File path to the snippet.
|
|
path = "/etc/os-release"
|
|
|
|
[[snippets]]
|
|
[snippets.Text]
|
|
# Name of snippet.
|
|
name = "cxx-io-speed-up"
|
|
# Content of the snippet.
|
|
content = '''
|
|
int io_speed_up = [] {
|
|
std::ios::sync_with_stdio(false);
|
|
std::cin.tie(nullptr);
|
|
std::cout.tie(nullptr);
|
|
return 0;
|
|
}();
|
|
'''
|
|
|
|
[[snippets]]
|
|
[snippets.Text]
|
|
name = "rust-sieve-primes"
|
|
content = '''
|
|
fn sieve_primes(n: usize) -> Vec<usize> {
|
|
if n < 2 {
|
|
return Vec::new();
|
|
}
|
|
let root_n = f64::from(n as i32).sqrt().floor() as usize;
|
|
let mut is_prime = vec![true; n + 1];
|
|
for i in 2..=root_n {
|
|
if !is_prime[i] {
|
|
continue;
|
|
}
|
|
for j in ((i << 1)..=n).step_by(i) {
|
|
is_prime[j] = false;
|
|
}
|
|
}
|
|
is_prime
|
|
.into_iter()
|
|
.enumerate()
|
|
.skip(2)
|
|
.filter_map(|(i, x)| if x { Some(i) } else { None })
|
|
.collect()
|
|
}
|
|
'''
|