Compare commits

...
2 Commits
4 changed files with 25 additions and 24 deletions

No files matched your search

-1
View File
@@ -31,7 +31,6 @@
]; ];
host.laptop = true; host.laptop = true;
host.nvidia.prime.enable = true;
programs.gamemode.enable = true; programs.gamemode.enable = true;
hardware.bluetooth.enable = true; hardware.bluetooth.enable = true;
+1 -14
View File
@@ -1,17 +1,7 @@
{ pkgs, lib, config, swww_flags, inputs, host ? null }: { pkgs, lib, config, inputs, host ? null }:
let let
hyprLua = import ./hyprland/lua.nix { inherit lib; }; hyprLua = import ./hyprland/lua.nix { inherit lib; };
direction = { left = "l"; right = "r"; up = "u"; down = "d"; }; direction = { left = "l"; right = "r"; up = "u"; down = "d"; };
wallpaper_changer = pkgs.writers.writePython3Bin "wallpaper_changer" {
libraries = [ pkgs.python3Packages.requests ];
flakeIgnore = [ "E501" "E111" "E701" "E241" "E731" ];
} /*py*/ ''
from random import choice
from os import system, listdir
folder = "${config.home.homeDirectory}/wallpapers"
filename = choice(listdir(folder))
system(f"${lib.getExe pkgs.awww} img {folder}/{filename} ${swww_flags}")
'';
workspaceBinds = lib.concatMap (workspace: workspaceBinds = lib.concatMap (workspace:
let key = if workspace == 10 then "0" else toString workspace; workspaceValue = toString workspace; let key = if workspace == 10 then "0" else toString workspace; workspaceValue = toString workspace;
in [ in [
@@ -22,7 +12,6 @@ in {
imports = lib.optional (host != null && builtins.pathExists ../../host/${host.name}/modules/hyprland.nix) ../../host/${host.name}/modules/hyprland.nix; imports = lib.optional (host != null && builtins.pathExists ../../host/${host.name}/modules/hyprland.nix) ../../host/${host.name}/modules/hyprland.nix;
home.packages = with pkgs; [ home.packages = with pkgs; [
wallpaper_changer
ghostty ghostty
pamixer pamixer
wofi wofi
@@ -87,7 +76,6 @@ in {
"wl-clip-persist --clipboard both" "wl-clip-persist --clipboard both"
"clipse -listen" "clipse -listen"
"${lib.getExe' pkgs.udiskie "udiskie"}" "${lib.getExe' pkgs.udiskie "udiskie"}"
"${lib.getExe wallpaper_changer}"
]) ]; ]) ];
bind = [ bind = [
(hyprLua.bind "SUPER + V" (hyprLua.exec "ghostty --title=clipse -e clipse")) (hyprLua.bind "SUPER + V" (hyprLua.exec "ghostty --title=clipse -e clipse"))
@@ -97,7 +85,6 @@ in {
(hyprLua.bind "SUPER + E" (hyprLua.exec "ghostty -e sh -c yazi")) (hyprLua.bind "SUPER + E" (hyprLua.exec "ghostty -e sh -c yazi"))
(hyprLua.bind "SUPER + F" "hl.dsp.window.float({ action = \"toggle\" })") (hyprLua.bind "SUPER + F" "hl.dsp.window.float({ action = \"toggle\" })")
(hyprLua.bind "SUPER + J" "hl.dsp.layout(\"togglesplit\")") (hyprLua.bind "SUPER + J" "hl.dsp.layout(\"togglesplit\")")
(hyprLua.bind "SUPER + W" (hyprLua.exec "${lib.getExe wallpaper_changer}"))
(hyprLua.bind "SUPER + LEFT" "hl.dsp.focus({ direction = \"${direction.left}\" })") (hyprLua.bind "SUPER + LEFT" "hl.dsp.focus({ direction = \"${direction.left}\" })")
(hyprLua.bind "SUPER + RIGHT" "hl.dsp.focus({ direction = \"${direction.right}\" })") (hyprLua.bind "SUPER + RIGHT" "hl.dsp.focus({ direction = \"${direction.right}\" })")
(hyprLua.bind "SUPER + UP" "hl.dsp.focus({ direction = \"${direction.up}\" })") (hyprLua.bind "SUPER + UP" "hl.dsp.focus({ direction = \"${direction.up}\" })")
+5 -7
View File
@@ -89,13 +89,7 @@
rebuildFlake = "sudo nixos-rebuild switch --flake /home/kirill/.config/f --impure"; rebuildFlake = "sudo nixos-rebuild switch --flake /home/kirill/.config/f --impure";
openFlake = "vim /home/kirill/.config/f/flake.nix"; openFlake = "vim /home/kirill/.config/f/flake.nix";
swichWalls = "wallpaper_changer"; swichWalls = "wallpaper_changer";
screenshot_f="grimblast save screen ~/screenshot_$(date +\%Y-\%m-\%d_\%H-\%M-\%S).png"; shell = "nix-shell . --run zsh";
screenshot="grimblast save area ~/screenshot_$(date +\%Y-\%m-\%d_\%H-\%M-\%S).png";
screenshot_c = "grimblast copy area";
loginPostgresql = "sudo -u postgres psql";
startShell = "nix-shell . --run zsh";
VPN = "sudo openvpn --config /home/kirill/VPN/184.22.37.202_udp_1727.ovpn";
play2Go = "ssh -i ~/.ssh/id_rsa_play2go.pub root@93.123.84.45";
testZapret = "sudo zapret-test-strategies"; testZapret = "sudo zapret-test-strategies";
}; };
@@ -103,6 +97,10 @@
eval "$(zoxide init zsh)" eval "$(zoxide init zsh)"
source "$(fzf-share)/key-bindings.zsh" source "$(fzf-share)/key-bindings.zsh"
source "$(fzf-share)/completion.zsh" source "$(fzf-share)/completion.zsh"
run() {
nix run "nixpkgs#$1"
}
''; '';
envExtra = '' envExtra = ''
+19 -2
View File
@@ -1,5 +1,16 @@
{ pkgs, lib, config, inputs, host, ... }: { pkgs, lib, config, inputs, host, ... }:
{ let
wallpaper_changer = pkgs.writers.writePython3Bin "wallpaper_changer" {
libraries = [ pkgs.python3Packages.requests ];
flakeIgnore = [ "E501" "E111" "E701" "E241" "E731" ];
} /*py*/ ''
from random import choice
from os import system, listdir
folder = "${config.home.homeDirectory}/wallpapers"
filename = choice(listdir(folder))
system(f"${lib.getExe pkgs.awww} img {folder}/{filename} --transition-type center")
'';
in {
imports = [( imports = [(
import ../../../modules/user/hyprland.nix { import ../../../modules/user/hyprland.nix {
inherit lib; inherit lib;
@@ -7,10 +18,11 @@
inherit config; inherit config;
inherit inputs; inherit inputs;
inherit host; inherit host;
swww_flags = "--transition-type center";
} }
)]; )];
home.packages = [ wallpaper_changer ];
wayland.windowManager.hyprland = let wayland.windowManager.hyprland = let
colors = config.lib.stylix.colors; colors = config.lib.stylix.colors;
hyprLua = import ../../../modules/user/hyprland/lua.nix { inherit lib; }; hyprLua = import ../../../modules/user/hyprland/lua.nix { inherit lib; };
@@ -89,7 +101,12 @@
} }
]; ];
on = [
(hyprLua.onStart [ "${lib.getExe wallpaper_changer}" ])
];
bind = [ bind = [
(hyprLua.bind "SUPER + W" (hyprLua.exec "${lib.getExe wallpaper_changer}"))
(hyprLua.bind "SUPER + SHIFT + S" (hyprLua.exec "${lib.getExe pkgs.grimblast} --notify --freeze copy area")) (hyprLua.bind "SUPER + SHIFT + S" (hyprLua.exec "${lib.getExe pkgs.grimblast} --notify --freeze copy area"))
(hyprLua.bind "F11" (hyprLua.exec "ghostty -e sh -c hyprlock")) (hyprLua.bind "F11" (hyprLua.exec "ghostty -e sh -c hyprlock"))
]; ];