Add anyrun, new hypr binds and kanshi fixes

Stop disabling laptop screen due to know Hyprland bug,
just move around with kanshi
This commit is contained in:
Evie Litherland-Smith 2023-08-08 09:51:14 +01:00
parent 28c950c987
commit 5beae89ae1
6 changed files with 97 additions and 38 deletions

View file

@ -1,5 +1,47 @@
{
"nodes": {
"anyrun": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1691439091,
"narHash": "sha256-TfyjuHyt7+6pnwFPgSZQoKGSMEWRKNF+OQ+XTA/dahg=",
"owner": "Kirottu",
"repo": "anyrun",
"rev": "59e0bf6e570bb5461b0f3a1f62b15165e37a08a9",
"type": "github"
},
"original": {
"owner": "Kirottu",
"repo": "anyrun",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"anyrun",
"nixpkgs"
]
},
"locked": {
"lastModified": 1685662779,
"narHash": "sha256-cKDDciXGpMEjP1n6HlzKinN0H+oLmNpgeCTzYnsA2po=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "71fb97f0d875fd4de4994dfb849f2c75e17eb6c3",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -82,6 +124,7 @@
},
"root": {
"inputs": {
"anyrun": "anyrun",
"home-manager": "home-manager",
"hyprland": "hyprland",
"nixpkgs": "nixpkgs",

View file

@ -11,6 +11,10 @@
url = "github:hyprwm/Hyprland";
inputs.nixpkgs.follows = "nixpkgs";
};
anyrun = {
url = "github:Kirottu/anyrun";
inputs.nixpkgs.follows = "nixpkgs";
};
wallpapers.url = "git+https://git.xenia.me.uk/xenia/wallpapers.git";
tokyonight = {
url = "github:folke/tokyonight.nvim";
@ -18,7 +22,7 @@
};
};
outputs = { self, nixpkgs, home-manager, hyprland, wallpapers, tokyonight, }:
outputs = { self, nixpkgs, home-manager, hyprland, anyrun, wallpapers, tokyonight, }:
let shell = "zsh";
in {
nixosConfigurations = let
@ -61,7 +65,7 @@
};
homeConfigurations = let
extraSpecialArgs = {
inherit hyprland wallpapers tokyonight;
inherit hyprland anyrun wallpapers tokyonight;
shellConfig = ./home/shell/${shell}.nix;
};
in {

View file

@ -0,0 +1,18 @@
{ pkgs, anyrun, ... }:
let anyrunPackages = anyrun.packages.${pkgs.system};
in {
imports = [ anyrun.homeManagerModules.default ];
programs.anyrun = {
enable = true;
config = {
plugins = [ anyrunPackages.applications ];
hideIcons = false;
ignoreExclusiveZones = false;
layer = "overlay";
hidePluginInfo = false;
closeOnClick = true;
showResultsImmediately = false;
maxEntries = null;
};
};
}

View file

@ -23,6 +23,7 @@ in {
hyprland.homeManagerModules.default
./waybar
./rofi
./anyrun
./swaylock.nix
./gtk.nix
./mako.nix

View file

@ -1,6 +1,7 @@
exec-once = swww init
source = ./macchiato.conf
source = ./display.conf
exec-once = swww init
monitor=,preferred,auto,auto
@ -72,17 +73,11 @@ XWayland {
bind = SUPER, Return, exec, alacritty
bind = SUPER, F1, exec, swaylock
bind = SUPER, X, exec, emacsclient -c -a 'emacs'
bind = SUPER CTRL, W, exec, firefox
bind = SUPER CTRL, E, exec, thunderbird
bind = SUPER CTRL, F, exec, thunar
bind = SUPER CTRL, S, exec, alacritty -e ncspot
bind = SUPER CTRL, V, exec, bitwarden
bind = SUPER, T, exec, thunar
# Rofi binds
bind = SUPER, Space, exec, pkill rofi || rofi -show drun
bind = SUPER SHIFT, Space, exec, pkill rofi || rofi -show run
# anyrun/rofi binds
bind = SUPER, Space, exec, anyrun
bind = SUPER SHIFT, Return, exec, pkill rofi || rofi -show ssh
bind = SUPER SHIFT, B, exec, pkill rofi || rofi -show file-browser-extended
bind = SUPER SHIFT, P, exec, pkill rofi || rofi -show power-menu
bind = SUPER, B, togglefloating
@ -119,8 +114,6 @@ bind = SUPER SHIFT, J, movewindow, d
bind = SUPER, A, moveworkspacetomonitor, name:home current
bind = SUPER, A, workspace, name:home
bind = SUPER SHIFT, A, movetoworkspace, name:home
windowrule = workspace name:home,^(steam).*
windowrule = workspace name:home,(.gamescope-wrapped)
# browser
bind = SUPER, W, moveworkspacetomonitor, name:browser current
@ -191,22 +184,31 @@ windowrule = nofullscreenrequest,(Nxplayer.bin)
windowrule = nomaximizerequest,(Nxplayer.bin)
# Numbered workspaces
bind = SUPER, 1, moveworkspacetomonitor, 1 current
bind = SUPER, 1, workspace, 1
bind = SUPER SHIFT, 1, movetoworkspace, 1
bind = SUPER, 2, moveworkspacetomonitor, 2 current
bind = SUPER, 2, workspace, 2
bind = SUPER SHIFT, 2, movetoworkspace, 2
bind = SUPER, 3, moveworkspacetomonitor, 3 current
bind = SUPER, 3, workspace, 3
bind = SUPER SHIFT, 3, movetoworkspace, 3
bind = SUPER, 4, moveworkspacetomonitor, 4 current
bind = SUPER, 4, workspace, 4
bind = SUPER SHIFT, 4, movetoworkspace, 4
bind = SUPER, 5, moveworkspacetomonitor, 5 current
bind = SUPER, 5, workspace, 5
bind = SUPER SHIFT, 5, movetoworkspace, 5
bind = SUPER, 6, moveworkspacetomonitor, 6 current
bind = SUPER, 6, workspace, 6
bind = SUPER SHIFT, 6, movetoworkspace, 6
bind = SUPER, 7, moveworkspacetomonitor, 7 current
bind = SUPER, 7, workspace, 7
bind = SUPER SHIFT, 7, movetoworkspace, 7
bind = SUPER, 8, moveworkspacetomonitor, 8 current
bind = SUPER, 8, workspace, 8
bind = SUPER SHIFT, 8, movetoworkspace, 8
bind = SUPER, 9, moveworkspacetomonitor, 9 current
bind = SUPER, 9, workspace, 9
bind = SUPER SHIFT, 9, movetoworkspace, 9

View file

@ -1,13 +1,7 @@
{ pkgs, lib, shellConfig, wallpapers, ... }:
{ pkgs, lib, shellConfig, ... }:
let
username = "elitherl";
homeDirectory = "/home/${username}";
monitors = {
eDP-1 = "preferred,auto,1.25";
Iiyama = "preferred,0x185,1";
Dell = "preferred,1920x0,1,transform,1";
Acer = "highrr,auto,1";
};
in {
imports = [ shellConfig ../../home ];
home = {
@ -150,46 +144,43 @@ in {
services.kanshi.profiles = {
undocked = {
outputs = [{
criteria = "eDP-1";
status = "enable";
criteria = "AU Optronics 0x1F92";
position = "0,0";
}];
};
work = {
outputs = [
{
criteria = "eDP-1";
status = "disable";
criteria = "AU Optronics 0x1F92";
position = "0,485";
}
{
criteria = "Iiyama North America PLB2403WS 0574281251316";
status = "enable";
position = "1536,185";
}
{
criteria = "Dell Inc. DELL U2417H 5K9YD872FY1L";
status = "enable";
position = "1920,0";
}
];
};
home = {
outputs = [
{
criteria = "eDP-1";
status = "disable";
criteria = "Acer Technologies ED270R TJMEE0043W01";
position = "0,0";
}
{
criteria = "Acer Technologies ED270R TJMEE0043W01";
status = "enable";
criteria = "AU Optronics 0x1F92";
position = "1920,0";
}
];
};
};
xdg.configFile."hypr/display.conf".text = ''
monitor=eDP-1,${monitors.eDP-1}
monitor=desc:Iiyama North America PLB2403WS 0574281251316,${monitors.Iiyama}
monitor=desc:Dell Inc. DELL U2417H 5K9YD872FY1L,${monitors.Dell}
monitor=desc:Acer Technologies ED270R TJMEE0043W01,${monitors.Acer}
bindl=,switch:Lid Switch,exec,hyprctl reload
bindl=,switch:Lid Switch,exec,pkill -HUP kanshi
monitor=desc:AU Optronics 0x1F92,preferred,auto,1.25
monitor=desc:Iiyama North America PLB2403WS 0574281251316,preferred,0x185,1
monitor=desc:Dell Inc. DELL U2417H 5K9YD872FY1L,preferred,1920x0,1,transform,1
monitor=desc:Acer Technologies ED270R TJMEE0043W01,highrr,auto,1
'';
}