From 98177d5119b78ef89206569f1337318a5645ddf8 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Wed, 23 Aug 2023 09:31:52 +0100 Subject: [PATCH] Add remmina VNC/RDP client Move program launching binds into submap with silent launch for faster startup Add current hyprland submap to waybar --- home/default.nix | 8 ++++- home/hyprland/config.nix | 29 +++++++++++++------ home/hyprland/waybar/default.nix | 3 +- .../waybar/modules/hyprland_submap.nix | 5 ++++ 4 files changed, 34 insertions(+), 11 deletions(-) create mode 100644 home/hyprland/waybar/modules/hyprland_submap.nix diff --git a/home/default.nix b/home/default.nix index fdc16962..95311004 100644 --- a/home/default.nix +++ b/home/default.nix @@ -12,7 +12,13 @@ ./zathura ./emacs ]; - home.packages = with pkgs; [ bitwarden signal-desktop libreoffice zotero ]; + home.packages = with pkgs; [ + bitwarden + remmina + signal-desktop + libreoffice + zotero + ]; programs.home-manager.enable = true; xdg.configFile."wallpapers/default.jpg".source = wallpapers.outputs.default; } diff --git a/home/hyprland/config.nix b/home/hyprland/config.nix index a2686fdc..a95e7d01 100644 --- a/home/hyprland/config.nix +++ b/home/hyprland/config.nix @@ -73,23 +73,30 @@ in '' } # See https://wiki.hyprland.org/Configuring/Keywords/ for more - bind = SUPER, Return, exec, ${pkgs.alacritty}/bin/alacritty bind = SUPER, F1, exec, ${pkgs.swaylock-effects}/bin/swaylock - bind = SUPER, Space, exec, ${anyrunPackage}/bin/anyrun bind = SUPER, M, fullscreen, 0 bind = SUPER SHIFT, M, fullscreen, 1 bind = SUPER SHIFT, Q, killactive, bind = SUPER SHIFT, Space, togglefloating - bind = SUPER SHIFT, Return, exec, pkill rofi || ${pkgs.rofi-wayland}/bin/rofi -show ssh bind = SUPER SHIFT, P, exec, pkill rofi || ${pkgs.rofi-wayland}/bin/rofi -show power-menu # Common program shortcuts - bind = SUPER ALT, E, exec, ${pkgs.emacs}/bin/emacsclient -c -a 'emacs' - bind = SUPER ALT, W, exec, ${pkgs.firefox-wayland}/bin/firefox - bind = SUPER ALT, F, exec, ${pkgs.xfce.thunar}/bin/thunar - bind = SUPER ALT, Z, exec, ${pkgs.zotero}/bin/zotero - bind = SUPER ALT, S, exec, ${pkgs.alacritty}/bin/alacritty -e ncspot - bind = SUPER ALT, V, exec, ${pkgs.bitwarden}/bin/bitwarden + bind = SUPER, Return, exec, ${pkgs.alacritty}/bin/alacritty + bind = SUPER SHIFT, Return, exec, [float] ${pkgs.alacritty}/bin/alacritty + + bind = SUPER, Space, submap, launch + + submap = launch + bind = , W, exec, [workspace name:browser silent] ${pkgs.firefox-wayland}/bin/firefox + bind = , F, exec, [workspace name:files silent] ${pkgs.xfce.thunar}/bin/thunar + bind = , Z, exec, [workspace name:library silent] ${pkgs.zotero}/bin/zotero + bind = , S, exec, [workspace name:music silent] ${pkgs.alacritty}/bin/alacritty -e ncspot + bind = , V, exec, [workspace name:vault silent] ${pkgs.bitwarden}/bin/bitwarden + bind = , R, exec, [workspace name:remote silent] ${pkgs.remmina}/bin/remmina + bind = , E, exec, ${pkgs.emacs}/bin/emacsclient -c -a 'emacs' + bind = , Space, exec, ${anyrunPackage}/bin/anyrun + bind = SUPER, Space, submap, reset + submap = reset # Misc useful binds bind=,Print,exec,${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)" @@ -185,6 +192,10 @@ in '' windowrule = fullscreen,(Nxplayer.bin) windowrule = nofullscreenrequest,(Nxplayer.bin) windowrule = nomaximizerequest,(Nxplayer.bin) + windowrule = workspace name:remote,(org.remmina.Remmina) + windowrule = nofullscreenrequest,(org.remmina.Remmina) + windowrule = nomaximizerequest,(org.remmina.Remmina) + windowrulev2 = float,class:(org.remmina.Remmina),title:^(Remmina Remote Desktop Client)$ # Numbered workspaces bind = SUPER, 1, moveworkspacetomonitor, 1 current diff --git a/home/hyprland/waybar/default.nix b/home/hyprland/waybar/default.nix index d15004d1..59368d8e 100644 --- a/home/hyprland/waybar/default.nix +++ b/home/hyprland/waybar/default.nix @@ -10,7 +10,7 @@ settings.main = { layer = "top"; position = "top"; - "modules-left" = [ "wlr/workspaces" ]; + "modules-left" = [ "wlr/workspaces" "hyprland/submap" ]; "modules-center" = [ "mpris" ]; "modules-right" = [ "pulseaudio" @@ -22,6 +22,7 @@ "clock" ]; "wlr/workspaces" = import ./modules/wlr_workspaces.nix; + "hyprland/submap" = import ./modules/hyprland_submap.nix; mpris = import ./modules/mpris.nix; cpu = import ./modules/cpu.nix; memory = import ./modules/memory.nix; diff --git a/home/hyprland/waybar/modules/hyprland_submap.nix b/home/hyprland/waybar/modules/hyprland_submap.nix new file mode 100644 index 00000000..a8de67f0 --- /dev/null +++ b/home/hyprland/waybar/modules/hyprland_submap.nix @@ -0,0 +1,5 @@ +{ + format = "{}"; + max-length = 8; + tooltip = false; +}