aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/modules/clipboard/ClipboardModule.qml
blob: 25a8cc3459387b11d0d4b1ebf5a34b0dcc638e97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright (C) 2026 Danilo M. <danix@danix.xyz>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as
// published by the Free Software Foundation.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

import QtQuick
import "../.."

// The clipboard history kept by `wl-paste --watch cliphist store`, which
// autostart runs. Nothing runs here while the drawer is closed: the page
// reads cliphist when it opens.
Module {
    name: "clipboard"
    label: "Clipboard"

    // fa-clipboard, present in Inconsolata Nerd Font.
    icon: ""

    page: Component {
        Page {
            id: pg
            title: "Clipboard"
            ClipboardPage {
                width: parent.width
                // Page wraps its content in a ScrollView. The list is
                // virtualized and scrolls itself, so it takes exactly the
                // visible height and the outer view never scrolls.
                height: pg.height - 57
                onCopied: pg.dismiss()
            }
        }
    }
}