-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·40 lines (33 loc) · 1.19 KB
/
install.sh
File metadata and controls
executable file
·40 lines (33 loc) · 1.19 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
#!/bin/bash
# Install the GitHub Copilot Usage plasmoid
PLASMOID_DIR="$HOME/.local/share/plasma/plasmoids/com.github.copilot-usage"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
echo "Installing GitHub Copilot Usage widget..."
# Check if gh is installed and authenticated
if ! command -v gh &> /dev/null; then
echo "Error: 'gh' CLI is not installed. Install it with: sudo dnf install gh"
exit 1
fi
if ! gh auth status &> /dev/null; then
echo "Warning: 'gh' CLI is not authenticated. Run: gh auth login"
fi
# Remove old installation if exists
if [ -d "$PLASMOID_DIR" ]; then
echo "Removing existing installation..."
rm -rf "$PLASMOID_DIR"
fi
# Create directory and copy files
mkdir -p "$PLASMOID_DIR"
cp -r "$SCRIPT_DIR/metadata.json" "$PLASMOID_DIR/"
cp -r "$SCRIPT_DIR/contents" "$PLASMOID_DIR/"
echo "Installation complete!"
echo ""
echo "To use the widget:"
echo "1. Right-click on your panel -> Add Widgets"
echo "2. Search for 'GitHub Copilot Usage'"
echo "3. Drag it to your panel"
echo ""
echo "The widget uses 'gh' CLI for authentication - no token config needed!"
echo ""
echo "You may need to restart plasmashell:"
echo " kquitapp6 plasmashell && kstart plasmashell"