better stow (vielleicht :/
This commit is contained in:
61 files changed
+139
-19
No files matched your search
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1 @@
|
||||
.alt/ghostty-default
|
||||
@@ -0,0 +1 @@
|
||||
.alt/ghostty-niri
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1 @@
|
||||
.alt/kitty-default
|
||||
@@ -0,0 +1 @@
|
||||
.alt/kitty-niri
|
||||
File renamed without changes.
@@ -295,7 +295,7 @@ screenshot-path "~/Pictures/Screenshots/.niri_screenshot.png"
|
||||
binds {
|
||||
// Apps
|
||||
Mod+C { spawn-sh "code --password-store=gnome-libsecret"; }
|
||||
Mod+E { spawn-sh "nautilus --new-window"; }
|
||||
Mod+E { spawn-sh "dolphin --new-window"; }
|
||||
Mod+W { spawn-sh "zen || zen-browser"; }
|
||||
Mod+X { spawn "gnome-text-editor" "--new-window"; }
|
||||
Mod+B { spawn-sh "pkill -x -n btop || ghostty -e btop"; }
|
||||
|
||||
@@ -1,27 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
path="$(dirname "$(readlink -f "$0")")"
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
desktop="$XDG_CURRENT_DESKTOP"
|
||||
else
|
||||
desktop="$1"
|
||||
fi
|
||||
|
||||
config_path="$path/../../.."
|
||||
|
||||
for item in "kitty" "ghostty" "wlogout"; do
|
||||
for target in "$item" "$item-niri"; do
|
||||
if [ ! -L "$HOME/.config/$target" ] && [ -e "$HOME/.config/$target" ]; then
|
||||
echo "Error: $HOME/.config/$target exists and is not a symlink." >&2
|
||||
if [ ! -L "$HOME/.config/$item" ] && [ -e "$HOME/.config/$item" ]; then
|
||||
echo "Error: $HOME/.config/$item exists and is not a symlink." >&2
|
||||
exit 1
|
||||
elif [ -L "$HOME/.config/$item" ]; then
|
||||
rm "$HOME/.config/$item" || {
|
||||
echo "Error: Failed to remove existing symlink $HOME/.config/$item." >&2
|
||||
exit 1
|
||||
fi
|
||||
stow -t "$HOME" -d "$config_path" -D "$target"
|
||||
done
|
||||
}
|
||||
fi
|
||||
|
||||
if [ "$desktop" = "niri" ] || [ "$desktop" = "GNOME" ]; then
|
||||
stow -t "$HOME" -d "$config_path" "$item-niri"
|
||||
if [ -e "$HOME/.config/.alt/${item}-niri" ]; then
|
||||
ln -svf ".alt/${item}-niri" "$HOME/.config/$item"
|
||||
elif [ -e "$HOME/.config/.alt/${item}-default" ]; then
|
||||
ln -svf ".alt/${item}-default" "$HOME/.config/$item"
|
||||
fi
|
||||
else
|
||||
stow -t "$HOME" -d "$config_path" "$item"
|
||||
[ -e "$HOME/.config/.alt/${item}-default" ] && ln -svf ".alt/${item}-default" "$HOME/.config/$item"
|
||||
fi
|
||||
done
|
||||
@@ -11,6 +11,7 @@ from shutil import copy2
|
||||
|
||||
# autopep8: off
|
||||
import gi
|
||||
|
||||
gi.require_version("Notify", "0.7")
|
||||
from gi.repository import Notify, GLib
|
||||
# autopep8: on
|
||||
@@ -50,9 +51,9 @@ def take_screenshot(filepath: Path, typeStr: str):
|
||||
wait_until_file_exists(filepath)
|
||||
elif "niri" in currentDesktop:
|
||||
cmd = {
|
||||
ScreenshotType.FULL: f"niri msg action screenshot-screen",
|
||||
ScreenshotType.AREA: f"niri msg action screenshot",
|
||||
ScreenshotType.WINDOW: f"niri msg action screenshot-window",
|
||||
ScreenshotType.FULL: "niri msg action screenshot-screen",
|
||||
ScreenshotType.AREA: "niri msg action screenshot",
|
||||
ScreenshotType.WINDOW: "niri msg action screenshot-window",
|
||||
}
|
||||
niriScreenshotPath = SCREENSHOT_DIR / ".niri_screenshot.png"
|
||||
if niriScreenshotPath.exists():
|
||||
@@ -77,6 +78,7 @@ def take_screenshot(filepath: Path, typeStr: str):
|
||||
|
||||
def edit_screenshot(filepath: Path):
|
||||
subprocess.run(f"gradia {filepath}", shell=True)
|
||||
# subprocess.run(f"spectacle -l --edit-existing {filepath}", shell=True)
|
||||
|
||||
|
||||
def file_name(dir: Path, prefix="screenshot", ext=".png"):
|
||||
@@ -131,7 +133,7 @@ if __name__ == "__main__":
|
||||
n = Notify.Notification.new(
|
||||
"Screenshot taken",
|
||||
# Mako doesn't have action buttons displayed with notification cards,
|
||||
"Click to edit"
|
||||
"Click to edit",
|
||||
)
|
||||
n.add_action(
|
||||
# so default action is used here, which will be triggered on clicking the notification card
|
||||
@@ -139,7 +141,7 @@ if __name__ == "__main__":
|
||||
# But for my (or to be precise, Noctalia's) quickshell config, buttons will be displayed with label
|
||||
"Open in Editor",
|
||||
edit_callback,
|
||||
None
|
||||
None,
|
||||
)
|
||||
|
||||
# set timeout for close_callback
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1 @@
|
||||
--target=~
|
||||
Submodule config/wallpaper/Pictures/backgrounds updated: 8ac0f58922...cbe612b64b.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1 @@
|
||||
.alt/wlogout-default
|
||||
@@ -0,0 +1 @@
|
||||
.alt/wlogout-niri
|
||||
Reference in new issue
Block a user