-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
106 lines (92 loc) · 3.86 KB
/
Cargo.toml
File metadata and controls
106 lines (92 loc) · 3.86 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
[package]
name = "shortcuts-overlay"
version = "0.2.0"
edition = "2021"
license = "Apache-2.0"
description = "A keyboard shortcuts overlay for the COSMIC DE and other Wayland compositors"
homepage = "https://github.com/l-const/shortcuts-overlay"
repository = "https://github.com/l-const/shortcuts-overlay"
readme = "README.md"
keywords = ["wayland", "cosmic", "shortcuts", "overlay", "keyboard"]
categories = ["gui", "visualization"]
[dependencies]
cosmic-settings-config = { git = "https://github.com/pop-os/cosmic-settings-daemon", package = "cosmic-settings-config", rev = "ef024bfd06bf9fbd57246a25c91d1fdd28153d05" }
smithay-client-toolkit = "0.20"
wayland-client = "0.31"
xkbcommon = "0.8"
anyhow = "1.0"
input = "0.8"
libc = "0.2"
thiserror = "1.0"
nix = { version = "0.27", features = ["fs"] }
log = "0.4"
env_logger = "0.11"
serde = { version = "1.0", features = ["derive"] }
toml = "0.8"
clap = { version = "4.4", features = ["derive"] }
# Rendering and text layout dependencies
tiny-skia = "0.11"
cosmic-text = "0.16"
fontdb = "0.7"
# Directory utilities
dirs = "5.0"
notify = "8.2.0"
[package.metadata.deb]
maintainer = "Your Name <your.email@example.com>"
copyright = "2024, Your Name <your.email@example.com>"
license-file = ["LICENSE", "4"]
extended-description = """\
A keyboard shortcuts overlay for the COSMIC DE and other Wayland compositors.
Displays keyboard shortcuts in a semi-transparent overlay when a hotkey is pressed.
Features include Wayland native support, layer shell integration, and configurable appearance."""
depends = "$auto, libwayland-client0, libxkbcommon0, libinput10"
section = "utils"
priority = "optional"
assets = [
["target/release/shortcuts-overlay", "usr/bin/", "755"],
["logo.svg", "usr/share/icons/hicolor/scalable/apps/shortcuts-overlay.svg", "644"],
["shortcuts-overlay.desktop", "usr/share/applications/", "644"],
["overlay-config.toml", "usr/share/shortcuts-overlay/overlay-config.toml", "644"],
["README.md", "usr/share/doc/shortcuts-overlay/", "644"],
["LICENSE", "usr/share/doc/shortcuts-overlay/", "644"],
]
conf-files = ["/etc/shortcuts-overlay/overlay-config.toml"]
[package.metadata.deb.systemd-units]
[package.metadata.generate-rpm]
name = "shortcuts-overlay"
assets = [
{ source = "target/release/shortcuts-overlay", dest = "/usr/bin/shortcuts-overlay", mode = "755" },
{ source = "logo.svg", dest = "/usr/share/icons/hicolor/scalable/apps/shortcuts-overlay.svg", mode = "644" },
{ source = "shortcuts-overlay.desktop", dest = "/usr/share/applications/shortcuts-overlay.desktop", mode = "644" },
{ source = "overlay-config.toml", dest = "/usr/share/shortcuts-overlay/overlay-config.toml", mode = "644", config = true },
{ source = "README.md", dest = "/usr/share/doc/shortcuts-overlay/README.md", mode = "644", doc = true },
{ source = "LICENSE", dest = "/usr/share/doc/shortcuts-overlay/LICENSE", mode = "644", doc = true },
]
post_install_script = """
# Update icon cache
if command -v gtk-update-icon-cache >/dev/null 2>&1; then
gtk-update-icon-cache -f -t /usr/share/icons/hicolor || true
fi
# Update desktop database
if command -v update-desktop-database >/dev/null 2>&1; then
update-desktop-database /usr/share/applications || true
fi
echo "shortcuts-overlay installed successfully!"
echo "Note: Add your user to the 'input' group to allow keyboard detection:"
echo " sudo usermod -a -G input \\$USER"
echo "Then log out and log back in for changes to take effect."
"""
post_uninstall_script = """
# Update icon cache
if command -v gtk-update-icon-cache >/dev/null 2>&1; then
gtk-update-icon-cache -f -t /usr/share/icons/hicolor || true
fi
# Update desktop database
if command -v update-desktop-database >/dev/null 2>&1; then
update-desktop-database /usr/share/applications || true
fi
"""
[package.metadata.generate-rpm.requires]
libwayland-client = ">= 1.0"
libxkbcommon = ">= 0.8"
libinput = ">= 1.0"