ctrl + c & ctrl + s shortcuts + screenshot destination dir env var
C++ / fmt (pull_request) Successful in 4s
JS/TS / fmt (pull_request) Successful in 16s
JS/TS / lint (pull_request) Successful in 17s
Python / fmt (pull_request) Successful in 32s
Python / lint (pull_request) Successful in 32s
Python / test (pull_request) Successful in 1m0s
C++ / build (pull_request) Successful in 1m35s
Python / typecheck (pull_request) Failing after 1m12s
Rust / fmt (pull_request) Successful in 38s
Rust / build (pull_request) Successful in 1m34s
Rust / clippy (pull_request) Successful in 1m28s
Python / buildcheck (pull_request) Successful in 2m35s
C++ / clang-tidy (pull_request) Successful in 3m23s
C++ / fmt (pull_request) Successful in 4s
JS/TS / fmt (pull_request) Successful in 16s
JS/TS / lint (pull_request) Successful in 17s
Python / fmt (pull_request) Successful in 32s
Python / lint (pull_request) Successful in 32s
Python / test (pull_request) Successful in 1m0s
C++ / build (pull_request) Successful in 1m35s
Python / typecheck (pull_request) Failing after 1m12s
Rust / fmt (pull_request) Successful in 38s
Rust / build (pull_request) Successful in 1m34s
Rust / clippy (pull_request) Successful in 1m28s
Python / buildcheck (pull_request) Successful in 2m35s
C++ / clang-tidy (pull_request) Successful in 3m23s
This commit is contained in:
@@ -5,6 +5,7 @@ JsonObject {
|
|||||||
property string mode: "manual"
|
property string mode: "manual"
|
||||||
property real radius: 12.0
|
property real radius: 12.0
|
||||||
property bool rounding: false
|
property bool rounding: false
|
||||||
|
property bool saveOnCopy: false
|
||||||
property bool shadow: true
|
property bool shadow: true
|
||||||
property real shadow_blur: 22.0
|
property real shadow_blur: 22.0
|
||||||
property list<int> shadow_color: [0, 0, 0, 160]
|
property list<int> shadow_color: [0, 0, 0, 160]
|
||||||
|
|||||||
+13
-2
@@ -8,6 +8,7 @@ import QtQuick.Effects
|
|||||||
import qs.Components
|
import qs.Components
|
||||||
import qs.Config
|
import qs.Config
|
||||||
import qs.Helpers.Picker
|
import qs.Helpers.Picker
|
||||||
|
import qs.Paths
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
@@ -103,8 +104,9 @@ Item {
|
|||||||
const finalize = finalPath => {
|
const finalize = finalPath => {
|
||||||
if (copyToClipboard) {
|
if (copyToClipboard) {
|
||||||
Quickshell.execDetached(["sh", "-c", `wl-copy --type image/png < '${finalPath.replace(/'/g, `'\\''`)}'`]);
|
Quickshell.execDetached(["sh", "-c", `wl-copy --type image/png < '${finalPath.replace(/'/g, `'\\''`)}'`]);
|
||||||
} else {
|
}
|
||||||
const dest = `${Quickshell.env("HOME")}/Pictures/Screenshots/zshell-${Date.now()}.png`;
|
if (!copyToClipboard || Config.screenshot.saveOnCopy) {
|
||||||
|
const dest = `${Paths.screenshots}/zshell-${Date.now()}.png`;
|
||||||
Quickshell.execDetached(["sh", "-c", `mkdir -p "$(dirname '${dest}')" && cp '${path.replace(/'/g, `'\\''`)}' '${dest}'`]);
|
Quickshell.execDetached(["sh", "-c", `mkdir -p "$(dirname '${dest}')" && cp '${path.replace(/'/g, `'\\''`)}' '${dest}'`]);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -176,6 +178,15 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
Keys.onEscapePressed: root.mode === "edit" ? cancel() : closeAnim.start()
|
Keys.onEscapePressed: root.mode === "edit" ? cancel() : closeAnim.start()
|
||||||
|
Keys.onPressed: e => {
|
||||||
|
if ((e.key == Qt.Key_C) && (e.modifiers & Qt.ControlModifier)) {
|
||||||
|
save(true);
|
||||||
|
e.accepted = true;
|
||||||
|
} else if ((e.key == Qt.Key_S) && (e.modifiers & Qt.ControlModifier)) {
|
||||||
|
save(false);
|
||||||
|
e.accepted = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
onClientsChanged: {
|
onClientsChanged: {
|
||||||
if (root.mode === "select")
|
if (root.mode === "select")
|
||||||
checkClientRects(selectArea.mouseX, selectArea.mouseY);
|
checkClientRects(selectArea.mouseX, selectArea.mouseY);
|
||||||
|
|||||||
@@ -15,9 +15,9 @@ Singleton {
|
|||||||
category: "appearance"
|
category: "appearance"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: qsTr("Screenshot"),
|
name: qsTr("Screenshots"),
|
||||||
icon: "screenshot_region",
|
icon: "screenshot_region",
|
||||||
description: qsTr("Set screenshot effects"),
|
description: qsTr("Set screenshot options and effects"),
|
||||||
category: "appearance"
|
category: "appearance"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import qs.Modules.Settings.Common
|
|||||||
PageBase {
|
PageBase {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
title: qsTr("Screenshot effects")
|
title: qsTr("Screenshots")
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
@@ -22,6 +22,21 @@ PageBase {
|
|||||||
|
|
||||||
SectionHeader {
|
SectionHeader {
|
||||||
first: true
|
first: true
|
||||||
|
text: qsTr("Behavior")
|
||||||
|
}
|
||||||
|
|
||||||
|
ToggleRow {
|
||||||
|
checked: Config.screenshot.saveOnCopy
|
||||||
|
first: true
|
||||||
|
last: true
|
||||||
|
settingAnchor: "screenshot-save-on-copy"
|
||||||
|
subtext: qsTr("Also save screenshot to disk when copying to clipboard")
|
||||||
|
text: qsTr("Save on copy")
|
||||||
|
|
||||||
|
onToggled: Config.screenshot.saveOnCopy = checked
|
||||||
|
}
|
||||||
|
|
||||||
|
SectionHeader {
|
||||||
text: qsTr("Effects")
|
text: qsTr("Effects")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ Singleton {
|
|||||||
readonly property string notifimagecache: `${imagecache}/notifs`
|
readonly property string notifimagecache: `${imagecache}/notifs`
|
||||||
readonly property string pictures: Quickshell.env("XDG_PICTURES_DIR") || `${home}/Pictures`
|
readonly property string pictures: Quickshell.env("XDG_PICTURES_DIR") || `${home}/Pictures`
|
||||||
readonly property string recsdir: Quickshell.env("ZSHELL_RECORDINGS_DIR") || `${videos}/Recordings`
|
readonly property string recsdir: Quickshell.env("ZSHELL_RECORDINGS_DIR") || `${videos}/Recordings`
|
||||||
|
readonly property string screenshots: Quickshell.env("ZSHELL_SCREENSHOTS_DIR") || `${home}/Pictures/Screenshots`
|
||||||
readonly property string state: `${Quickshell.env("XDG_STATE_HOME") || `${home}/.local/state`}/zshell`
|
readonly property string state: `${Quickshell.env("XDG_STATE_HOME") || `${home}/.local/state`}/zshell`
|
||||||
readonly property string videos: Quickshell.env("XDG_VIDEOS_DIR") || `${home}/Videos`
|
readonly property string videos: Quickshell.env("XDG_VIDEOS_DIR") || `${home}/Videos`
|
||||||
readonly property string wallsdir: Quickshell.env("ZSHELL_WALLPAPERS_DIR") || absolutePath(Config.general.wallpaperPath)
|
readonly property string wallsdir: Quickshell.env("ZSHELL_WALLPAPERS_DIR") || absolutePath(Config.general.wallpaperPath)
|
||||||
|
|||||||
Reference in New Issue
Block a user