From be149f170cc10bb3ab003c1705c574351d5feb5b Mon Sep 17 00:00:00 2001 From: joygnu Date: Mon, 15 Jul 2024 20:30:05 +0200 Subject: [PATCH] mhm --- home/default.nix | 1 + home/firefox/default.nix | 1 + home/hyprland/default.nix | 15 ++++++++------- home/hyprland/gamemode.sh | 14 ++++++++++++++ home/hyprland/vm.sh | 24 ++++++------------------ modules/packages/default.nix | 16 +++++++++++----- 6 files changed, 41 insertions(+), 30 deletions(-) create mode 100755 home/hyprland/gamemode.sh diff --git a/home/default.nix b/home/default.nix index 72cbf82..aa6e228 100644 --- a/home/default.nix +++ b/home/default.nix @@ -1,6 +1,7 @@ { inputs, ... }: { + imports = [ ./rofi ./firefox diff --git a/home/firefox/default.nix b/home/firefox/default.nix index 617ac94..4c462c2 100644 --- a/home/firefox/default.nix +++ b/home/firefox/default.nix @@ -37,6 +37,7 @@ { name = "Gamepad Tester"; url = "https://gamepad-tester.com/"; } { name = "Zophar's Domain"; url = "https://www.zophar.net/music"; } { name = "Spotify Downloader"; url = "https://spotify-downloader.com/"; } + { name = "Hyprland"; url = "https://wiki.hyprland.org/"; } ]; }]; diff --git a/home/hyprland/default.nix b/home/hyprland/default.nix index 8eb224e..af9f202 100644 --- a/home/hyprland/default.nix +++ b/home/hyprland/default.nix @@ -28,6 +28,10 @@ "DP-1,2560x1440@165.00Hz,0x0,1,bitdepth,10" ]; + windowrule = [ + "float, lxqt-policykit-agent" + ]; + env = [ "HYPRCURSOR_THEME = Bibata-Modern-Ice" "HYPRCURSOR_SIZE = 24" @@ -48,10 +52,10 @@ "$mod,TAB, exec, alacritty" "$mod, E, exec, nemo" "$mod, S, exec, firefox" - "$mod, X, exec, keepassxc" + "$mod, X, exec, secrets" "$mod, D, exec, alacritty -e screen -r cmus" "$mod, F, exec, freetube" - "$mod, M, exec, mbsync -a && alacritty -e neomutt" + "$mod, M, exec, alacritty -e neomutt" "$mod, C, exec, hyprpicker -a" "$mod, A, exec, rofi -show drun" "$mod+Shift, W, exec, bash ~/nix/home/hyprland/vm.sh" @@ -65,6 +69,7 @@ "$mod, R, togglesplit" "$mod+shift, S, exec, systemctl suspend" "$mod+shift, M, exit, hyprland" + "$mod, G, exec, sh ~/nix/home/hyprland/gamemode.sh" # cmus "$mod, P, exec, cmus-remote --pause" @@ -135,7 +140,7 @@ gaps_out = 20; border_size = 2; allow_tearing = false; - layout = "dwindle"; + layout = "master"; }; misc ={ @@ -153,10 +158,6 @@ kb_options = "grp:alt_shift_toggle"; }; - animations = { - # enabled = false; - }; - }; }; diff --git a/home/hyprland/gamemode.sh b/home/hyprland/gamemode.sh new file mode 100755 index 0000000..b89b5c4 --- /dev/null +++ b/home/hyprland/gamemode.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env sh +HYPRGAMEMODE=$(hyprctl getoption animations:enabled | awk 'NR==1{print $2}') +if [ "$HYPRGAMEMODE" = 1 ] ; then + hyprctl --batch "\ + keyword animations:enabled 0;\ + keyword decoration:drop_shadow 0;\ + keyword decoration:blur:enabled 0;\ + keyword general:gaps_in 0;\ + keyword general:gaps_out 0;\ + keyword general:border_size 1;\ + keyword decoration:rounding 0" + exit +fi +hyprctl reload diff --git a/home/hyprland/vm.sh b/home/hyprland/vm.sh index 7026693..e01271e 100755 --- a/home/hyprland/vm.sh +++ b/home/hyprland/vm.sh @@ -1,24 +1,12 @@ #!/bin/sh -# Start the virtual machine named "Windows" using virsh -virsh --connect qemu:///system start Windows +VM_NAME="Windows" -# Wait for 3 seconds to allow the VM to start up -sleep 3 +vm_state=$(virsh --connect qemu:///system domstate "$VM_NAME") -# Get the hostname of the current machine -hostname=$(hostname) - -# Set the IP address based on the hostname -if [ "$hostname" == "desktop" ]; then - ip="192.168.122.93" -elif [ "$hostname" == "laptop" ]; then - ip="192.168.122.29" -else - echo "Unknown hostname: $hostname" - exit 1 +if [ "$vm_state" != "running" ]; then + virsh --connect qemu:///system start "$VM_NAME" + sleep 5 fi -# Start an RDP session to the VM using xfreerdp -xfreerdp -grab-keyboard /v:$ip /u:joy /p:1 /size:100% /dynamic-resolution /gfx-h264:avc444 +gfx-progressive /sec:nla /bpp:32 /rfx /rfx-mode:video -bitmap-cache -offscreen-cache -glyph-cache - +xfreerdp -grab-keyboard /v:192.168.122.93 /u:joy /p:1 /size:100% /dynamic-resolution /gfx-h264:avc444 +gfx-progressive /sec:nla /bpp:32 /rfx /rfx-mode:video -bitmap-cache -offscreen-cache -glyph-cache diff --git a/modules/packages/default.nix b/modules/packages/default.nix index 4ab4e42..1dac621 100644 --- a/modules/packages/default.nix +++ b/modules/packages/default.nix @@ -15,11 +15,15 @@ htop gotop #mutt - mutt-wizard - isync - msmtp - neomutt - pass +# mutt-wizard +# neomutt +# curl +# isync +# msmtp +# pass +# lynx +# notmuch +# abook #chromium brave freetube @@ -38,9 +42,11 @@ firefox bottles boxbuddy + #gnome gnome.gnome-clocks gnome-calculator gnome-disk-utility + gnome-secrets #random shit brightnessctl gnat14