Merge branch 'dev' into rc
This commit is contained in:
@@ -72,8 +72,8 @@
|
|||||||
"format-wifi": "{icon}",
|
"format-wifi": "{icon}",
|
||||||
"format-ethernet": "",
|
"format-ethernet": "",
|
||||||
"format-disconnected": "",
|
"format-disconnected": "",
|
||||||
"tooltip-format-wifi": "{essid} ({frequency} GHz)\n⇣{bandwidthDownBytes} ⇡{bandwidthUpBytes}",
|
"tooltip-format-wifi": "{essid} ({frequency} GHz)",
|
||||||
"tooltip-format-ethernet": "⇣{bandwidthDownBytes} ⇡{bandwidthUpBytes}",
|
"tooltip-format-ethernet": "Connected",
|
||||||
"tooltip-format-disconnected": "Disconnected",
|
"tooltip-format-disconnected": "Disconnected",
|
||||||
"interval": 3,
|
"interval": 3,
|
||||||
"spacing": 1,
|
"spacing": 1,
|
||||||
|
|||||||
@@ -0,0 +1,84 @@
|
|||||||
|
import os
|
||||||
|
import shutil
|
||||||
|
|
||||||
|
from gi import require_version
|
||||||
|
|
||||||
|
require_version("Nautilus", "4.1")
|
||||||
|
|
||||||
|
from gi.repository import GObject, Gio, Nautilus
|
||||||
|
|
||||||
|
|
||||||
|
class SendViaLocalSendAction(GObject.GObject, Nautilus.MenuProvider):
|
||||||
|
def _launch_localsend(self, paths):
|
||||||
|
command = self._resolve_command()
|
||||||
|
if not command:
|
||||||
|
return
|
||||||
|
|
||||||
|
if command[-1] == "@@":
|
||||||
|
command = command + paths + ["@@"]
|
||||||
|
else:
|
||||||
|
command = command + paths
|
||||||
|
|
||||||
|
Gio.Subprocess.new(command, Gio.SubprocessFlags.NONE)
|
||||||
|
|
||||||
|
def _resolve_command(self):
|
||||||
|
localsend = shutil.which("localsend")
|
||||||
|
if localsend:
|
||||||
|
return [localsend, "--headless", "send"]
|
||||||
|
|
||||||
|
flatpak = shutil.which("flatpak")
|
||||||
|
if flatpak and self._has_flatpak_app(flatpak, "org.localsend.localsend_app"):
|
||||||
|
return [
|
||||||
|
flatpak,
|
||||||
|
"run",
|
||||||
|
"--file-forwarding",
|
||||||
|
"org.localsend.localsend_app",
|
||||||
|
"@@",
|
||||||
|
]
|
||||||
|
|
||||||
|
return None
|
||||||
|
|
||||||
|
def _has_flatpak_app(self, flatpak, app_id):
|
||||||
|
process = Gio.Subprocess.new(
|
||||||
|
[flatpak, "info", app_id],
|
||||||
|
Gio.SubprocessFlags.STDOUT_SILENCE | Gio.SubprocessFlags.STDERR_SILENCE,
|
||||||
|
)
|
||||||
|
return process.wait_check()
|
||||||
|
|
||||||
|
def _selected_paths(self, files):
|
||||||
|
paths = []
|
||||||
|
|
||||||
|
for file in files:
|
||||||
|
location = file.get_location()
|
||||||
|
if not location:
|
||||||
|
continue
|
||||||
|
|
||||||
|
path = location.get_path()
|
||||||
|
if path and path not in paths:
|
||||||
|
paths.append(path)
|
||||||
|
|
||||||
|
return paths
|
||||||
|
|
||||||
|
def _make_item(self, paths):
|
||||||
|
label = (
|
||||||
|
"Send via LocalSend" if len(paths) == 1 else "Send selected via LocalSend"
|
||||||
|
)
|
||||||
|
item = Nautilus.MenuItem(
|
||||||
|
name="LocalSendNautilus::send_via_localsend",
|
||||||
|
label=label,
|
||||||
|
icon="localsend",
|
||||||
|
)
|
||||||
|
item.connect("activate", self._on_activate, paths)
|
||||||
|
return item
|
||||||
|
|
||||||
|
def _on_activate(self, _menu, paths):
|
||||||
|
self._launch_localsend(paths)
|
||||||
|
|
||||||
|
def get_file_items(self, *args):
|
||||||
|
files = args[0] if len(args) == 1 else args[1]
|
||||||
|
paths = self._selected_paths(files)
|
||||||
|
|
||||||
|
if not paths or not self._resolve_command():
|
||||||
|
return []
|
||||||
|
|
||||||
|
return [self._make_item(paths)]
|
||||||
@@ -29,5 +29,4 @@ if [[ $1 == "post" ]]; then
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
) &
|
) &
|
||||||
disown
|
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ run_logged $OMARCHY_INSTALL/config/mise-work.sh
|
|||||||
run_logged $OMARCHY_INSTALL/config/fix-powerprofilesctl-shebang.sh
|
run_logged $OMARCHY_INSTALL/config/fix-powerprofilesctl-shebang.sh
|
||||||
run_logged $OMARCHY_INSTALL/config/docker.sh
|
run_logged $OMARCHY_INSTALL/config/docker.sh
|
||||||
run_logged $OMARCHY_INSTALL/config/mimetypes.sh
|
run_logged $OMARCHY_INSTALL/config/mimetypes.sh
|
||||||
|
run_logged $OMARCHY_INSTALL/config/nautilus-python.sh
|
||||||
run_logged $OMARCHY_INSTALL/config/remove-fcitx5-autostart.sh
|
run_logged $OMARCHY_INSTALL/config/remove-fcitx5-autostart.sh
|
||||||
run_logged $OMARCHY_INSTALL/config/localdb.sh
|
run_logged $OMARCHY_INSTALL/config/localdb.sh
|
||||||
run_logged $OMARCHY_INSTALL/config/walker-elephant.sh
|
run_logged $OMARCHY_INSTALL/config/walker-elephant.sh
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
# Install Intel Low Power Mode package for Intel CPUs
|
# Install Intel Low Power Mode Daemon for supported hybrid Intel CPUs (Alder Lake and newer)
|
||||||
|
# Supported models: Alder Lake (151/154), Raptor Lake (183/186/191),
|
||||||
|
# Meteor Lake (170/172), Lunar Lake (189), Panther Lake (204)
|
||||||
|
|
||||||
if omarchy-hw-intel; then
|
if omarchy-hw-intel && omarchy-battery-present; then
|
||||||
omarchy-pkg-add intel-lpmd
|
cpu_model=$(grep -m1 "^model\s*:" /proc/cpuinfo 2>/dev/null | cut -d: -f2 | tr -d ' ')
|
||||||
|
if [[ "$cpu_model" =~ ^(151|154|170|172|183|186|189|191|204)$ ]]; then
|
||||||
|
omarchy-pkg-add intel-lpmd
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
EXTENSIONS_DIR="$HOME/.local/share/nautilus-python/extensions"
|
||||||
|
|
||||||
|
mkdir -p "$EXTENSIONS_DIR"
|
||||||
|
cp "$OMARCHY_PATH/default/nautilus-python/extensions/localsend.py" "$EXTENSIONS_DIR/"
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
echo "Add LocalSend entry to Nautilus context menu"
|
||||||
|
|
||||||
|
source $OMARCHY_PATH/install/config/nautilus-python.sh
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
echo "Remove misleading waybar network transfer speeds"
|
||||||
|
|
||||||
|
if grep -q "bandwidthDownBytes" ~/.config/waybar/config.jsonc; then
|
||||||
|
sed -i 's/"tooltip-format-wifi": "{essid} ({frequency} GHz)\\n⇣{bandwidthDownBytes} ⇡{bandwidthUpBytes}"/"tooltip-format-wifi": "{essid} ({frequency} GHz)"/' ~/.config/waybar/config.jsonc
|
||||||
|
sed -i 's/"tooltip-format-ethernet": "⇣{bandwidthDownBytes} ⇡{bandwidthUpBytes}"/"tooltip-format-ethernet": "Connected"/' ~/.config/waybar/config.jsonc
|
||||||
|
omarchy-restart-waybar
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user