aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKumar Damani <me@kumardamani.net>2024-01-25 17:12:23 +0000
committerKumar Damani <me@kumardamani.net>2024-01-25 17:12:23 +0000
commite9d51c2103963ca7f80ec5e944aa0f6bbdfea6fc (patch)
tree0bbf1212732767565da36e6fafaef04448b0fd62
parent8953d3931eeacb9192aa2842001776f5d9a9777c (diff)
hyprland added
-rw-r--r--nixpkgs/.config/nixpkgs/common/dwl_4/config.h7
-rw-r--r--nixpkgs/.config/nixpkgs/per-user/kdam0-work/home.nix261
2 files changed, 187 insertions, 81 deletions
diff --git a/nixpkgs/.config/nixpkgs/common/dwl_4/config.h b/nixpkgs/.config/nixpkgs/common/dwl_4/config.h
index b45e198..e0875a0 100644
--- a/nixpkgs/.config/nixpkgs/common/dwl_4/config.h
+++ b/nixpkgs/.config/nixpkgs/common/dwl_4/config.h
@@ -9,6 +9,7 @@ static const float bordercolor[] = {0.5, 0.5, 0.5, 1.0};
static const float focuscolor[] = {1.0, 0.0, 0.0, 1.0};
/* To conform the xdg-protocol, set the alpha to zero to restore the old behavior */
static const float fullscreen_bg[] = {0.1, 0.1, 0.1, 1.0};
+#define TAGCOUNT (9)
/* tagging */
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
@@ -131,7 +132,11 @@ static const Key keys[] = {
{ MODKEY, XKB_KEY_j, focusstack, {.i = +1} },
{ MODKEY, XKB_KEY_k, focusstack, {.i = -1} },
{ MODKEY, XKB_KEY_i, incnmaster, {.i = +1} },
- { MODKEY, XKB_KEY_d, incnmaster, {.i = -1} },
+ { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_i, incnmaster, {.i = -1} },
+ { MODKEY, XKB_KEY_a, rotatetags, {.i = -1} },
+ { MODKEY, XKB_KEY_d, rotatetags, {.i = 1} },
+ { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_A, rotatetags, {.i = -2} },
+ { MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_D, rotatetags, {.i = 2} },
{ MODKEY, XKB_KEY_h, setmfact, {.f = -0.05} },
{ MODKEY, XKB_KEY_l, setmfact, {.f = +0.05} },
{ MODKEY, XKB_KEY_Return, zoom, {0} },
diff --git a/nixpkgs/.config/nixpkgs/per-user/kdam0-work/home.nix b/nixpkgs/.config/nixpkgs/per-user/kdam0-work/home.nix
index 6cff89c..c53b319 100644
--- a/nixpkgs/.config/nixpkgs/per-user/kdam0-work/home.nix
+++ b/nixpkgs/.config/nixpkgs/per-user/kdam0-work/home.nix
@@ -6,30 +6,30 @@
"$HOME/.config/nixpkgs/common/scripts"
];
home.sessionVariables = {
- EDITOR = "nvim";
- TERM = "xterm-256color";
+ EDITOR = "nvim";
+ TERM = "xterm-256color";
};
home.shellAliases = {
- l = "ls -l";
- ll = "ls -al";
- ".." = "cd ..";
- v = "nvim $@";
- r = "ranger $@";
- gst = "git status";
- cdwl = "nvim ~/.config/nixpkgs/common/dwl_4/config.h";
- chm = "nvim ~/.config/nixpkgs/per-user/kdam0-work/home.nix";
- cvim = "nvim ~/.config/nixpkgs/common/nvim/init.vim";
- clsp = "nvim ~/.config/nixpkgs/common/nvim/plugins/lspconfig.lua";
- search = "nix search nixpkgs $@";
- conf = "ranger ~/.config/nixpkgs/common/";
- up = "home-manager switch";
- k9s = "docker run --net host --rm -it -v ~/.kube/config:/root/.kube/config quay.io/derailed/k9s";
- b = "ssh kdamani@burne.sat";
- auto = "ssh kepler@auto.sat";
- dns = "ssh administrator@ctrlf-dns";
- pyans = "source ~/.venv/ansible/bin/activate";
- pykep36 = "source ~/.venv/kepler36/bin/activate";
- pykep37 = "source ~/.venv/kepler37/bin/activate";
+ l = "ls -l";
+ ll = "ls -al";
+ ".." = "cd ..";
+ v = "nvim $@";
+ r = "ranger $@";
+ gst = "git status";
+ cdwl = "nvim ~/.config/nixpkgs/common/dwl_4/config.h";
+ chm = "nvim ~/.config/nixpkgs/per-user/kdam0-work/home.nix";
+ cvim = "nvim ~/.config/nixpkgs/common/nvim/init.vim";
+ clsp = "nvim ~/.config/nixpkgs/common/nvim/plugins/lspconfig.lua";
+ search = "nix search nixpkgs $@";
+ conf = "ranger ~/.config/nixpkgs/common/";
+ up = "home-manager switch";
+ k9s = "docker run --net host --rm -it -v ~/.kube/config:/root/.kube/config quay.io/derailed/k9s";
+ b = "ssh kdamani@burne.sat";
+ auto = "ssh kepler@auto.sat";
+ dns = "ssh administrator@ctrlf-dns";
+ pyans = "source ~/.venv/ansible/bin/activate";
+ pykep36 = "source ~/.venv/kepler36/bin/activate";
+ pykep37 = "source ~/.venv/kepler37/bin/activate";
};
programs.home-manager.enable = true;
@@ -95,37 +95,37 @@
friendly-snippets
{
plugin = indent-blankline-nvim-lua;
- type = "lua";
- config = builtins.readFile(../../common/nvim/plugins/indent-blankline.lua);
+ type = "lua";
+ config = builtins.readFile(../../common/nvim/plugins/indent-blankline.lua);
}
{
plugin = lualine-nvim;
- type = "lua";
- config = builtins.readFile(../../common/nvim/plugins/lualine.lua);
+ type = "lua";
+ config = builtins.readFile(../../common/nvim/plugins/lualine.lua);
}
{
plugin = trouble-nvim;
- type = "lua";
- config = builtins.readFile(../../common/nvim/plugins/trouble.lua);
+ type = "lua";
+ config = builtins.readFile(../../common/nvim/plugins/trouble.lua);
}
{
plugin = telescope-nvim;
- type = "lua";
- config = builtins.readFile(../../common/nvim/plugins/telescope.lua);
+ type = "lua";
+ config = builtins.readFile(../../common/nvim/plugins/telescope.lua);
}
telescope-fzf-native-nvim
{
plugin = leap-nvim;
- type = "lua";
- config = builtins.readFile(../../common/nvim/plugins/leap.lua);
+ type = "lua";
+ config = builtins.readFile(../../common/nvim/plugins/leap.lua);
}
mason-nvim
mason-lspconfig-nvim
neoconf-nvim
{
plugin = nvim-lspconfig;
- type = "lua";
- config = builtins.readFile(../../common/nvim/plugins/lspconfig.lua);
+ type = "lua";
+ config = builtins.readFile(../../common/nvim/plugins/lspconfig.lua);
}
];
extraConfig = builtins.readFile ../../common/nvim/init.vim;
@@ -135,6 +135,8 @@
tmux.enableShellIntegration = true;
};
+ programs.waybar.enable = true;
+
home.stateVersion = "22.11";
nixpkgs = {
@@ -145,70 +147,78 @@
};
home.packages = with pkgs; [
# Window environment
- pkgs.somebar
- pkgs.foot
- pkgs.wl-clipboard
- pkgs.wf-recorder
- pkgs.grim
- pkgs.slurp
- pkgs.wbg
+ xdg-desktop-portal-hyprland
+ #somebar
+ foot
+ wl-clipboard
+ wf-recorder
+ grimblast
+ #grim
+ #slurp
+ wbg
# Text Editors
#pkgs.neovim
# Browsers
- pkgs.firefox
- pkgs.brave
+ firefox
+ brave
# File Managers
- pkgs.ranger
- pkgs.nnn
+ ranger
+ nnn
# Fonts
- pkgs.noto-fonts
- pkgs.nerdfonts
- pkgs.hack-font
+ noto-fonts
+ noto-fonts-emoji
+ noto-fonts-monochrome-emoji
+ nerdfonts
+ hack-font
+ font-awesome
# Notifications
- pkgs.mako
- pkgs.libnotify
+ mako
+ libnotify
# Image viewer
- pkgs.imv
- pkgs.sxiv
+ imv
+ sxiv
# Video player
- pkgs.mpv
+ mpv
# Pdf Viewer
- pkgs.zathura
+ zathura
# Power stuff
- pkgs.acpi
+ acpi
# Other stuff
- pkgs.entr
+ entr
#pkgs.gcc
#stdenv.cc.cc.lib
#pkgs.libstdcxx5
#llvmPackages_6.libstdcxxClang
#pkgs.clang
- pkgs.gnumake
- pkgs.neofetch
- pkgs.trash-cli
- pkgs.nextcloud-client
- pkgs.ripgrep
- pkgs.fd
- pkgs.stow
- pkgs.unzip
- pkgs.nodejs
- pkgs.cargo
- pkgs.wget
- pkgs.lazygit
+ gnumake
+ neofetch
+ trash-cli
+ nextcloud-client
+ ripgrep
+ fd
+ stow
+ unzip
+ nodejs
+ cargo
+ wget
+ lazygit
#pkgs.tree-sitter
# Work stuff
- pkgs.mattermost-desktop
- pkgs.signal-desktop
- pkgs.slack
- pkgs.wev
- pkgs.sshpass
- pkgs.libreoffice
- pkgs.drawio
- pkgs.kubectl
- pkgs.kubernetes-helm
- pkgs.virt-viewer
- pkgs.dig
- pkgs.dnsutils
+ mattermost-desktop
+ signal-desktop
+ slack
+ wev
+ sshpass
+ libreoffice
+ drawio
+ kubectl
+ kubernetes-helm
+ virt-viewer
+ dig
+ dnsutils
+ awscli
+ rclone
+ moonlight-qt
];
fonts.fontconfig.enable = true;
@@ -244,6 +254,97 @@
};
systemd.user.startServices = true;
+ wayland.windowManager.hyprland = {
+ enable = true;
+ settings = {
+ "$mod" = "ALT";
+ input = {
+ "kb_options" = "caps:swapescape";
+ };
+ "exec-once" = [
+ "walp"
+ "waybar"
+ "[workspace 9 silient] firefox"
+ "[workspace 8 silient] brave"
+ "[workspace 2 silent] foot"
+ "[workspace 1 silient] slack"
+ "[workspace 1 silient] signal-desktop"
+ ];
+ windowrulev2 = [
+ "workspace 9,class:^firefox$"
+ "workspace 8,class:^Brave(.*)$"
+ "workspace 7,class:^remote-viewer$"
+ "workspace 1,class:^Slack$"
+ "workspace 1,class:^Signal$"
+ ];
+ monitor = [
+ "DP-1, 1920x1080@60, 0x0,1"
+ ", preferred,auto,1"
+ ];
+ workspace = [
+ "1,monitor:eDP-1"
+ "2,monitor:DP-1"
+ "3,monitor:DP-1"
+ "4,monitor:DP-1"
+ "5,monitor:DP-1"
+ "6,monitor:DP-1"
+ "7,monitor:DP-1"
+ "8,monitor:DP-1"
+ "9,monitor:DP-1"
+ "10,monitor:DP-1"
+ ];
+ animation = [
+ "workspaces,1,2,default"
+ "windows,1,3,default"
+ "fade,0"
+ ];
+ bind = [
+ "$mod, j, cyclenext, prev"
+ "$mod Shift, j, swapnext, prev"
+ "$mod, k, cyclenext,"
+ "$mod Shift, k, swapnext,"
+ "$mod Shift, l, exec, swaylock -i /tmp/bg"
+ "$mod, period, focusmonitor, +1"
+ "$mod, Tab, workspace, previous"
+ "$mod, escape, workspace, m-1"
+ "$mod, semicolon, workspace, m+1"
+ "$mod, q, killactive"
+ "$mod, Return, exec, foot"
+ "$mod, p, exec, wofi --show run"
+ "$mod, r, exec, foot -e ranger"
+ ", Delete, exec, grimblast copy area"
+ ]
+ ++ (
+ # workspaces
+ # binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
+ builtins.concatLists (builtins.genList (
+ x: let
+ ws = let
+ c = (x + 1) / 10;
+ in
+ builtins.toString (x + 1 - (c * 10));
+ in [
+ "$mod, ${ws}, workspace, ${toString (x + 1)}"
+ "$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}"
+ ]
+ )
+ 10)
+ );
+ binde = [
+ ", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
+ ", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
+ ", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"
+ ", XF86MonBrightnessDown, exec, light -U 10"
+ ", XF86MonBrightnessUp, exec, light -A 10"
+ "$mod, h, resizeactive, -20 20"
+ "$mod, l, resizeactive, 20 -20"
+ ];
+ binds = {
+ "allow_workspace_cycles" = true;
+ };
+ };
+ };
+
# Source app specific configs
home.file.".config/foot/foot.ini".source = ../../common/foot/foot.ini;
home.file.".config/wofi/style.css".source = ../../common/wofi/style.css;