forked from Shinonome/dots-hyprland
initial commit of record-location
This commit is contained in:
@@ -460,6 +460,10 @@ Singleton {
|
||||
}
|
||||
}
|
||||
|
||||
property JsonObject screenRecord: JsonObject {
|
||||
property string savePath: Directories.videos
|
||||
}
|
||||
|
||||
property JsonObject sounds: JsonObject {
|
||||
property bool battery: false
|
||||
property bool pomodoro: false
|
||||
|
||||
@@ -85,6 +85,25 @@ ContentPage {
|
||||
|
||||
}
|
||||
|
||||
ContentSection {
|
||||
icon: "screen_record"
|
||||
title: Translation.tr("Screen Recording")
|
||||
|
||||
ContentSubsection {
|
||||
title: Translation.tr("Save path") + " (example: /home/user/Videos)"
|
||||
MaterialTextArea {
|
||||
Layout.fillWidth: true
|
||||
placeholderText: Translation.tr("Path")
|
||||
text: Config.options.screenRecord.savePath
|
||||
wrapMode: TextEdit.Wrap
|
||||
onTextChanged: {
|
||||
Config.options.screenRecord.savePath = text;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ContentSection {
|
||||
icon: "search"
|
||||
title: Translation.tr("Search")
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CONFIG_FILE="$HOME/.config/illogical-impulse/config.json"
|
||||
JSON_PATH=".screenRecord.savePath"
|
||||
|
||||
CUSTOM_PATH=$(jq -r "$JSON_PATH" "$CONFIG_FILE" 2>/dev/null)
|
||||
|
||||
RECORDING_DIR=""
|
||||
|
||||
if [[ -n "$CUSTOM_PATH" ]]; then
|
||||
RECORDING_DIR="$CUSTOM_PATH"
|
||||
else
|
||||
RECORDING_DIR="$HOME/Videos"
|
||||
fi
|
||||
|
||||
getdate() {
|
||||
date '+%Y-%m-%d_%H.%M.%S'
|
||||
}
|
||||
@@ -10,12 +23,13 @@ getactivemonitor() {
|
||||
hyprctl monitors -j | jq -r '.[] | select(.focused == true) | .name'
|
||||
}
|
||||
|
||||
xdgvideo="$(xdg-user-dir VIDEOS)"
|
||||
if [[ $xdgvideo = "$HOME" ]]; then
|
||||
unset xdgvideo
|
||||
fi
|
||||
mkdir -p "${xdgvideo:-$HOME/Videos}"
|
||||
cd "${xdgvideo:-$HOME/Videos}" || exit
|
||||
# ORİJİNAL XDG MANTIĞI SİLİNDİ, YERİNE SADECE YENİ DEĞİŞKEN KULLANILDI
|
||||
# xdgvideo="$(xdg-user-dir VIDEOS)"
|
||||
# if $xdgvideo = "$HOME" ]]; then
|
||||
# unset xdgvideo
|
||||
# fi
|
||||
mkdir -p "$RECORDING_DIR"
|
||||
cd "$RECORDING_DIR" || exit
|
||||
|
||||
# parse --region <value> without modifying $@ so other flags like --fullscreen still work
|
||||
ARGS=("$@")
|
||||
|
||||
Reference in New Issue
Block a user