mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 23:09:26 -05:00
Merge branch 'end-4:main' into parallax
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
# Theming
|
||||
include ~/.local/state/quickshell/user/generated/terminal/kitty-theme.conf
|
||||
|
||||
# Font
|
||||
font_family JetBrains Mono Nerd Font
|
||||
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"
|
||||
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
|
||||
implicitWidth: isSeparator ? 1 : implicitHeight - topInset - bottomInset
|
||||
|
||||
Connections {
|
||||
target: DesktopEntries
|
||||
|
||||
function onApplicationsChanged() {
|
||||
root.desktopEntry = DesktopEntries.heuristicLookup(appToplevel.appId);
|
||||
}
|
||||
}
|
||||
|
||||
Loader {
|
||||
active: isSeparator
|
||||
anchors {
|
||||
|
||||
@@ -77,7 +77,7 @@ Item { // Player instance
|
||||
id: coverArtDownloader
|
||||
property string targetFile: root.artUrl
|
||||
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) => {
|
||||
root.downloaded = true
|
||||
}
|
||||
|
||||
@@ -5,6 +5,8 @@ import Quickshell
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
signal requestCenter(string identifier)
|
||||
|
||||
readonly property list<var> availableWidgets: [
|
||||
{ identifier: "crosshair", materialSymbol: "point_scan" },
|
||||
{ identifier: "fpsLimiter", materialSymbol: "animation" },
|
||||
|
||||
@@ -119,6 +119,7 @@ Rectangle {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
|
||||
toggled: Persistent.states.overlay.open.includes(identifier)
|
||||
altAction: () => OverlayContext.requestCenter(identifier)
|
||||
onClicked: {
|
||||
if (widgetButton.toggled) {
|
||||
Persistent.states.overlay.open = Persistent.states.overlay.open.filter(type => type !== identifier);
|
||||
|
||||
@@ -105,6 +105,15 @@ AbstractOverlayWidget {
|
||||
reportClickableState();
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: OverlayContext
|
||||
function onRequestCenter(identifier) {
|
||||
if (identifier === root.identifier) {
|
||||
root.center()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Hooks
|
||||
onPressed: (event) => {
|
||||
// We're only interested in handling resize here
|
||||
|
||||
@@ -63,7 +63,7 @@ Item {
|
||||
|
||||
Process {
|
||||
id: translateProc
|
||||
command: ["bash", "-c", `trans -brief`
|
||||
command: ["bash", "-c", `trans -brief -no-bidi`
|
||||
+ ` -source '${StringUtils.shellSingleQuoteEscape(root.sourceLanguage)}'`
|
||||
+ ` -target '${StringUtils.shellSingleQuoteEscape(root.targetLanguage)}'`
|
||||
+ ` '${StringUtils.shellSingleQuoteEscape(root.inputField.text.trim())}'`]
|
||||
|
||||
@@ -27,7 +27,22 @@ IFS=$'\n'
|
||||
colorlist=($colornames) # Array of color names
|
||||
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
|
||||
if [ ! -f "$SCRIPT_DIR/terminal/sequences.txt" ]; then
|
||||
echo "Template file not found for Terminal. Skipping that."
|
||||
@@ -52,6 +67,11 @@ apply_term() {
|
||||
done
|
||||
}
|
||||
|
||||
apply_term() {
|
||||
apply_kitty
|
||||
apply_anyterm
|
||||
}
|
||||
|
||||
apply_qt() {
|
||||
sh "$CONFIG_DIR/scripts/kvantum/materialQT.sh" # generate kvantum theme
|
||||
python "$CONFIG_DIR/scripts/kvantum/changeAdwColors.py" # apply config colors
|
||||
|
||||
@@ -181,8 +181,10 @@ switch() {
|
||||
cursorposy=$(bc <<< "scale=0; ($cursorposy - $screeny) * $scale / 1")
|
||||
cursorposy_inverted=$((screensizey - cursorposy))
|
||||
|
||||
matugen_args=(--source-color-index 0)
|
||||
|
||||
if [[ "$color_flag" == "1" ]]; then
|
||||
matugen_args=(color hex "$color")
|
||||
matugen_args+=(color hex "$color")
|
||||
generate_colors_material_args=(--color "$color")
|
||||
else
|
||||
if [[ -z "$imgpath" ]]; then
|
||||
@@ -240,7 +242,7 @@ switch() {
|
||||
set_thumbnail_path "$thumbnail"
|
||||
|
||||
if [ -f "$thumbnail" ]; then
|
||||
matugen_args=(image "$thumbnail")
|
||||
matugen_args+=(image "$thumbnail")
|
||||
generate_colors_material_args=(--path "$thumbnail")
|
||||
create_restore_script "$video_path"
|
||||
else
|
||||
@@ -249,7 +251,7 @@ switch() {
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
matugen_args=(image "$imgpath")
|
||||
matugen_args+=(image "$imgpath")
|
||||
generate_colors_material_args=(--path "$imgpath")
|
||||
# Update wallpaper path in config
|
||||
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
|
||||
c="${str:$i:1}"
|
||||
case "$c" in
|
||||
[a-zA-Z0-9.~_-]|/) encoded+="$c" ;;
|
||||
[a-zA-Z0-9.~_-]|/|'('|')'|'*') encoded+="$c" ;;
|
||||
*) printf -v hex '%%%02X' "'${c}'"; encoded+="$hex" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
@@ -305,14 +305,18 @@ Singleton {
|
||||
}
|
||||
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 {
|
||||
target: Config
|
||||
function onReadyChanged() {
|
||||
if (!Config.ready) return;
|
||||
(Config?.options.ai?.extraModels ?? []).forEach(model => {
|
||||
const safeModelName = root.safeModelName(model["model"]);
|
||||
root.addModel(safeModelName, model)
|
||||
});
|
||||
root.addUserModels()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -321,6 +325,7 @@ Singleton {
|
||||
|
||||
Component.onCompleted: {
|
||||
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) {
|
||||
@@ -345,7 +350,9 @@ Singleton {
|
||||
}
|
||||
|
||||
function addModel(modelName, data) {
|
||||
root.models[modelName] = aiModelComponent.createObject(this, data);
|
||||
root.models = Object.assign({}, root.models, {
|
||||
[modelName]: aiModelComponent.createObject(this, data)
|
||||
});
|
||||
}
|
||||
|
||||
Process {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user