summarylogtreecommitdiffstats
path: root/bigedit.install
blob: 0a758493936155127b83c0bc4426f53ab5bdb0b8 (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
40
post_install() {
    echo ""
    echo "╔══════════════════════════════════════════════════════════════════╗"
    echo "║                    BigEdit Installation Complete                  ║"
    echo "╠══════════════════════════════════════════════════════════════════╣"
    echo "║                                                                   ║"
    echo "║  BigEdit includes a systemd user service that automatically      ║"
    echo "║  mounts FUSE views for files being edited, so other programs     ║"
    echo "║  can see your changes before they're written to disk.            ║"
    echo "║                                                                   ║"
    echo "║  The bigedit-watcher service is enabled by default.              ║"
    echo "║                                                                   ║"
    echo "║  Usage:                                                           ║"
    echo "║    bigedit <filename>     Edit a file                             ║"
    echo "║                                                                   ║"
    echo "║  Keybindings:                                                     ║"
    echo "║    Ctrl+O     Save (journal mode)                                 ║"
    echo "║    Ctrl+J     Compact (full file rewrite)                         ║"
    echo "║    Ctrl+T     Toggle FUSE mode                                    ║"
    echo "║    Ctrl+X     Exit                                                ║"
    echo "║                                                                   ║"
    echo "╚══════════════════════════════════════════════════════════════════╝"
    echo ""
    
    # Try to start the service for logged-in users
    # This runs during package install, so we notify users
    echo "To start the watcher service now, run:"
    echo "  systemctl --user daemon-reload && systemctl --user start bigedit-watcher.service"
    echo ""
}

post_upgrade() {
    post_install
}

pre_remove() {
    echo "Stopping bigedit-watcher service for all users..."
    # Note: Can't easily stop user services from package removal
    echo "Users should run: systemctl --user disable --now bigedit-watcher.service"
}