Add .config/DankMaterialShell/firefox.css

Add .config/DankMaterialShell/plugin_settings.json
Add .config/DankMaterialShell/plugins/calculator/CalculatorLauncher.qml
Add .config/DankMaterialShell/plugins/calculator/CalculatorSettings.qml
Add .config/DankMaterialShell/plugins/calculator/README.md
Add .config/DankMaterialShell/plugins/calculator/calculator.js
Add .config/DankMaterialShell/plugins/calculator/.git/HEAD
Add .config/DankMaterialShell/plugins/calculator/.git/config
Add .config/DankMaterialShell/plugins/calculator/.git/index
Add .config/DankMaterialShell/plugins/calculator/.git/objects/info/.keep
Add .config/DankMaterialShell/plugins/calculator/.git/objects/pack/pack-67f644835e660794f65c9273e46788b0c3da57cf.idx
Add .config/DankMaterialShell/plugins/calculator/.git/objects/pack/pack-67f644835e660794f65c9273e46788b0c3da57cf.rev
Add .config/DankMaterialShell/plugins/calculator/.git/objects/pack/pack-67f644835e660794f65c9273e46788b0c3da57cf.pack
Add .config/DankMaterialShell/plugins/calculator/.git/refs/heads/main
Add .config/DankMaterialShell/plugins/calculator/.git/refs/remotes/origin/main
Add .config/DankMaterialShell/plugins/calculator/.git/refs/remotes/origin/qalc
Add .config/DankMaterialShell/plugins/calculator/.git/refs/tags/.keep
Add .config/DankMaterialShell/plugins/calculator/plugin.json
Add .config/DankMaterialShell/plugins/calculator/screenshot.png
Add .config/DankMaterialShell/plugins/calculator/test_precision.js
Add .config/DankMaterialShell/plugins/calculator/test_single.js
Add .config/DankMaterialShell/plugins/commandRunner/CommandRunner.qml
Add .config/DankMaterialShell/plugins/commandRunner/CommandRunnerSettings.qml
Add .config/DankMaterialShell/plugins/commandRunner/LICENSE
Add .config/DankMaterialShell/plugins/commandRunner/README.md
Add .config/DankMaterialShell/plugins/commandRunner/.git/HEAD
Add .config/DankMaterialShell/plugins/commandRunner/.git/config
Add .config/DankMaterialShell/plugins/commandRunner/.git/index
Add .config/DankMaterialShell/plugins/commandRunner/.git/objects/info/.keep
Add .config/DankMaterialShell/plugins/commandRunner/.git/objects/pack/pack-5a720f795fd2994ef506cd867d86ca7df8a25a31.idx
Add .config/DankMaterialShell/plugins/commandRunner/.git/objects/pack/pack-5a720f795fd2994ef506cd867d86ca7df8a25a31.rev
Add .config/DankMaterialShell/plugins/commandRunner/.git/objects/pack/pack-5a720f795fd2994ef506cd867d86ca7df8a25a31.pack
Add .config/DankMaterialShell/plugins/commandRunner/.git/refs/heads/main
Add .config/DankMaterialShell/plugins/commandRunner/.git/refs/remotes/origin/main
Add .config/DankMaterialShell/plugins/commandRunner/.git/refs/tags/.keep
Add .config/DankMaterialShell/plugins/commandRunner/plugin.json
Add .config/DankMaterialShell/plugins/commandRunner/screenshot.png
Add .config/DankMaterialShell/plugins/dankActions.meta
Add .config/DankMaterialShell/plugins/.repos/0026f1eba8dedaec/DankActions/DankActionsSettings.qml
Add .config/DankMaterialShell/plugins/.repos/0026f1eba8dedaec/DankActions/DankActionsWidget.qml
Add .config/DankMaterialShell/plugins/.repos/0026f1eba8dedaec/DankActions/plugin.json
Add .config/DankMaterialShell/plugins/.repos/0026f1eba8dedaec/DankBatteryAlerts/DankBatteryAlerts.qml
Add .config/DankMaterialShell/plugins/.repos/0026f1eba8dedaec/DankBatteryAlerts/DankBatteryAlertsSettings.qml
Add .config/DankMaterialShell/plugins/.repos/0026f1eba8dedaec/DankBatteryAlerts/plugin.json
Add .config/DankMaterialShell/plugins/.repos/0026f1eba8dedaec/DankHooks/DankHooks.qml
Add .config/DankMaterialShell/plugins/.repos/0026f1eba8dedaec/DankHooks/DankHooksSettings.qml
Add .config/DankMaterialShell/plugins/.repos/0026f1eba8dedaec/DankHooks/README.md
Add .config/DankMaterialShell/plugins/.repos/0026f1eba8dedaec/DankHooks/plugin.json
Add .config/DankMaterialShell/plugins/.repos/0026f1eba8dedaec/DankPomodoroTimer/DankPomodoroSettings.qml
Add .config/DankMaterialShell/plugins/.repos/0026f1eba8dedaec/DankPomodoroTimer/DankPomodoroWidget.qml
Add .config/DankMaterialShell/plugins/.repos/0026f1eba8dedaec/DankPomodoroTimer/plugin.json
Add .config/DankMaterialShell/plugins/.repos/0026f1eba8dedaec/LICENSE
Add .config/DankMaterialShell/plugins/.repos/0026f1eba8dedaec/README.md
Add .config/DankMaterialShell/plugins/.repos/0026f1eba8dedaec/.git/HEAD
Add .config/DankMaterialShell/plugins/.repos/0026f1eba8dedaec/.git/config
Add .config/DankMaterialShell/plugins/.repos/0026f1eba8dedaec/.git/index
Add .config/DankMaterialShell/plugins/.repos/0026f1eba8dedaec/.git/objects/info/.keep
Add .config/DankMaterialShell/plugins/.repos/0026f1eba8dedaec/.git/objects/pack/pack-3221a15c022ef4a7bb6bf2c47e40068b66b3588b.idx
Add .config/DankMaterialShell/plugins/.repos/0026f1eba8dedaec/.git/objects/pack/pack-3221a15c022ef4a7bb6bf2c47e40068b66b3588b.rev
Add .config/DankMaterialShell/plugins/.repos/0026f1eba8dedaec/.git/objects/pack/pack-3221a15c022ef4a7bb6bf2c47e40068b66b3588b.pack
Add .config/DankMaterialShell/plugins/.repos/0026f1eba8dedaec/.git/refs/heads/master
Add .config/DankMaterialShell/plugins/.repos/0026f1eba8dedaec/.git/refs/remotes/origin/master
Add .config/DankMaterialShell/plugins/.repos/0026f1eba8dedaec/.git/refs/tags/.keep
Add .config/DankMaterialShell/plugins/.repos/0026f1eba8dedaec/.gitignore
Add .config/DankMaterialShell/plugins/emojiLauncher/EmojiLauncher.qml
Add .config/DankMaterialShell/plugins/emojiLauncher/EmojiLauncherSettings.qml
Add .config/DankMaterialShell/plugins/emojiLauncher/LICENSE
Add .config/DankMaterialShell/plugins/emojiLauncher/README.md
Add .config/DankMaterialShell/plugins/emojiLauncher/catalog.js
Add .config/DankMaterialShell/plugins/emojiLauncher/data/emojis.txt
Add .config/DankMaterialShell/plugins/emojiLauncher/data/math.txt
Add .config/DankMaterialShell/plugins/emojiLauncher/data/nerdfont.txt
Add .config/DankMaterialShell/plugins/emojiLauncher/.git/HEAD
Add .config/DankMaterialShell/plugins/emojiLauncher/.git/config
Add .config/DankMaterialShell/plugins/emojiLauncher/.git/index
Add .config/DankMaterialShell/plugins/emojiLauncher/.git/objects/info/.keep
Add .config/DankMaterialShell/plugins/emojiLauncher/.git/objects/pack/pack-e04a5b1ea381dc3a792b8bf08cf70e735b195c0d.idx
Add .config/DankMaterialShell/plugins/emojiLauncher/.git/objects/pack/pack-e04a5b1ea381dc3a792b8bf08cf70e735b195c0d.rev
Add .config/DankMaterialShell/plugins/emojiLauncher/.git/objects/pack/pack-e04a5b1ea381dc3a792b8bf08cf70e735b195c0d.pack
Add .config/DankMaterialShell/plugins/emojiLauncher/.git/refs/heads/main
Add .config/DankMaterialShell/plugins/emojiLauncher/.git/refs/remotes/origin/main
Add .config/DankMaterialShell/plugins/emojiLauncher/.git/refs/tags/.keep
Add .config/DankMaterialShell/plugins/emojiLauncher/plugin.json
Add .config/DankMaterialShell/plugins/emojiLauncher/screenshot.png
Add .config/DankMaterialShell/plugins/emojiLauncher/scripts/generate_catalog.py
Add .config/DankMaterialShell/plugins/dankActions
Add .config/DankMaterialShell/plugins/webSearch/LICENSE
Add .config/DankMaterialShell/plugins/webSearch/README.md
Add .config/DankMaterialShell/plugins/webSearch/WebSearch.qml
Add .config/DankMaterialShell/plugins/webSearch/WebSearchSettings.qml
Add .config/DankMaterialShell/plugins/webSearch/.git/HEAD
Add .config/DankMaterialShell/plugins/webSearch/.git/config
Add .config/DankMaterialShell/plugins/webSearch/.git/index
Add .config/DankMaterialShell/plugins/webSearch/.git/objects/info/.keep
Add .config/DankMaterialShell/plugins/webSearch/.git/objects/pack/pack-6a60c736f418e5b4b1f0505f66c1e2a371d46fed.idx
Add .config/DankMaterialShell/plugins/webSearch/.git/objects/pack/pack-6a60c736f418e5b4b1f0505f66c1e2a371d46fed.rev
Add .config/DankMaterialShell/plugins/webSearch/.git/objects/pack/pack-6a60c736f418e5b4b1f0505f66c1e2a371d46fed.pack
Add .config/DankMaterialShell/plugins/webSearch/.git/refs/heads/main
Add .config/DankMaterialShell/plugins/webSearch/.git/refs/remotes/origin/main
Add .config/DankMaterialShell/plugins/webSearch/.git/refs/tags/.keep
Add .config/DankMaterialShell/plugins/webSearch/plugin.json
Add .config/DankMaterialShell/plugins/webSearch/screenshot.png
Add .config/DankMaterialShell/settings.json
This commit is contained in:
Lewis Wynne 2025-12-12 05:12:42 +00:00
parent b22161e0ca
commit 809b12203c
103 changed files with 25020 additions and 0 deletions

View file

@ -0,0 +1,173 @@
import QtQuick
import Quickshell
import Quickshell.Io
import qs.Services
Item {
id: root
property var pluginService: null
property string trigger: ">"
property var commandHistory: []
property int maxHistoryItems: 20
signal itemsChanged()
Component.onCompleted: {
console.log("CommandRunner: Plugin loaded")
if (pluginService) {
trigger = pluginService.loadPluginData("commandRunner", "trigger", ">")
commandHistory = pluginService.loadPluginData("commandRunner", "history", [])
maxHistoryItems = pluginService.loadPluginData("commandRunner", "maxHistoryItems", 20)
}
}
function getItems(query) {
const items = []
if (query && query.trim().length > 0) {
const command = query.trim()
items.push({
name: "Run: " + command,
icon: "material:terminal",
comment: "Execute command in terminal",
action: "run:" + command,
categories: ["Command Runner"]
})
items.push({
name: "Run in background: " + command,
icon: "material:step_over",
comment: "Execute command silently in background",
action: "background:" + command,
categories: ["Command Runner"]
})
items.push({
name: "Copy: " + command,
icon: "material:content_copy",
comment: "Copy command to clipboard",
action: "copy:" + command,
categories: ["Command Runner"]
})
}
if (commandHistory.length > 0) {
const filteredHistory = query
? commandHistory.filter(cmd => cmd.toLowerCase().includes(query.toLowerCase()))
: commandHistory
for (let i = 0; i < Math.min(10, filteredHistory.length); i++) {
const cmd = filteredHistory[i]
items.push({
name: cmd,
icon: "material:history",
comment: "Run from history",
action: "run:" + cmd,
categories: ["Command Runner"]
})
}
}
return items
}
function executeItem(item) {
if (!item || !item.action) {
console.warn("CommandRunner: Invalid item or action")
return
}
console.log("CommandRunner: Executing item:", item.name, "with action:", item.action)
const actionParts = item.action.split(":")
const actionType = actionParts[0]
const command = actionParts.slice(1).join(":")
switch (actionType) {
case "noop":
return
case "copy":
copyToClipboard(command)
break
case "run":
runCommand(command)
break
case "background":
runBackground(command)
break
default:
console.warn("CommandRunner: Unknown action type:", actionType)
showToast("Unknown action: " + actionType)
}
}
function copyToClipboard(text) {
Quickshell.execDetached(["sh", "-c", "echo -n '" + text + "' | wl-copy"])
showToast("Copied to clipboard: " + text)
}
function runCommand(command) {
addToHistory(command)
const terminal = getTerminalCommand()
const wrappedCommand = command + "; echo '\nPress Enter to close...'; read"
Quickshell.execDetached([terminal.cmd, terminal.execFlag, "sh", "-c", wrappedCommand])
showToast("Running in " + terminal.cmd + ": " + command)
}
function runBackground(command) {
addToHistory(command)
Quickshell.execDetached(["sh", "-c", command])
showToast("Running in background: " + command)
}
function showToast(message) {
if (typeof ToastService !== "undefined") {
ToastService.showInfo("Command Runner", message)
} else {
console.log("CommandRunner Toast:", message)
}
}
function getTerminalCommand() {
if (pluginService) {
const terminal = pluginService.loadPluginData("commandRunner", "terminal", "kitty")
const execFlag = pluginService.loadPluginData("commandRunner", "execFlag", "-e")
if (terminal && execFlag) {
return {cmd: terminal, execFlag: execFlag}
}
}
return {cmd: "kitty", execFlag: "-e"}
}
function addToHistory(command) {
const index = commandHistory.indexOf(command)
if (index > -1) {
commandHistory.splice(index, 1)
}
commandHistory.unshift(command)
if (commandHistory.length > maxHistoryItems) {
commandHistory = commandHistory.slice(0, maxHistoryItems)
}
if (pluginService) {
pluginService.savePluginData("commandRunner", "history", commandHistory)
}
itemsChanged()
}
onTriggerChanged: {
if (pluginService) {
pluginService.savePluginData("commandRunner", "trigger", trigger)
}
itemsChanged()
}
}

View file

@ -0,0 +1,436 @@
import QtQuick
import QtQuick.Controls
import qs.Common
import qs.Widgets
FocusScope {
id: root
property var pluginService: null
implicitHeight: settingsColumn.implicitHeight
height: implicitHeight
Column {
id: settingsColumn
anchors.fill: parent
anchors.margins: 16
spacing: 16
StyledText {
text: "Command Runner Settings"
font.pixelSize: Theme.fontSizeLarge
font.weight: Font.Bold
color: Theme.surfaceText
}
StyledText {
text: "Execute shell commands directly from the launcher with history tracking."
font.pixelSize: Theme.fontSizeMedium
color: Theme.surfaceVariantText
wrapMode: Text.WordWrap
width: parent.width - 32
}
StyledRect {
width: parent.width - 32
height: 1
color: Theme.outlineVariant
}
Column {
spacing: 12
width: parent.width - 32
StyledText {
text: "Trigger Configuration"
font.pixelSize: Theme.fontSizeLarge
font.weight: Font.Medium
color: Theme.surfaceText
}
StyledText {
text: noTriggerToggle.checked ? "Items will always show in the launcher (no trigger needed)." : "Set the trigger text to activate this plugin. Type the trigger in the launcher to run commands."
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText
wrapMode: Text.WordWrap
width: parent.width
}
Row {
spacing: 12
CheckBox {
id: noTriggerToggle
text: "No trigger (always show)"
checked: loadSettings("noTrigger", false)
contentItem: StyledText {
text: noTriggerToggle.text
font.pixelSize: Theme.fontSizeMedium
color: Theme.surfaceText
leftPadding: noTriggerToggle.indicator.width + 8
verticalAlignment: Text.AlignVCenter
}
indicator: StyledRect {
implicitWidth: 20
implicitHeight: 20
radius: Theme.cornerRadiusSmall
border.color: noTriggerToggle.checked ? Theme.primary : Theme.outline
border.width: 2
color: noTriggerToggle.checked ? Theme.primary : "transparent"
StyledRect {
width: 12
height: 12
anchors.centerIn: parent
radius: 2
color: Theme.onPrimary
visible: noTriggerToggle.checked
}
}
onCheckedChanged: {
saveSettings("noTrigger", checked)
if (checked) {
saveSettings("trigger", "")
} else {
saveSettings("trigger", triggerField.text || ">")
}
}
}
}
Row {
spacing: 12
anchors.left: parent.left
anchors.right: parent.right
visible: !noTriggerToggle.checked
StyledText {
text: "Trigger:"
font.pixelSize: Theme.fontSizeMedium
color: Theme.surfaceText
anchors.verticalCenter: parent.verticalCenter
}
DankTextField {
id: triggerField
width: 100
height: 40
text: loadSettings("trigger", ">")
placeholderText: ">"
backgroundColor: Theme.surfaceContainer
textColor: Theme.surfaceText
onTextEdited: {
const newTrigger = text.trim()
saveSettings("trigger", newTrigger || ">")
saveSettings("noTrigger", newTrigger === "")
}
}
StyledText {
text: "Examples: >, $, !, /run, etc."
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText
anchors.verticalCenter: parent.verticalCenter
}
}
}
StyledRect {
width: parent.width - 32
height: 1
color: Theme.outlineVariant
}
Column {
spacing: 12
width: parent.width - 32
StyledText {
text: "Terminal Configuration"
font.pixelSize: Theme.fontSizeLarge
font.weight: Font.Medium
color: Theme.surfaceText
}
StyledText {
text: "Configure which terminal emulator to use for commands"
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText
wrapMode: Text.WordWrap
width: parent.width
}
Row {
spacing: 12
width: parent.width
StyledText {
text: "Terminal:"
font.pixelSize: Theme.fontSizeMedium
color: Theme.surfaceText
anchors.verticalCenter: parent.verticalCenter
}
DankTextField {
id: terminalField
width: 150
height: 40
text: loadSettings("terminal", "kitty")
placeholderText: "kitty"
backgroundColor: Theme.surfaceContainer
textColor: Theme.surfaceText
onTextEdited: {
saveSettings("terminal", text.trim())
}
}
StyledText {
text: "Exec flag:"
font.pixelSize: Theme.fontSizeMedium
color: Theme.surfaceText
anchors.verticalCenter: parent.verticalCenter
}
DankTextField {
id: execFlagField
width: 80
height: 40
text: loadSettings("execFlag", "-e")
placeholderText: "-e"
backgroundColor: Theme.surfaceContainer
textColor: Theme.surfaceText
onTextEdited: {
saveSettings("execFlag", text.trim())
}
}
}
Column {
spacing: 4
leftPadding: 16
StyledText {
text: "Common terminals: kitty (-e), alacritty (-e), foot (-e), wezterm (start)"
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText
}
StyledText {
text: "Others: gnome-terminal (--), konsole (-e), xterm (-e)"
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText
}
}
}
StyledRect {
width: parent.width - 32
height: 1
color: Theme.outlineVariant
}
Column {
spacing: 12
width: parent.width - 32
StyledText {
text: "History Settings"
font.pixelSize: Theme.fontSizeLarge
font.weight: Font.Medium
color: Theme.surfaceText
}
Row {
spacing: 12
width: parent.width
StyledText {
text: "Max history items:"
font.pixelSize: Theme.fontSizeMedium
color: Theme.surfaceText
anchors.verticalCenter: parent.verticalCenter
}
DankTextField {
id: historyField
width: 80
height: 40
text: loadSettings("maxHistoryItems", "20")
placeholderText: "20"
backgroundColor: Theme.surfaceContainer
textColor: Theme.surfaceText
onTextEdited: {
const num = parseInt(text)
if (!isNaN(num) && num > 0 && num <= 100) {
saveSettings("maxHistoryItems", num)
}
}
}
StyledText {
text: "(1-100)"
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText
anchors.verticalCenter: parent.verticalCenter
}
}
StyledRect {
width: parent.width
height: 40
radius: Theme.cornerRadius
color: clearMouseArea.containsMouse ? Theme.errorHover : Theme.error
StyledText {
anchors.centerIn: parent
text: "Clear Command History"
color: Theme.onError
font.pixelSize: Theme.fontSizeMedium
font.weight: Font.Medium
}
MouseArea {
id: clearMouseArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: {
saveSettings("history", [])
if (typeof ToastService !== "undefined") {
ToastService.showInfo("Command history cleared")
}
}
}
}
}
StyledRect {
width: parent.width - 32
height: 1
color: Theme.outlineVariant
}
Column {
spacing: 8
width: parent.width - 32
StyledText {
text: "Features:"
font.pixelSize: Theme.fontSizeMedium
font.weight: Font.Medium
color: Theme.surfaceText
}
Column {
spacing: 4
leftPadding: 16
StyledText {
text: "• Run commands in terminal or background"
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText
}
StyledText {
text: "• Command history with recent commands"
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText
}
StyledText {
text: "• Common command shortcuts"
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText
}
StyledText {
text: "• Copy commands to clipboard"
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText
}
StyledText {
text: "• Auto-detects available terminal emulator"
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText
}
}
}
StyledRect {
width: parent.width - 32
height: 1
color: Theme.outlineVariant
}
Column {
spacing: 8
width: parent.width - 32
StyledText {
text: "Usage:"
font.pixelSize: Theme.fontSizeMedium
font.weight: Font.Medium
color: Theme.surfaceText
}
Column {
spacing: 4
leftPadding: 16
bottomPadding: 24
StyledText {
text: "1. Open Launcher (Ctrl+Space or click launcher button)"
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText
}
StyledText {
text: noTriggerToggle.checked ? "2. Commands are always visible in the launcher" : "2. Type your trigger (default: >) followed by command"
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText
}
StyledText {
text: noTriggerToggle.checked ? "3. Type your command, e.g., 'htop' or 'ls -la'" : "3. Example: '> htop' or '> ls -la'"
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText
}
StyledText {
text: "4. Select 'Run' to open in terminal, 'Run in background' for silent execution"
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText
}
StyledText {
text: "5. Browse recent commands from history or pick from common commands"
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceVariantText
}
}
}
}
function saveSettings(key, value) {
if (pluginService) {
pluginService.savePluginData("commandRunner", key, value)
}
}
function loadSettings(key, defaultValue) {
if (pluginService) {
return pluginService.loadPluginData("commandRunner", key, defaultValue)
}
return defaultValue
}
}

View file

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2025 DankMaterialShell Contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -0,0 +1,180 @@
# Command Runner
A DankMaterialShell launcher plugin for executing shell commands directly from the launcher with history tracking and preset shortcuts.
![Command Runner Screenshot](screenshot.png)
## Features
- **Execute Commands** - Run any shell command in terminal or background
- **Command History** - Track and reuse recently executed commands
- **Common Shortcuts** - Quick access to frequently used commands (htop, btop, ncdu, etc.)
- **Terminal Support** - Auto-detect or configure your preferred terminal emulator
- **Background Execution** - Run commands silently without opening a terminal
- **Clipboard Copy** - Copy commands to clipboard before executing
- **Configurable Trigger** - Default `>` or set your own trigger
## Installation
### From Plugin Registry (Recommended)
```bash
# Coming soon - will be available via DMS plugin manager
```
### Manual Installation
```bash
# Copy plugin to DMS plugins directory
cp -r CommandRunner ~/.config/DankMaterialShell/plugins/
# Enable in DMS
# 1. Open Settings (Ctrl+,)
# 2. Go to Plugins tab
# 3. Click "Scan for Plugins"
# 4. Toggle "Command Runner" to enable
# 5. Configure your terminal emulator in plugin settings
```
## Configuration
**Important**: Configure your terminal before first use!
1. Open Settings → Plugins → Command Runner
2. Set **Terminal**: Your terminal emulator (e.g., `kitty`, `alacritty`, `foot`)
3. Set **Exec flag**: The flag for executing commands (e.g., `-e` for most terminals)
### Common Terminal Configurations
| Terminal | Command | Exec Flag |
|----------|---------|-----------|
| kitty | `kitty` | `-e` |
| alacritty | `alacritty` | `-e` |
| foot | `foot` | `-e` |
| wezterm | `wezterm` | `start` |
| gnome-terminal | `gnome-terminal` | `--` |
| konsole | `konsole` | `-e` |
| xterm | `xterm` | `-e` |
## Usage
### Execute Commands in Terminal
1. Open launcher (Ctrl+Space)
2. Type `>` followed by command
3. Examples:
- `> htop` - System monitor
- `> btop` - Modern resource monitor
- `> ls -la` - List files with details
- `> journalctl -f` - View live system logs
4. Select "Run: command" and press Enter
### Execute Commands in Background
1. Type command as above
2. Select "Run in background: command"
3. Command executes silently without terminal window
### Copy Command to Clipboard
1. Type command
2. Select "Copy: command"
3. Command copied to clipboard for use elsewhere
### Use Command History
- Recent commands appear automatically in the list
- Click any historical command to re-execute
- History persists across sessions
### Common Command Shortcuts
Access pre-configured shortcuts without typing:
- `htop` - Interactive process viewer
- `btop` - Resource monitor
- `ncdu` - Disk usage analyzer
- `nmtui` - Network manager TUI
- `ranger` - File manager
- `neofetch` / `fastfetch` - System info
- And more!
## Settings
- **Trigger**: Set custom trigger (`>`, `$`, `!`, `/run`, etc.) or disable for always-on
- **Terminal Emulator**: Configure which terminal to use
- **Exec Flag**: Set the command execution flag for your terminal
- **Max History Items**: Configure history size (1-100 items)
- **Clear History**: Remove all stored commands
## Examples
### System Monitoring
```
> htop # Interactive process viewer
> btop # Modern resource monitor
> journalctl -f # Live system logs
> df -h # Disk usage
> free -h # Memory usage
```
### File Operations
```
> ls -la # List all files
> ncdu ~ # Analyze disk usage
> ranger # File manager
```
### Network
```
> nmtui # Network manager
> ip addr # Network interfaces
> ping 8.8.8.8 # Test connectivity
```
### Development
```
> vim config.txt # Edit file in vim
> git status # Check git status
> npm install # Install packages
```
## Requirements
- DankMaterialShell >= 0.1.0
- Terminal emulator (kitty, alacritty, foot, etc.)
- `wl-copy` (for clipboard support)
- Wayland compositor
## Compatibility
- **Compositors**: Niri and Hyprland
- **Distros**: Universal - works on any Linux distribution
- **Terminals**: Supports all major terminal emulators
## Technical Details
- **Type**: Launcher plugin
- **Trigger**: `>` (configurable)
- **Language**: QML (Qt Modeling Language)
- **Storage**: Command history stored in DMS settings
## Troubleshooting
### Commands not launching?
1. Verify terminal is configured in plugin settings
2. Check terminal is installed: `which kitty` (or your terminal)
3. Verify exec flag matches your terminal
### Terminal opens but command doesn't run?
- Ensure exec flag is correct for your terminal
- Most terminals use `-e`, but some (wezterm) use `start`
## Contributing
Found a bug or want to add features? Open an issue or submit a pull request!
## License
MIT License - See LICENSE file for details
## Author
Created for the DankMaterialShell community
## Links
- [DankMaterialShell](https://github.com/AvengeMedia/DankMaterialShell)
- [Plugin Registry](https://github.com/AvengeMedia/dms-plugin-registry)

View file

@ -0,0 +1 @@
ref: refs/heads/main

View file

@ -0,0 +1,9 @@
[core]
bare = false
filemode = true
[remote "origin"]
url = https://github.com/devnullvoid/dms-command-runner
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "main"]
remote = origin
merge = refs/heads/main

View file

@ -0,0 +1 @@
d89a09413e2fc041089b595a06c0fb316b12e17a

View file

@ -0,0 +1 @@
d89a09413e2fc041089b595a06c0fb316b12e17a

View file

@ -0,0 +1,20 @@
{
"id": "commandRunner",
"name": "Command Runner",
"description": "Execute shell commands directly from the launcher",
"version": "1.1.0",
"author": "devnullvoid",
"icon": "terminal",
"type": "launcher",
"capabilities": [
"command-execution",
"shell"
],
"component": "./CommandRunner.qml",
"settings": "./CommandRunnerSettings.qml",
"trigger": ">",
"permissions": [
"settings_read",
"settings_write"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB