From c4d0eb3df8c11abf8a2e93617da3c395f3339e2a Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Mon, 3 Apr 2023 16:53:23 +0100 Subject: [PATCH] Add more i3 cofig --- .../env/config/i3/keybindings.nix | 31 +++++ nixos/home-manager/env/config/i3/startup.nix | 5 + .../env/config/rofi/catppuccin-macchiato.rasi | 111 ++++++++++++++++++ nixos/home-manager/env/default.nix | 6 + nixos/home-manager/env/dunst.nix | 66 +++++++++++ nixos/home-manager/env/i3.nix | 37 ++++++ nixos/home-manager/env/rofi.nix | 9 ++ 7 files changed, 265 insertions(+) create mode 100644 nixos/home-manager/env/config/i3/keybindings.nix create mode 100644 nixos/home-manager/env/config/i3/startup.nix create mode 100644 nixos/home-manager/env/config/rofi/catppuccin-macchiato.rasi create mode 100644 nixos/home-manager/env/default.nix create mode 100644 nixos/home-manager/env/dunst.nix create mode 100644 nixos/home-manager/env/i3.nix create mode 100644 nixos/home-manager/env/rofi.nix diff --git a/nixos/home-manager/env/config/i3/keybindings.nix b/nixos/home-manager/env/config/i3/keybindings.nix new file mode 100644 index 00000000..b8a16889 --- /dev/null +++ b/nixos/home-manager/env/config/i3/keybindings.nix @@ -0,0 +1,31 @@ +let + mod = "Mod4"; +in +{ + "${mod}+Tab" = "workspace next"; + "${mod}+Shift+Tab" = "workspace prev"; + # + "${mod}+Return" = "exec kitty"; + #"${mod}+Shift+Return" = "exec xfce4-terminal --drop-down"; + "${mod}+q" = "kill"; + # + "${mod}+Shift+c" = "reload"; + "${mod}+Shift+r" = "restart"; + # + "${mod}+h" = "focus left"; + "${mod}+Shift+h" = "move left"; + "${mod}+Left" = "focus left"; + "${mod}+Shift+Left" = "move left"; + "${mod}+j" = "focus down"; + "${mod}+Shift+j" = "move down"; + "${mod}+Down" = "focus down"; + "${mod}+Shift+Down" = "move down"; + "${mod}+k" = "focus up"; + "${mod}+Shift+k" = "move up"; + "${mod}+Up" = "focus up"; + "${mod}+Shift+Up" = "move up"; + "${mod}+l" = "focus right"; + "${mod}+Shift+l" = "move right"; + "${mod}+Right" = "focus right"; + "${mod}+Shift+Right" = "move right"; +} diff --git a/nixos/home-manager/env/config/i3/startup.nix b/nixos/home-manager/env/config/i3/startup.nix new file mode 100644 index 00000000..fb6362ba --- /dev/null +++ b/nixos/home-manager/env/config/i3/startup.nix @@ -0,0 +1,5 @@ +{ ... }: +[ + { command = "$HOME/.screenlayout/default.sh";} + { command = "nitrogen --restore";} +] diff --git a/nixos/home-manager/env/config/rofi/catppuccin-macchiato.rasi b/nixos/home-manager/env/config/rofi/catppuccin-macchiato.rasi new file mode 100644 index 00000000..696d7697 --- /dev/null +++ b/nixos/home-manager/env/config/rofi/catppuccin-macchiato.rasi @@ -0,0 +1,111 @@ +* { + bg-col: #24273a; + bg-col-light: #24273a; + border-col: #24273a; + selected-col: #24273a; + blue: #8aadf4; + fg-col: #cad3f5; + fg-col2: #ed8796; + grey: #6e738d; + + width: 600; + font: "JetBrainsMono Nerd Font 14"; +} + +element-text, element-icon , mode-switcher { + background-color: inherit; + text-color: inherit; +} + +window { + height: 360px; + border: 3px; + border-color: @border-col; + background-color: @bg-col; +} + +mainbox { + background-color: @bg-col; +} + +inputbar { + children: [prompt,entry]; + background-color: @bg-col; + border-radius: 5px; + padding: 2px; +} + +prompt { + background-color: @blue; + padding: 6px; + text-color: @bg-col; + border-radius: 3px; + margin: 20px 0px 0px 20px; +} + +textbox-prompt-colon { + expand: false; + str: ":"; +} + +entry { + padding: 6px; + margin: 20px 0px 0px 10px; + text-color: @fg-col; + background-color: @bg-col; +} + +listview { + border: 0px 0px 0px; + padding: 6px 0px 0px; + margin: 10px 0px 0px 20px; + columns: 2; + lines: 5; + background-color: @bg-col; +} + +element { + padding: 5px; + background-color: @bg-col; + text-color: @fg-col ; +} + +element-icon { + size: 25px; +} + +element selected { + background-color: @selected-col ; + text-color: @fg-col2 ; +} + +mode-switcher { + spacing: 0; + } + +button { + padding: 10px; + background-color: @bg-col-light; + text-color: @grey; + vertical-align: 0.5; + horizontal-align: 0.5; +} + +button selected { + background-color: @bg-col; + text-color: @blue; +} + +message { + background-color: @bg-col-light; + margin: 2px; + padding: 2px; + border-radius: 5px; +} + +textbox { + padding: 6px; + margin: 20px 0px 0px 20px; + text-color: @blue; + background-color: @bg-col-light; +} diff --git a/nixos/home-manager/env/default.nix b/nixos/home-manager/env/default.nix new file mode 100644 index 00000000..ff15d2d1 --- /dev/null +++ b/nixos/home-manager/env/default.nix @@ -0,0 +1,6 @@ +{ ... }: +{ + imports = [ + ./i3.nix + ]; +} diff --git a/nixos/home-manager/env/dunst.nix b/nixos/home-manager/env/dunst.nix new file mode 100644 index 00000000..b4ee57cb --- /dev/null +++ b/nixos/home-manager/env/dunst.nix @@ -0,0 +1,66 @@ +{ ... }: +{ + services.dunst = { + enable = true; + settings = { + global = { + follow = "mouse"; + width = 300; + height = 300; + origin = "top-right"; + offset = "30x40"; + scale = 0; + notification_limit = 5; + progress_bar = true; + progress_bar_height = 10; + progress_bar_frame_width = 1; + progress_bar_min_width = 150; + progress_bar_max_width = 300; + indicate_hidden = "yes"; + transparency = 16; + separator_height = 2; + padding = 8; + horizontal_padding = 8; + text_icon_padding = 0; + frame_width = 1; + frame_color = "#8AADF4"; + separator_color = "frame"; + sort = "yes"; + idle_threshold = 0; + font = "Noto Sans Regular 9"; + line_height = 0; + markup = "full"; + format = "%s\n%b"; + alignment = "left"; + vertical_alignment = "centre"; + show_age_threshold = 60; + ellipsize = "end"; + ignore_newline = "no"; + stack_duplicates = true; + hide_duplicate_count = false; + show_indicators = true; + icon_position = "left"; + corner_radius = 7; + mouse_left_click = "close_current"; + mouse_middle_click = "do_action, close_current"; + mouse_right_click = "close_all"; + }; + urgency_low = { + background = "#24273A"; + foreground = "#CAD3F5"; + timeout = 5; + }; + urgency_normal = { + background = "#24273A"; + foreground = "#CAD3F5"; + timeout = 5; + }; + urgency_critical = { + background = "#24273A"; + foreground = "#CAD3F5"; + frame_color = "#F5A97F"; + timeout = 120; + }; + }; + }; +} diff --git a/nixos/home-manager/env/i3.nix b/nixos/home-manager/env/i3.nix new file mode 100644 index 00000000..79038e0a --- /dev/null +++ b/nixos/home-manager/env/i3.nix @@ -0,0 +1,37 @@ +{ config, lib, pkgs, ... }: +let + mod = "Mod4"; +in +{ + imports = [ + ./dunst.nix + ./rofi.nix + ]; + home.packages = with pkgs; [ + xfce.thunar + scrot + dex + nitrogen + i3blocks + ]; + #xsession.windowManager.i3 = { + # enable = true; + # config = { + # modifier = mod; + # floating = { + # modifier = mod; + # }; + # fonts = { + # names = ["Noto Sans Regular" "DejaVu Sans Mono"]; + # style = "Regular"; + # size = 12.0; + # }; + # gaps = { + # inner = 6; + # outer = 3; + # }; + # keybindings = import ./config/i3/keybindings.nix; + # startup = import ./config/i3/startup.nix; + # }; + #}; +} diff --git a/nixos/home-manager/env/rofi.nix b/nixos/home-manager/env/rofi.nix new file mode 100644 index 00000000..2b65507b --- /dev/null +++ b/nixos/home-manager/env/rofi.nix @@ -0,0 +1,9 @@ +{ ... }: +{ + programs.rofi = { + enable = true; + location = "right"; + pass.enable = true; + #theme = "$HOME/.dotfiles/nixos/home-manager/env/config/rofi/catppuccin-macchiato.rasi"; + }; +}