]> Git — Sourcephile - julm/julm-nix.git/blob - home-manager/profiles/clipster.nix
nix: format with nixfmt-rfc-style
[julm/julm-nix.git] / home-manager / profiles / clipster.nix
1 { pkgs, config, ... }:
2 {
3 home.packages = [
4 pkgs.clipster
5 ];
6 systemd.user.services.clipster = {
7 Unit = {
8 Description = "clipster clipboard manager daemon";
9 After = [ "graphical-session-pre.target" ];
10 PartOf = [ "graphical-session.target" ];
11 };
12 Service = {
13 ExecStart = "${pkgs.clipster}/bin/clipster -d";
14 Restart = "always";
15 };
16 Install = {
17 WantedBy = [ "graphical-session.target" ];
18 };
19 };
20 xdg.configFile."clipster/clipster.ini".text = ''
21 [clipster]
22 # Directory for clipster data/files (usually `$HOME/.local/share/clipster`)
23 #data_dir = $XDG_DATA_HOME
24
25 # Default selection (if no -p of -c given on command-line): can be PRIMARY or CLIPBOARD
26 default_selection = PRIMARY
27
28 # Comma-separated list of selections to be watched and written to history
29 active_selections = PRIMARY,CLIPBOARD
30
31 # Enable synchronising of clipboards
32 # Only clipboards listed in 'active selections' will be synchronised
33 sync_selections = yes
34
35 # full path to the clipster history file (JSON)
36 # Maximum file size is: 'history_size * max_input * 2' (defaults: 10MB)
37 #history_file = %(data_dir)s/history
38
39 # Number of items to save in the history file for each selection. 0 - don't save history.
40 history_size = 20
41
42 # Time in seconds to flush history to disk, if changed
43 # Set to 0 to only write history file on (clean) exit
44 #history_update_interval = 60
45
46 # Write history file immediately after selection changes?
47 # If yes, disables history_update_interval
48 #write_on_change = no
49
50 # Full path to the clipster socket file
51 #socket_file = %(data_dir)s/clipster_sock
52
53 # Full path to the clipster pid file
54 #pid_file = %(data_dir)s/clipster.pid
55
56 # Maximum length for new clipboard items
57 #max_input = 50000
58
59 # Number of rows of clipboard content to show in the selection widget before truncating
60 # Set to a high number to avoid truncation
61 #row_height = 3
62
63 # Allow duplicates in the clipboard (if set to no, the earlier entry will be removed)
64 duplicates = no
65
66 # smart_update tries to be clever about small changes to the selection, and only adds
67 # to the history if the number of characters added or removed is greater than it's value.
68 # for example, if set to 2: the latest clipboard entry catch, would be replaced by any of:
69 # cat, catc, catchy, catcher, but not ca or catchers.
70 # Defaults to 1, as some applications update the clipboard by continually adding new
71 # items with a single character added or removed each time.
72 # Set to 0 to disable.
73 #smart_update = 1
74
75 # Extract uris from the selection text and add them to the default clipboard
76 extract_uris = no
77
78 # Extract emails from the selection text and add them to the default clipboard
79 extract_emails = no
80
81 # Extract patterns (as specified in patterns file: clipster_dir/patterns) and add them to the default clipboard
82 extract_patterns = no
83 #patterns_file = %(conf_dir)s/patterns
84
85 # Ignore selections matching certain patterns (as specified in patterns file: clipster_dir/ignore_patterns)
86 #ignore_patterns = no
87 #ignore_patterns_file = %(conf_dir)s/ignore_patterns
88
89 # Extracted patterns are added to the history before the selection, and the clipbaord buffer is left unchanged.
90 # Enabling this option adds the pattern as the last item int he history, and updates the clipboard buffer with the pattern.
91 # NOTE: Multiple patterns will be applied sequentially: last one will be used for selection.
92 # This option also applies to email and uri patterns (which are processed before additional patterns).
93 #pattern_as_selection = no
94
95 # Comma-separated list of WM_CLASS properties for apps where clipboard changes should be ignored.
96 # Used to ignore clipboard changes from sensitive apps, e.g. password managers.
97 #blacklist_classes =
98
99 # Comma-separated list of WM_CLASS properties for apps where clipboard changes should NOT be ignored.
100 # Used to only monitor clipboard changes from whitelisted apps, all other apps will be ignored!
101 #whitelist_classes =
102 '';
103 }