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