From 778a5f259a2d8054d5a6144624cce70b1b1b1898 Mon Sep 17 00:00:00 2001 From: vanten-s Date: Sat, 26 Oct 2024 19:55:54 +0200 Subject: [PATCH] added stuff --- configuration.nix | 1 + dotfiles/hypr/hyprland.conf | 2 ++ dotfiles/scripts/down.sh | 18 ++++++++++++++++++ dotfiles/scripts/up.sh | 6 ++++++ home.nix | 3 +++ 5 files changed, 30 insertions(+) create mode 100755 dotfiles/scripts/down.sh create mode 100755 dotfiles/scripts/up.sh diff --git a/configuration.nix b/configuration.nix index 913a10b..57c9ce5 100644 --- a/configuration.nix +++ b/configuration.nix @@ -155,6 +155,7 @@ in { cifs-utils ffmpeg pulsemixer + wineWowPackages.staging xorg.xhost swaybg swww diff --git a/dotfiles/hypr/hyprland.conf b/dotfiles/hypr/hyprland.conf index d6ab97c..2e98667 100644 --- a/dotfiles/hypr/hyprland.conf +++ b/dotfiles/hypr/hyprland.conf @@ -116,6 +116,8 @@ bind = $mainMod, D, exec, dmenu_path | fuzzel -d | sh bind = $mainMod SHIFT, P, exec, ~/scripts/password-select.sh bind = $mainMod SHIFT, U, exec, ~/scripts/usernames.sh bind = $mainMod SHIFT, O, exec, ~/scripts/otp.sh +bind = $mainMod SHIFT, D, exec, ~/scripts/down.sh +bind = $mainMod, U, exec, ~/scripts/up.sh bind = $mainMod SHIFT, L, exec, hyprlock bind = $mainMod SHIFT, S, exec, grimblast save area ss.png && wl-copy < ss.png bind = $mainMod SHIFT, R, forcerendererreload diff --git a/dotfiles/scripts/down.sh b/dotfiles/scripts/down.sh new file mode 100755 index 0000000..74d3df0 --- /dev/null +++ b/dotfiles/scripts/down.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +if [ -z "$(sudo wg)" ]; then + exit +fi + +TEXT=$(sudo wg | head -n1) + +readarray -d ": " -t strarr <<< "$TEXT" + +INTERFACE=${strarr[1]} + +echo $INTERFACE > /tmp/interface + +sudo wg-quick down $INTERFACE + +notify-send "Deactivated interface $(cat /tmp/interface)" + diff --git a/dotfiles/scripts/up.sh b/dotfiles/scripts/up.sh new file mode 100755 index 0000000..76f95af --- /dev/null +++ b/dotfiles/scripts/up.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +sudo wg-quick up $(cat /tmp/interface) + +notify-send "Activated interface $(cat /tmp/interface)" + diff --git a/home.nix b/home.nix index a984d77..67bc6ba 100644 --- a/home.nix +++ b/home.nix @@ -15,11 +15,13 @@ home.packages = with pkgs; [ fortune + libnotify mako kdePackages.kalgebra libreoffice htop ripgrep + chromium xwaylandvideobridge qtpass pipewire @@ -48,6 +50,7 @@ steam libei hyprlock + inkscape waypaper ];