diff --git a/home/hyprland/hyprpaper.conf b/home/hyprland/hyprpaper.conf index 77dc0e3..4cf552c 100644 --- a/home/hyprland/hyprpaper.conf +++ b/home/hyprland/hyprpaper.conf @@ -1,3 +1 @@ -preload = ~/pics/wallpapers/1.jpg -wallpaper = eDP-1,~/pics/wallpapers/1.jpg splash = false diff --git a/home/scripts/default.nix b/home/scripts/default.nix index a531a5f..69edd4e 100644 --- a/home/scripts/default.nix +++ b/home/scripts/default.nix @@ -7,4 +7,8 @@ source = ./rofi-launcher.sh; executable = true; }; + home.file.".local/bin/randomwp" = { + source = ./randomwp.sh; + executable = true; + }; } diff --git a/home/scripts/randomwp.sh b/home/scripts/randomwp.sh new file mode 100644 index 0000000..442a0ae --- /dev/null +++ b/home/scripts/randomwp.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash +set -eo pipefail + +if [ -z "${WALLPAPER_DIR}" ]; then + WALLPAPER_DIR="${HOME}/wallpapers" +fi + +if ! [ -d "$WALLPAPER_DIR" ]; then + echo "Wallpaper dir is not a directory" + exit 1 +fi + +wallpaper_path=$(find "$WALLPAPER_DIR" -mindepth 1 | sort -R | tail -n 1) + +if [ -z "$wallpaper_path" ]; then + echo "Unable to find wallpaper" + exit 1 +fi + +if ! command -v hyprpaper &> /dev/null; then + echo "Could not find hyprpaper command" + exit 1 +fi + +echo "setting $wallpaper_path as wallpaper" +hyprctl hyprpaper unload all +hyprctl hyprpaper preload "$wallpaper_path" + +for monitor in $(hyprctl monitors | grep 'Monitor' | awk '{ print $2 }'); do + hyprctl hyprpaper wallpaper "$monitor,$wallpaper_path" +done diff --git a/home/ssh/gunter.nix b/home/ssh/gunter.nix index 6e086bf..2bf5a3a 100644 --- a/home/ssh/gunter.nix +++ b/home/ssh/gunter.nix @@ -1,12 +1,15 @@ { pkgs, ... }: { programs.ssh = { enable = true; + controlMaster = "auto"; + matchBlocks."bmo.uio.no" = { - hostname = "bmo.uio.no"; - extraOptions = { - ControlMaster = "auto"; - ControlPath = "$XDG_RUNTIME_DIR/ssh/%r@%h:%p"; + setEnv = { + # TERM = "xterm-256color"; }; + hostname = "bmo.uio.no"; + forwardAgent = false; + proxyJump = "torjus@rlogin.uio.no"; }; }; }