forked from Shinonome/dots-hyprland
Merge branch 'end-4:main' into parallax
This commit is contained in:
@@ -23,7 +23,7 @@ exec-once = wl-paste --type image --watch bash -c 'cliphist store && qs -c $qsCo
|
|||||||
exec-once = hyprctl setcursor Bibata-Modern-Classic 24
|
exec-once = hyprctl setcursor Bibata-Modern-Classic 24
|
||||||
|
|
||||||
# Fix dock pinned apps not launching properly (https://github.com/end-4/dots-hyprland/issues/2200)
|
# Fix dock pinned apps not launching properly (https://github.com/end-4/dots-hyprland/issues/2200)
|
||||||
exec-once = sleep 3.5 && hyprctl reload && sleep 0.5 && touch ~/.config/quickshell/ii/shell.qml
|
# exec-once = sleep 3.5 && hyprctl reload && sleep 0.5 && touch ~/.config/quickshell/ii/shell.qml
|
||||||
|
|
||||||
# For fedora to setup polkit
|
# For fedora to setup polkit
|
||||||
exec-once = /usr/libexec/kf6/polkit-kde-authentication-agent-1
|
exec-once = /usr/libexec/kf6/polkit-kde-authentication-agent-1
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
# Theming
|
||||||
|
include ~/.local/state/quickshell/user/generated/terminal/kitty-theme.conf
|
||||||
|
|
||||||
# Font
|
# Font
|
||||||
font_family JetBrains Mono Nerd Font
|
font_family JetBrains Mono Nerd Font
|
||||||
font_size 11.0
|
font_size 11.0
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="#000000">
|
||||||
|
<path d="M20 5C20.5523 5 21 5.44735 21 5.99917V19.0008C21 19.5527 20.5523 20 20 20C19.4477 20 19 19.5527 19 19.0008V5.99917C19 5.44735 19.4477 5 20 5ZM16 8C16.5523 8 17 8.44567 17 8.99543V19.0046C17 19.5543 16.5523 20 16 20C15.4477 20 15 19.5543 15 19.0046V8.99543C15 8.44567 15.4477 8 16 8ZM12 11C12.5523 11 13 11.4477 13 12V19C13 19.5523 12.5523 20 12 20C11.4477 20 11 19.5523 11 19V12C11 11.4477 11.4477 11 12 11ZM8 14C8.55228 14 9 14.4451 9 14.9942V19.0058C9 19.5549 8.55228 20 8 20C7.44772 20 7 19.5549 7 19.0058V14.9942C7 14.4451 7.44772 14 8 14ZM4 17C4.55228 17 5 17.4403 5 17.9836V19.0164C5 19.5597 4.55228 20 4 20C3.44772 20 3 19.5597 3 19.0164V17.9836C3 17.4403 3.44772 17 4 17Z" fill="#000000"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 851 B |
@@ -19,22 +19,17 @@ DockButton {
|
|||||||
|
|
||||||
readonly property bool isSeparator: appToplevel.appId === "SEPARATOR"
|
readonly property bool isSeparator: appToplevel.appId === "SEPARATOR"
|
||||||
property var desktopEntry: DesktopEntries.heuristicLookup(appToplevel.appId)
|
property var desktopEntry: DesktopEntries.heuristicLookup(appToplevel.appId)
|
||||||
|
|
||||||
Timer {
|
|
||||||
// Retry looking up the desktop entry if it failed (e.g. database not loaded yet)
|
|
||||||
property int retryCount: 5
|
|
||||||
interval: 1000
|
|
||||||
running: !root.isSeparator && root.desktopEntry === null && retryCount > 0
|
|
||||||
repeat: true
|
|
||||||
onTriggered: {
|
|
||||||
retryCount--;
|
|
||||||
root.desktopEntry = DesktopEntries.heuristicLookup(root.appToplevel.appId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
enabled: !isSeparator
|
enabled: !isSeparator
|
||||||
implicitWidth: isSeparator ? 1 : implicitHeight - topInset - bottomInset
|
implicitWidth: isSeparator ? 1 : implicitHeight - topInset - bottomInset
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: DesktopEntries
|
||||||
|
|
||||||
|
function onApplicationsChanged() {
|
||||||
|
root.desktopEntry = DesktopEntries.heuristicLookup(appToplevel.appId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
active: isSeparator
|
active: isSeparator
|
||||||
anchors {
|
anchors {
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ Item { // Player instance
|
|||||||
id: coverArtDownloader
|
id: coverArtDownloader
|
||||||
property string targetFile: root.artUrl
|
property string targetFile: root.artUrl
|
||||||
property string artFilePath: root.artFilePath
|
property string artFilePath: root.artFilePath
|
||||||
command: [ "bash", "-c", `[ -f ${artFilePath} ] || curl -sSL '${targetFile}' -o '${artFilePath}'` ]
|
command: [ "bash", "-c", `[ -f ${artFilePath} ] || curl -4 -sSL '${targetFile}' -o '${artFilePath}'` ]
|
||||||
onExited: (exitCode, exitStatus) => {
|
onExited: (exitCode, exitStatus) => {
|
||||||
root.downloaded = true
|
root.downloaded = true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ import Quickshell
|
|||||||
Singleton {
|
Singleton {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
|
signal requestCenter(string identifier)
|
||||||
|
|
||||||
readonly property list<var> availableWidgets: [
|
readonly property list<var> availableWidgets: [
|
||||||
{ identifier: "crosshair", materialSymbol: "point_scan" },
|
{ identifier: "crosshair", materialSymbol: "point_scan" },
|
||||||
{ identifier: "fpsLimiter", materialSymbol: "animation" },
|
{ identifier: "fpsLimiter", materialSymbol: "animation" },
|
||||||
|
|||||||
@@ -119,6 +119,7 @@ Rectangle {
|
|||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
|
|
||||||
toggled: Persistent.states.overlay.open.includes(identifier)
|
toggled: Persistent.states.overlay.open.includes(identifier)
|
||||||
|
altAction: () => OverlayContext.requestCenter(identifier)
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (widgetButton.toggled) {
|
if (widgetButton.toggled) {
|
||||||
Persistent.states.overlay.open = Persistent.states.overlay.open.filter(type => type !== identifier);
|
Persistent.states.overlay.open = Persistent.states.overlay.open.filter(type => type !== identifier);
|
||||||
|
|||||||
@@ -105,6 +105,15 @@ AbstractOverlayWidget {
|
|||||||
reportClickableState();
|
reportClickableState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: OverlayContext
|
||||||
|
function onRequestCenter(identifier) {
|
||||||
|
if (identifier === root.identifier) {
|
||||||
|
root.center()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Hooks
|
// Hooks
|
||||||
onPressed: (event) => {
|
onPressed: (event) => {
|
||||||
// We're only interested in handling resize here
|
// We're only interested in handling resize here
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ Item {
|
|||||||
|
|
||||||
Process {
|
Process {
|
||||||
id: translateProc
|
id: translateProc
|
||||||
command: ["bash", "-c", `trans -brief`
|
command: ["bash", "-c", `trans -brief -no-bidi`
|
||||||
+ ` -source '${StringUtils.shellSingleQuoteEscape(root.sourceLanguage)}'`
|
+ ` -source '${StringUtils.shellSingleQuoteEscape(root.sourceLanguage)}'`
|
||||||
+ ` -target '${StringUtils.shellSingleQuoteEscape(root.targetLanguage)}'`
|
+ ` -target '${StringUtils.shellSingleQuoteEscape(root.targetLanguage)}'`
|
||||||
+ ` '${StringUtils.shellSingleQuoteEscape(root.inputField.text.trim())}'`]
|
+ ` '${StringUtils.shellSingleQuoteEscape(root.inputField.text.trim())}'`]
|
||||||
|
|||||||
@@ -27,7 +27,22 @@ IFS=$'\n'
|
|||||||
colorlist=($colornames) # Array of color names
|
colorlist=($colornames) # Array of color names
|
||||||
colorvalues=($colorstrings) # Array of color values
|
colorvalues=($colorstrings) # Array of color values
|
||||||
|
|
||||||
apply_term() {
|
apply_kitty() {
|
||||||
|
# Check if terminal escape sequence template exists
|
||||||
|
if [ ! -f "$SCRIPT_DIR/terminal/kitty-theme.conf" ]; then
|
||||||
|
echo "Template file not found for Kitty theme. Skipping that."
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
# Copy template
|
||||||
|
mkdir -p "$STATE_DIR"/user/generated/terminal
|
||||||
|
cp "$SCRIPT_DIR/terminal/kitty-theme.conf" "$STATE_DIR"/user/generated/terminal/kitty-theme.conf
|
||||||
|
# Apply colors
|
||||||
|
for i in "${!colorlist[@]}"; do
|
||||||
|
sed -i "s/${colorlist[$i]} #/${colorvalues[$i]#\#}/g" "$STATE_DIR"/user/generated/terminal/kitty-theme.conf
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
apply_anyterm() {
|
||||||
# Check if terminal escape sequence template exists
|
# Check if terminal escape sequence template exists
|
||||||
if [ ! -f "$SCRIPT_DIR/terminal/sequences.txt" ]; then
|
if [ ! -f "$SCRIPT_DIR/terminal/sequences.txt" ]; then
|
||||||
echo "Template file not found for Terminal. Skipping that."
|
echo "Template file not found for Terminal. Skipping that."
|
||||||
@@ -52,6 +67,11 @@ apply_term() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
apply_term() {
|
||||||
|
apply_kitty
|
||||||
|
apply_anyterm
|
||||||
|
}
|
||||||
|
|
||||||
apply_qt() {
|
apply_qt() {
|
||||||
sh "$CONFIG_DIR/scripts/kvantum/materialQT.sh" # generate kvantum theme
|
sh "$CONFIG_DIR/scripts/kvantum/materialQT.sh" # generate kvantum theme
|
||||||
python "$CONFIG_DIR/scripts/kvantum/changeAdwColors.py" # apply config colors
|
python "$CONFIG_DIR/scripts/kvantum/changeAdwColors.py" # apply config colors
|
||||||
|
|||||||
@@ -181,8 +181,10 @@ switch() {
|
|||||||
cursorposy=$(bc <<< "scale=0; ($cursorposy - $screeny) * $scale / 1")
|
cursorposy=$(bc <<< "scale=0; ($cursorposy - $screeny) * $scale / 1")
|
||||||
cursorposy_inverted=$((screensizey - cursorposy))
|
cursorposy_inverted=$((screensizey - cursorposy))
|
||||||
|
|
||||||
|
matugen_args=(--source-color-index 0)
|
||||||
|
|
||||||
if [[ "$color_flag" == "1" ]]; then
|
if [[ "$color_flag" == "1" ]]; then
|
||||||
matugen_args=(color hex "$color")
|
matugen_args+=(color hex "$color")
|
||||||
generate_colors_material_args=(--color "$color")
|
generate_colors_material_args=(--color "$color")
|
||||||
else
|
else
|
||||||
if [[ -z "$imgpath" ]]; then
|
if [[ -z "$imgpath" ]]; then
|
||||||
@@ -240,7 +242,7 @@ switch() {
|
|||||||
set_thumbnail_path "$thumbnail"
|
set_thumbnail_path "$thumbnail"
|
||||||
|
|
||||||
if [ -f "$thumbnail" ]; then
|
if [ -f "$thumbnail" ]; then
|
||||||
matugen_args=(image "$thumbnail")
|
matugen_args+=(image "$thumbnail")
|
||||||
generate_colors_material_args=(--path "$thumbnail")
|
generate_colors_material_args=(--path "$thumbnail")
|
||||||
create_restore_script "$video_path"
|
create_restore_script "$video_path"
|
||||||
else
|
else
|
||||||
@@ -249,7 +251,7 @@ switch() {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
matugen_args=(image "$imgpath")
|
matugen_args+=(image "$imgpath")
|
||||||
generate_colors_material_args=(--path "$imgpath")
|
generate_colors_material_args=(--path "$imgpath")
|
||||||
# Update wallpaper path in config
|
# Update wallpaper path in config
|
||||||
set_wallpaper_path "$imgpath"
|
set_wallpaper_path "$imgpath"
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
background #$term0 #
|
||||||
|
|
||||||
|
color0 #$term0 #
|
||||||
|
color1 #$term1 #
|
||||||
|
color2 #$term2 #
|
||||||
|
color3 #$term3 #
|
||||||
|
color4 #$term4 #
|
||||||
|
color5 #$term5 #
|
||||||
|
color6 #$term6 #
|
||||||
|
color7 #$term7 #
|
||||||
|
color8 #$term8 #
|
||||||
|
color9 #$term9 #
|
||||||
|
color10 #$term10 #
|
||||||
|
color11 #$term11 #
|
||||||
|
color12 #$term12 #
|
||||||
|
color13 #$term13 #
|
||||||
|
color14 #$term14 #
|
||||||
|
color15 #$term15 #
|
||||||
|
|
||||||
|
color232 #$term7 #
|
||||||
|
|
||||||
|
cursor #$term7 #
|
||||||
|
|
||||||
|
foreground #$term7 #
|
||||||
|
|
||||||
|
selection_background #$term7 #
|
||||||
|
selection_foreground #$term0 #
|
||||||
@@ -36,7 +36,7 @@ urlencode() {
|
|||||||
for ((i=0; i<${#str}; i++)); do
|
for ((i=0; i<${#str}; i++)); do
|
||||||
c="${str:$i:1}"
|
c="${str:$i:1}"
|
||||||
case "$c" in
|
case "$c" in
|
||||||
[a-zA-Z0-9.~_-]|/) encoded+="$c" ;;
|
[a-zA-Z0-9.~_-]|/|'('|')'|'*') encoded+="$c" ;;
|
||||||
*) printf -v hex '%%%02X' "'${c}'"; encoded+="$hex" ;;
|
*) printf -v hex '%%%02X' "'${c}'"; encoded+="$hex" ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -305,14 +305,18 @@ Singleton {
|
|||||||
}
|
}
|
||||||
property ApiStrategy currentApiStrategy: apiStrategies[models[currentModelId]?.api_format || "openai"]
|
property ApiStrategy currentApiStrategy: apiStrategies[models[currentModelId]?.api_format || "openai"]
|
||||||
|
|
||||||
|
function addUserModels() {
|
||||||
|
(Config?.options.ai?.extraModels ?? []).forEach(model => {
|
||||||
|
const safeModelName = root.safeModelName(model["model"]);
|
||||||
|
root.addModel(safeModelName, model)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: Config
|
target: Config
|
||||||
function onReadyChanged() {
|
function onReadyChanged() {
|
||||||
if (!Config.ready) return;
|
if (!Config.ready) return;
|
||||||
(Config?.options.ai?.extraModels ?? []).forEach(model => {
|
root.addUserModels()
|
||||||
const safeModelName = root.safeModelName(model["model"]);
|
|
||||||
root.addModel(safeModelName, model)
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -321,6 +325,7 @@ Singleton {
|
|||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
setModel(currentModelId, false, false); // Do necessary setup for model
|
setModel(currentModelId, false, false); // Do necessary setup for model
|
||||||
|
root.addUserModels() // Config onReadyChanged above might not fire if config is loaded before this service
|
||||||
}
|
}
|
||||||
|
|
||||||
function guessModelLogo(model) {
|
function guessModelLogo(model) {
|
||||||
@@ -345,7 +350,9 @@ Singleton {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function addModel(modelName, data) {
|
function addModel(modelName, data) {
|
||||||
root.models[modelName] = aiModelComponent.createObject(this, data);
|
root.models = Object.assign({}, root.models, {
|
||||||
|
[modelName]: aiModelComponent.createObject(this, data)
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Process {
|
Process {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -85,7 +85,7 @@ install-python-packages(){
|
|||||||
ILLOGICAL_IMPULSE_VIRTUAL_ENV=$XDG_STATE_HOME/quickshell/.venv
|
ILLOGICAL_IMPULSE_VIRTUAL_ENV=$XDG_STATE_HOME/quickshell/.venv
|
||||||
x mkdir -p $(eval echo $ILLOGICAL_IMPULSE_VIRTUAL_ENV)
|
x mkdir -p $(eval echo $ILLOGICAL_IMPULSE_VIRTUAL_ENV)
|
||||||
# we need python 3.12 https://github.com/python-pillow/Pillow/issues/8089
|
# we need python 3.12 https://github.com/python-pillow/Pillow/issues/8089
|
||||||
x uv venv --prompt .venv $(eval echo $ILLOGICAL_IMPULSE_VIRTUAL_ENV) -p 3.12
|
try uv venv --prompt .venv $(eval echo $ILLOGICAL_IMPULSE_VIRTUAL_ENV) -p 3.12
|
||||||
x source $(eval echo $ILLOGICAL_IMPULSE_VIRTUAL_ENV)/bin/activate
|
x source $(eval echo $ILLOGICAL_IMPULSE_VIRTUAL_ENV)/bin/activate
|
||||||
if [[ "$INSTALL_VIA_NIX" = true ]]; then
|
if [[ "$INSTALL_VIA_NIX" = true ]]; then
|
||||||
x nix-shell ${REPO_ROOT}/sdata/uv/shell.nix --run "uv pip install -r ${REPO_ROOT}/sdata/uv/requirements.txt"
|
x nix-shell ${REPO_ROOT}/sdata/uv/shell.nix --run "uv pip install -r ${REPO_ROOT}/sdata/uv/requirements.txt"
|
||||||
|
|||||||
Reference in New Issue
Block a user