Compare commits

...

3 Commits

Author SHA1 Message Date
bb6f0ab772
env/firejail: add qutebrowser.local profile 2024-10-15 04:20:40 +02:00
90f939e056
home/sway: bin/<name> -> lib.getExe 2024-10-15 04:16:58 +02:00
8740cc57fe
home/sway: add tessen shortcut 2024-10-15 04:03:50 +02:00
2 changed files with 17 additions and 10 deletions

View File

@ -3,17 +3,18 @@
pkgs, pkgs,
inputs, inputs,
system, system,
lib,
... ...
}: let }: let
cliphist_sway = pkgs.writeShellScriptBin "cliphist_sway" '' cliphist_sway = pkgs.writeShellScriptBin "cliphist_sway" ''
${pkgs.cliphist}/bin/cliphist list | \ ${lib.getExe pkgs.cliphist} list | \
${pkgs.wofi}/bin/wofi --dmenu --insensitive | \ ${lib.getExe pkgs.wofi} --dmenu --insensitive | \
${pkgs.cliphist}/bin/cliphist decode | \ ${lib.getExe pkgs.cliphist} decode | \
${pkgs.wl-clipboard}/bin/wl-copy ${pkgs.wl-clipboard}/bin/wl-copy
''; '';
screenshot_clip = pkgs.writeShellScriptBin "screenshot_clip" '' screenshot_clip = pkgs.writeShellScriptBin "screenshot_clip" ''
GEOM="$(${pkgs.slurp}/bin/slurp -d)" GEOM="$(${lib.getExe pkgs.slurp} -d)"
${pkgs.grim}/bin/grim -g "$GEOM" - | ${pkgs.wl-clipboard}/bin/wl-copy ${lib.getExe pkgs.grim} -g "$GEOM" - | ${pkgs.wl-clipboard}/bin/wl-copy
''; '';
swaysw = inputs.swaysw.packages.${system}.swaysw; swaysw = inputs.swaysw.packages.${system}.swaysw;
viber = pkgs.callPackage ../packages/viber/default.nix {}; viber = pkgs.callPackage ../packages/viber/default.nix {};
@ -22,7 +23,7 @@ in {
wayland.windowManager.sway = { wayland.windowManager.sway = {
enable = true; enable = true;
extraSessionCommands = ""; extraSessionCommands = "";
extraConfigEarly = '' ''; extraConfigEarly = '''';
config = { config = {
fonts = { fonts = {
@ -74,7 +75,7 @@ in {
style = "Bold Semi-Condensed"; style = "Bold Semi-Condensed";
size = 12.0; size = 12.0;
}; };
statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ~/.config/i3status-rust/config-top.toml"; statusCommand = "${lib.getExe pkgs.i3status-rust} ~/.config/i3status-rust/config-top.toml";
} }
]; ];
@ -125,11 +126,12 @@ in {
"Alt+bracketleft" = "focus output left"; "Alt+bracketleft" = "focus output left";
"Mod4+l" = '' "Mod4+l" = ''
exec ${pkgs.sway}/bin/swaymsg [app_id="python3"] scratchpad show || exec ${term} -a python3 ${pkgs.python3}/bin/python3''; exec ${pkgs.sway}/bin/swaymsg [app_id="python3"] scratchpad show || exec ${term} -a python3 ${lib.getExe pkgs.python3}'';
"Mod4+h" = "exec ${pkgs.sway}/bin/swaymsg [app_id=com.rtosta.zapzap] scratchpad show || exec ${pkgs.zapzap}/bin/zapzap"; "Mod4+h" = "exec ${pkgs.sway}/bin/swaymsg [app_id=com.rtosta.zapzap] scratchpad show || exec ${lib.getExe pkgs.zapzap}";
"Mod4+j" = "exec ${pkgs.sway}/bin/swaymsg [app_id=com.viber] scratchpad show || exec ${viber}/bin/viber"; "Mod4+j" = "exec ${pkgs.sway}/bin/swaymsg [app_id=com.viber] scratchpad show || exec ${viber}/bin/viber";
"Mod4+y" = '' "Mod4+y" = ''
exec ${pkgs.sway}/bin/swaymsg [app_id="pulsemixer"] scratchpad show || exec ${term} -a pulsemixer ${pkgs.pulsemixer}/bin/pulsemixer''; exec ${pkgs.sway}/bin/swaymsg [app_id="pulsemixer"] scratchpad show || exec ${term} -a pulsemixer ${lib.getExe pkgs.pulsemixer}'';
"Mod4+p" = "exec ${lib.getExe pkgs.tessen} -a copy";
}; };
}; };
}; };

View File

@ -177,6 +177,11 @@
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
nixpkgs.overlays = [nix-xilinx.overlay nvim.overlays.${system}.overlay]; nixpkgs.overlays = [nix-xilinx.overlay nvim.overlays.${system}.overlay];
environment = { environment = {
etc = {
"firejail/qutebrowser.local".text = ''
whitelist ''${RUNUSER}/qutebrowser
'';
};
extraInit = '' extraInit = ''
unset -v SSH_ASKPASS unset -v SSH_ASKPASS
''; '';