From 05f9bc5afd5ac5f671f1dcd3d20774b0987545ec Mon Sep 17 00:00:00 2001 From: Raghuram Subramani Date: Sat, 27 Jan 2024 12:45:54 +0530 Subject: refactor dotfiles, and use nix --- .bash_aliases | 1 - .bashrc | 3 - .config/dunst/dunstrc | 73 ---------- .config/hypr/hyprland.conf | 106 -------------- .config/hypr/hyprpaper.conf | 2 - .config/nvim/init.lua | 192 ------------------------ .config/nvim/lua/compile.lua | 38 ----- .config/picom/picom.conf | 31 ---- .config/rofi/config.rasi | 78 ---------- .config/sxhkd/sxhkdrc | 5 - .config/terminator/config | 27 ---- .config/tofi/config | 24 --- .config/tofi/otherconfig | 314 ---------------------------------------- .config/volumeicon/volumeicon | 28 ---- .config/waybar/config | 57 -------- .config/waybar/style.css | 108 -------------- .dwm/bar.sh | 29 ---- .dwm/power.sh | 12 -- .local/bin/tmux-sessionizer | 15 -- .sessionizer.sh | 25 ---- .tmux.conf | 11 +- 30-touchpad.conf | 6 - DWM.desktop | 5 - README.md | 1 - config/alacritty/alacritty.toml | 11 ++ config/dunst/dunstrc | 63 ++++++++ config/fuzzel/fuzzel.ini | 16 ++ config/hypr/hyprland.conf | 108 ++++++++++++++ config/hypr/hyprpaper.conf | 3 + config/nvim/init.lua | 197 +++++++++++++++++++++++++ config/nvim/lua/compile.lua | 38 +++++ config/waybar/config | 58 ++++++++ config/waybar/style.css | 108 ++++++++++++++ configuration.nix | 181 ++++++++++++++++++----- hardware-configuration.nix | 38 +++++ move_to_unstable.sh | 7 - setup_debian.sh | 98 ------------- sources.list | 2 - 38 files changed, 787 insertions(+), 1332 deletions(-) delete mode 100644 .bash_aliases delete mode 100644 .bashrc delete mode 100644 .config/dunst/dunstrc delete mode 100644 .config/hypr/hyprland.conf delete mode 100644 .config/hypr/hyprpaper.conf delete mode 100644 .config/nvim/init.lua delete mode 100644 .config/nvim/lua/compile.lua delete mode 100644 .config/picom/picom.conf delete mode 100644 .config/rofi/config.rasi delete mode 100644 .config/sxhkd/sxhkdrc delete mode 100644 .config/terminator/config delete mode 100644 .config/tofi/config delete mode 100644 .config/tofi/otherconfig delete mode 100644 .config/volumeicon/volumeicon delete mode 100644 .config/waybar/config delete mode 100644 .config/waybar/style.css delete mode 100755 .dwm/bar.sh delete mode 100755 .dwm/power.sh delete mode 100755 .local/bin/tmux-sessionizer delete mode 100644 .sessionizer.sh delete mode 100644 30-touchpad.conf delete mode 100644 DWM.desktop delete mode 100644 README.md create mode 100644 config/alacritty/alacritty.toml create mode 100644 config/dunst/dunstrc create mode 100644 config/fuzzel/fuzzel.ini create mode 100644 config/hypr/hyprland.conf create mode 100644 config/hypr/hyprpaper.conf create mode 100644 config/nvim/init.lua create mode 100644 config/nvim/lua/compile.lua create mode 100644 config/waybar/config create mode 100644 config/waybar/style.css mode change 100755 => 100644 configuration.nix create mode 100644 hardware-configuration.nix delete mode 100644 move_to_unstable.sh delete mode 100644 setup_debian.sh delete mode 100644 sources.list diff --git a/.bash_aliases b/.bash_aliases deleted file mode 100644 index bd6affd..0000000 --- a/.bash_aliases +++ /dev/null @@ -1 +0,0 @@ -alias copy="xclip -sel clip" diff --git a/.bashrc b/.bashrc deleted file mode 100644 index e03f566..0000000 --- a/.bashrc +++ /dev/null @@ -1,3 +0,0 @@ -source $HOME/.sessionizer.sh -bind '"\C-f": "sessionizer\n"' -bind '"\C-F": "sessionizer -cd\n"' diff --git a/.config/dunst/dunstrc b/.config/dunst/dunstrc deleted file mode 100644 index 52973b6..0000000 --- a/.config/dunst/dunstrc +++ /dev/null @@ -1,73 +0,0 @@ -[global] - monitor = 0 - follow = none - geometry = "300x5-30+20" - indicate_hidden = yes - shrink = no - transparency = 0 - notification_height = 0 - separator_height = 2 - padding = 8 - horizontal_padding = 8 - frame_width = 3 - frame_color = "#aaaaaa" - separator_color = frame - sort = yes - idle_threshold = 120 - font = Monospace 8 - line_height = 0 - markup = full - format = "%s\n%b" - alignment = left - vertical_alignment = center - show_age_threshold = 60 - word_wrap = yes - ellipsize = middle - ignore_newline = no - stack_duplicates = true - hide_duplicate_count = false - show_indicators = yes - icon_position = left - min_icon_size = 0 - max_icon_size = 32 - icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/ - sticky_history = yes - history_length = 20 - dmenu = /usr/bin/dmenu -p dunst: - browser = /usr/bin/sensible-browser - always_run_script = true - title = Dunst - class = Dunst - startup_notification = false - verbosity = mesg - corner_radius = 0 - ignore_dbusclose = false - force_xinerama = false - mouse_left_click = close_current - mouse_middle_click = do_action, close_current - mouse_right_click = close_all -[experimental] - per_monitor_dpi = false - -[shortcuts] - close = ctrl+space - close_all = ctrl+shift+space - history = ctrl+grave - context = ctrl+shift+period - -[urgency_low] - background = "#131417" - foreground = "#ffffff" - timeout = 10 - -[urgency_normal] - background = "#131417" - foreground = "#ffffff" - timeout = 10 - -[urgency_critical] - background = "#131417" - foreground = "#ffffff" - timeout = 0 - -# vim: ft=cfg diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf deleted file mode 100644 index 22d71f3..0000000 --- a/.config/hypr/hyprland.conf +++ /dev/null @@ -1,106 +0,0 @@ -monitor=,1920x1080@60,auto,1 - -exec-once = waybar & hyprpaper & dunst & # /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 - -xwayland { - force_zero_scaling = true -} - -input { - kb_layout = us - follow_mouse = 1 - touchpad { - natural_scroll = yes - } - sensitivity = 0 -} - -general { - gaps_in = 4 - gaps_out = 8 - border_size = 2 - col.active_border = rgba(f2f0faff) - col.inactive_border = rgba(272727ff) - - layout = master -} - -decoration { - rounding = 10 - - blur { - enabled = true - size = 3 - passes = 1 - } - - drop_shadow = yes - shadow_range = 4 - shadow_render_power = 3 - col.shadow = rgba(1a1a1aee) -} - -animations { - enabled = yes - - bezier = myBezier, 0.05, 0.9, 0.1, 1.05 - - animation = windows, 1, 4, myBezier - animation = windowsOut, 1, 4, default, popin 80% - animation = fade, 1, 4, default - animation = workspaces, 1, 4, default -} - -master { - new_is_master = false -} - -gestures { - workspace_swipe = true -} - -bind = SUPER SHIFT, RETURN, exec, terminator -bind = SUPER SHIFT, Q, killactive -bind = SUPER SHIFT, B, exit -bind = SUPER, E, exec, dolphin -bind = SUPER SHIFT, F, togglefloating -bind = SUPER, F, fullscreen, 1 -bind = SUPER, SPACE, exec, pkill tofi || tofi-drun - -bind = SUPER, RETURN, layoutmsg, swapwithmaster master -bind = SUPER SHIFT, J, layoutmsg, swapnext -bind = SUPER SHIFT, K, layoutmsg, swapprev - -# Move focus with mainMod + arrow keys -bind = SUPER, L, movefocus, l -bind = SUPER, H, movefocus, r -bind = SUPER, K, movefocus, u -bind = SUPER, J, movefocus, d - -# Switch workspaces with mainMod + [0-9] -bind = SUPER, 1, workspace, 1 -bind = SUPER, 2, workspace, 2 -bind = SUPER, 3, workspace, 3 -bind = SUPER, 4, workspace, 4 -bind = SUPER, 5, workspace, 5 -bind = SUPER, 6, workspace, 6 -bind = SUPER, 7, workspace, 7 -bind = SUPER, 8, workspace, 8 -bind = SUPER, 9, workspace, 9 -bind = SUPER, 0, workspace, 10 - -# Move active window to a workspace with mainMod + SHIFT + [0-9] -bind = SUPER SHIFT, 1, movetoworkspace, 1 -bind = SUPER SHIFT, 2, movetoworkspace, 2 -bind = SUPER SHIFT, 3, movetoworkspace, 3 -bind = SUPER SHIFT, 4, movetoworkspace, 4 -bind = SUPER SHIFT, 5, movetoworkspace, 5 -bind = SUPER SHIFT, 6, movetoworkspace, 6 -bind = SUPER SHIFT, 7, movetoworkspace, 7 -bind = SUPER SHIFT, 8, movetoworkspace, 8 -bind = SUPER SHIFT, 9, movetoworkspace, 9 -bind = SUPER SHIFT, 0, movetoworkspace, 10 - -# Move/resize windows with mainMod + LMB/RMB and dragging -bindm = SUPER, mouse:272, movewindow -bindm = SUPER, mouse:273, resizewindow diff --git a/.config/hypr/hyprpaper.conf b/.config/hypr/hyprpaper.conf deleted file mode 100644 index 2af46e3..0000000 --- a/.config/hypr/hyprpaper.conf +++ /dev/null @@ -1,2 +0,0 @@ -preload = /home/compromyse/Pictures/wallpaper.jpg -wallpaper = ,/home/compromyse/Pictures/wallpaper.jpg diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua deleted file mode 100644 index ffb09a8..0000000 --- a/.config/nvim/init.lua +++ /dev/null @@ -1,192 +0,0 @@ --- General Settings -vim.opt.number = true -vim.opt.mouse = '' -vim.opt.ignorecase = true -vim.opt.smartcase = true -vim.opt.hlsearch = false -vim.opt.wrap = true -vim.opt.breakindent = true -vim.opt.tabstop = 2 -vim.opt.shiftwidth = 2 -vim.opt.expandtab = true -vim.opt.termguicolors = true -vim.opt.splitbelow = true -vim.opt.scrolloff = 5 -vim.opt.mouse = 'a' -vim.api.nvim_set_option('clipboard','unnamedplus') -vim.opt.ruler = false -vim.cmd.colorscheme('rasmus') - --- Reset Cursor On Exit -local au_id = vim.api.nvim_create_augroup('RestoreCursorShapeOnExit', {clear = true}) -vim.api.nvim_create_autocmd('VimLeave',{ - command = 'set guicursor=a:ver20', - group = au_id -}) - --- Setup Packages -require('packer').startup(function(use) - use 'wbthomason/packer.nvim' - use 'lukas-reineke/indent-blankline.nvim' - use 'windwp/nvim-autopairs' - use 'numToStr/Comment.nvim' - - use 'kvrohit/rasmus.nvim' - - use 'hrsh7th/cmp-nvim-lsp' - use 'hrsh7th/nvim-cmp' - use 'neovim/nvim-lspconfig' - use 'hrsh7th/cmp-nvim-lsp-signature-help' - use { - 'nvim-telescope/telescope.nvim', - requires = { {'nvim-lua/plenary.nvim'} } - } - - use 'stevearc/oil.nvim' - - use 'akinsho/toggleterm.nvim' - use 'christoomey/vim-tmux-navigator' - - if install_plugins then - require('packer').sync() - end -end) - -if install_plugins then - return -end - - -local oil = require('oil') -_G.oil = oil -oil.setup { - default_file_explorer = true, - columns = { - 'icon', - }, - view_options = { - show_hidden = true - } -} - -require('ibl').setup() - -require('Comment').setup { - padding = true, - toggler = { - line = '\\\\' - }, - opleader = { - block = '\\\\' - } -} - --- CMP Setup -local cmp = require'cmp' -cmp.setup({ - window = { - completion = cmp.config.window.bordered(), - documentation = cmp.config.window.bordered(), - }, - mapping = cmp.mapping.preset.insert({ - [''] = cmp.mapping.scroll_docs(-4), - [''] = cmp.mapping.scroll_docs(4), - [''] = cmp.mapping.complete(), - [''] = cmp.mapping.confirm({ select = true }), - }), - sources = cmp.config.sources({ - { name = 'nvim_lsp' } - }, { - { name = 'buffer' }, - } - ) -}) -cmp.setup.filetype('gitcommit', { - sources = cmp.config.sources({ - { name = 'cmp_git' }, - }, { - { name = 'buffer' }, - }) -}) -cmp.setup.cmdline({ '/', '?' }, { - mapping = cmp.mapping.preset.cmdline(), - sources = { - { name = 'buffer' } - } -}) -cmp.setup.cmdline(':', { - sources = cmp.config.sources({ - { name = 'path' } - }, { - { name = 'cmdline' } - }) -}) - --- Set Up Lspconfig -local lspconfig = require('lspconfig') -local capabilities = require('cmp_nvim_lsp').default_capabilities() -servers = { 'pyright', 'ccls', 'gopls' } -for _, lsp in pairs(servers) do - lspconfig[lsp].setup { - capabilities = capabilities - } -end - --- Set Up Telescope -local actions = require('telescope.actions') -local telescope = require('telescope') -telescope.setup({ - pickers = { - find_files = { - hidden = true - } - }, - defaults = { - layout_strategy = 'bottom_pane', - layout_config = { - height = 0.4 - }, - }, -}) - --- Set Up ToggleTerm -require('toggleterm').setup { - direction = 'horizontal', - size = math.floor(0.8 * vim.api.nvim_win_get_height(0)) -} - --- Set Up Autopairs -require('nvim-autopairs').setup({ map_cr = true }) - --- Set Up Compile.lua -require('compile') - --- Keyboard Shortcuts -vim.keymap.set('n', 'P', 'pu', { noremap = true }) - -vim.keymap.set('n', '', 'Telescope find_files', { noremap = true }) -vim.keymap.set('n', 'b', 'Telescope buffers', { noremap = true }) -vim.keymap.set('n', 'f', 'Telescope live_grep', { noremap = true }) - -vim.keymap.set('n', '', 'close', { noremap = true }) -vim.keymap.set('n', '', 'bdelete!', { noremap = true }) - -vim.keymap.set('t', '', '', { noremap = true }) - -vim.keymap.set('n', '\\d', vim.lsp.buf.definition, { noremap = true }) -vim.keymap.set('n', '\\f', vim.lsp.buf.declaration, { noremap = true }) - -vim.keymap.set('n', 'K', vim.lsp.buf.hover, { noremap = true }) - -vim.keymap.set('n', '', 'ToggleTerm', { noremap = true }) -vim.keymap.set('t', '', 'ToggleTerm', { noremap = true }) -vim.keymap.set('t', '', 'ToggleTerm', { noremap = true }) - -vim.keymap.set('n', '', 'bnext', { noremap = true }) -vim.keymap.set('n', '', 'bprev', { noremap = true }) - -vim.keymap.set('n', '', 'lua oil.toggle_float()', { noremap = true }) - --- Splitting The Window -vim.api.nvim_set_keymap('n', '', ':vsplit', { noremap = true }) -vim.api.nvim_set_keymap('n', '', ':split', { noremap = true }) diff --git a/.config/nvim/lua/compile.lua b/.config/nvim/lua/compile.lua deleted file mode 100644 index f529b90..0000000 --- a/.config/nvim/lua/compile.lua +++ /dev/null @@ -1,38 +0,0 @@ -local openTerminal = function(command) - local Terminal = require('toggleterm.terminal').Terminal - local term = Terminal:new({ - cmd = command, - direction = 'horizontal' - }) - term:toggle() -end - -local path = vim.fn.getcwd() .. '/.compile' - -local run = function() - local file_exists = os.rename(path, path) - - if file_exists then - openTerminal( - 'echo "Directory: $(pwd)"; echo "Compilation started at $(date +"%H:%M:%S")"; echo; ' - .. 'bash ' .. path .. - '; echo; echo "Compilation finished at $(date +"%H:%M:%S")"; read' - ) - return - end - - local file = io.open(path, 'w') - - file:seek('set') - file:write([[#!/bin/sh -set -xe -]] - ) - file:close() - print('Created ' .. path) - return nil -end - -vim.keymap.set('n', 'zz', function() - run() -end) diff --git a/.config/picom/picom.conf b/.config/picom/picom.conf deleted file mode 100644 index c8f7b71..0000000 --- a/.config/picom/picom.conf +++ /dev/null @@ -1,31 +0,0 @@ -backend = "glx"; -glx-no-stencil = true; -glx-copy-from-front = false; - -# Opacity -active-opacity = 1; -inactive-opacity = 1; -frame-opacity = 1; -inactive-opacity-override = false; - -# Other -mark-wmwin-focused = true; -mark-ovredir-focused = true; -detect-rounded-corners = true; -detect-client-opacity = true; -vsync = true; -dbe = false; -unredir-if-possible = false; -focus-exclude = [ ]; -detect-transient = true; -detect-client-leader = true; - -# Window type settings -wintypes: -{ - dock = { - shadow = false; - }; -}; - -xrender-sync-fence = true; diff --git a/.config/rofi/config.rasi b/.config/rofi/config.rasi deleted file mode 100644 index 58fb98a..0000000 --- a/.config/rofi/config.rasi +++ /dev/null @@ -1,78 +0,0 @@ -configuration { - display-drun: "Applications:"; - display-window: "Windows:"; - drun-display-format: "{name}"; - font: "UbuntuMono Nerd Font Medium 10"; - modi: "window,run,drun"; -} - -@theme "/dev/null" - -* { - bg: #131417; - bg-alt: #1e1f26; - - fg: #d3d7f2; - fg-alt: #787c99; - - background-color: @bg; - - border: 0; - margin: 0; - padding: 0; - spacing: 0; -} - -window { - width: 30%; -} - -element { - padding: 8 0; - text-color: @fg-alt; -} - -element selected { - text-color: @fg; -} - -element-text { - text-color: inherit; - vertical-align: 0.5; -} - -element-icon { - size: 14; - padding: 0 10 0 0; -} - -entry { - background-color: @bg-alt; - padding: 12; - text-color: @fg; -} - -inputbar { - children: [prompt, entry]; -} - -listview { - padding: 8 12; - background-color: @bg; - columns: 1; - lines: 8; -} - -mainbox { - background-color: @bg; - children: [inputbar, listview]; -} - -prompt { - background-color: @bg-alt; - enabled: true; - padding: 12 0 0 12; - text-color: @fg; -} - -/* vim: ft=sass diff --git a/.config/sxhkd/sxhkdrc b/.config/sxhkd/sxhkdrc deleted file mode 100644 index 2f47207..0000000 --- a/.config/sxhkd/sxhkdrc +++ /dev/null @@ -1,5 +0,0 @@ -super + shift + v - /opt/ipman.py paste - -super + shift + s - /opt/ipman.py setip diff --git a/.config/terminator/config b/.config/terminator/config deleted file mode 100644 index 89de990..0000000 --- a/.config/terminator/config +++ /dev/null @@ -1,27 +0,0 @@ -[global_config] - focus = mouse -[keybindings] - split_horiz = Down - split_vert = Right - close_term = c -[profiles] - [[default]] - background_darkness = 0.8 - background_type = transparent - cursor_shape = ibeam - cursor_color = "#aaaaaa" - font = UbuntuMono Nerd Font Mono 10 - show_titlebar = False - scrollbar_position = hidden - scrollback_infinite = True - use_system_font = False - use_theme_colors = True -[layouts] - [[default]] - [[[window0]]] - type = Window - parent = "" - [[[child1]]] - type = Terminal - parent = window0 -[plugins] diff --git a/.config/tofi/config b/.config/tofi/config deleted file mode 100644 index 3ea7c54..0000000 --- a/.config/tofi/config +++ /dev/null @@ -1,24 +0,0 @@ -font = UbuntuMono Nerd Font -font-size = 16 - -background-color = #000D -text-color = #67676b -selection-color = #f2f0fa -prompt-color = #f2f0fa -input-color = #f2f0fa - -prompt-text = "Applications > " -num-results = 10 -result-spacing = 25 - -width = 100% -height = 100% - -border-width = 0 -outline-width = 0 - -padding-left = 35% -padding-top = 30% - -drun-launch = true -matching-algorithm = fuzzy diff --git a/.config/tofi/otherconfig b/.config/tofi/otherconfig deleted file mode 100644 index 2f95e53..0000000 --- a/.config/tofi/otherconfig +++ /dev/null @@ -1,314 +0,0 @@ -# -### Fonts -# - # Font to use, either a path to a font file or a name. - # - # If a path is given, tofi will startup much quicker, but any - # characters not in the chosen font will fail to render. - # - # Otherwise, fonts are interpreted in Pango format. - font = "Sans" - - # Point size of text. - font-size = 24 - - # Comma separated list of OpenType font feature settings to apply, - # if supported by the chosen font. The format is similar to the CSS - # "font-feature-settings" property. - # - # Examples: - # - # font-features = "smcp, c2sc" (all small caps) - # font-features = "liga 0" (disable ligatures) - font-features = "" - - # Comma separated list of OpenType font variation settings to apply - # to variable fonts. The format is similar to the CSS - # "font-variation-settings" property. - # - # Examples: - # - # font-variations = "wght 900" (Extra bold) - # font-variations = "wdth 25, slnt -10" (Narrow and slanted) - font-variations = "" - - # Perform font hinting. Only applies when a path to a font has been - # specified via `font`. Disabling font hinting speeds up text - # rendering appreciably, but will likely look poor at small font pixel - # sizes. - hint-font = true - -# -### Text theming -# - # Default text color - # - # All text defaults to this color if not otherwise specified. - text-color = #FFFFFF - - # All pieces of text have the same theming attributes available: - # - # *-color - # Foreground color - # - # *-background - # Background color - # - # *-background-padding - # Background padding in pixels (comma-delimited, CSS-style list). - # See "DIRECTIONAL VALUES" under `man 5 tofi` for more info. - # - # *-background-corner-radius - # Radius of background box corners in pixels - - # Prompt text theme - # prompt-color = #FFFFFF - prompt-background = #00000000 - prompt-background-padding = 0 - prompt-background-corner-radius = 0 - - # Placeholder text theme - placeholder-color = #FFFFFFA8 - placeholder-background = #00000000 - placeholder-background-padding = 0 - placeholder-background-corner-radius = 0 - - # Input text theme - # input-color = #FFFFFF - input-background = #00000000 - input-background-padding = 0 - input-background-corner-radius = 0 - - # Default result text theme - # default-result-color = #FFFFFF - default-result-background = #00000000 - default-result-background-padding = 0 - default-result-background-corner-radius = 0 - - # Alternate (even-numbered) result text theme - # - # If unspecified, these all default to the corresponding - # default-result-* attribute. - # - # alternate-result-color = #FFFFFF - # alternate-result-background = #00000000 - # alternate-result-background-padding = 0 - # alternate-result-background-corner-radius = 0 - - # Selection text - selection-color = #F92672 - selection-background = #00000000 - selection-background-padding = 0 - selection-background-corner-radius = 0 - - # Matching portion of selection text - selection-match-color = #00000000 - - -# -### Text cursor theme -# - # Style of the optional text cursor. - # - # Supported values: bar, block, underscore - text-cursor-style = bar - - # Color of the text cursor - # - # If unspecified, defaults to the same as input-color - # text-cursor-color = #FFFFFF - - # Color of text behind the text cursor when text-cursor-style = block - # - # If unspecified, defaults to the same as background-color - # text-cursor-background = #000000 - - # Corner radius of the text cursor - text-cursor-corner-radius = 0 - - # Thickness of the bar and underscore text cursors. - # - # If unspecified, defaults to a font-dependent value when - # text-cursor-style = underscore, or to 2 otherwise. - # text-cursor-thickness = 2 - -# -### Text layout -# - # Prompt to display. - prompt-text = "run: " - - # Extra horizontal padding between prompt and input. - prompt-padding = 0 - - # Placeholder input text. - placeholder-text = "" - - # Maximum number of results to display. - # If 0, tofi will draw as many results as it can fit in the window. - num-results = 0 - - # Spacing between results in pixels. Can be negative. - result-spacing = 0 - - # List results horizontally. - horizontal = false - - # Minimum width of input in horizontal mode. - min-input-width = 0 - -# -### Window theming -# - # Width and height of the window. Can be pixels or a percentage. - width = 1280 - height = 720 - - # Window background color - background-color = #1B1D1E - - # Width of the border outlines in pixels. - outline-width = 4 - - # Border outline color - outline-color = #080800 - - # Width of the border in pixels. - border-width = 12 - - # Border color - border-color = #F92672 - - # Radius of window corners in pixels. - corner-radius = 0 - - # Padding between borders and text. Can be pixels or a percentage. - padding-top = 8 - padding-bottom = 8 - padding-left = 8 - padding-right = 8 - - # Whether to clip text drawing to be within the specified padding. This - # is mostly important for allowing text to be inset from the border, - # while still allowing text backgrounds to reach right to the edge. - clip-to-padding = true - - # Whether to scale the window by the output's scale factor. - scale = true - -# -### Window positioning -# - # The name of the output to appear on. An empty string will use the - # default output chosen by the compositor. - output = "" - - # Location on screen to anchor the window to. - # - # Supported values: top-left, top, top-right, right, bottom-right, - # bottom, bottom-left, left, center. - anchor = center - - # Set the size of the exclusive zone. - # - # A value of -1 means ignore exclusive zones completely. - # A value of 0 will move tofi out of the way of other windows' zones. - # A value greater than 0 will set that much space as an exclusive zone. - # - # Values greater than 0 are only meaningful when tofi is anchored to a - # single edge. - exclusive-zone = -1 - - # Window offset from edge of screen. Only has an effect when anchored - # to the relevant edge. Can be pixels or a percentage. - margin-top = 0 - margin-bottom = 0 - margin-left = 0 - margin-right = 0 - -# -### Behaviour -# - # Hide the mouse cursor. - hide-cursor = false - - # Show a text cursor in the input field. - text-cursor = false - - # Sort results by number of usages in run and drun modes. - history = true - - # Specify an alternate file to read and store history information - # from / to. This shouldn't normally be needed, and is intended to - # facilitate the creation of custom modes. - # history-file = /path/to/histfile - - # Select the matching algorithm used. If normal, substring matching is - # used, weighted to favour matches closer to the beginning of the - # string. If prefix, only substrings at the beginning of the string are - # matched. If fuzzy, searching is performed via a simple fuzzy matching - # algorithm. - # - # Supported values: normal, prefix, fuzzy - matching-algorithm = normal - - # If true, require a match to allow a selection to be made. If false, - # making a selection with no matches will print input to stdout. - # In drun mode, this is always true. - require-match = true - - # If true, automatically accept a result if it is the only one - # remaining. If there's only one result on startup, window creation is - # skipped altogether. - auto-accept-single = false - - # If true, typed input will be hidden, and what is displayed (if - # anything) is determined by the hidden-character option. - hide-input = false - - # Replace displayed input characters with a character. If the empty - # string is given, input will be completely hidden. - # This option only has an effect when hide-input is set to true. - hidden-character = "*" - - # If true, use physical keys for shortcuts, regardless of the current - # keyboard layout. If false, use the current layout's keys. - physical-keybindings = true - - # Instead of printing the selected entry, print the 1-based index of - # the selection. This option has no effect in run or drun mode. If - # require-match is set to false, non-matching input will still result - # in the input being printed. - print-index = false - - # If true, directly launch applications on selection when in drun mode. - # Otherwise, just print the command line to stdout. - drun-launch = false - - # The terminal to run terminal programs in when in drun mode. - # This option has no effect if drun-launch is set to true. - # Defaults to the value of the TERMINAL environment variable. - # terminal = foot - - # Delay keyboard initialisation until after the first draw to screen. - # This option is experimental, and will cause tofi to miss keypresses - # for a short time after launch. The only reason to use this option is - # performance on slow systems. - late-keyboard-init = false - - # If true, allow multiple simultaneous processes. - # If false, create a lock file on startup to prevent multiple instances - # from running simultaneously. - multi-instance = false - - # Assume input is plain ASCII, and disable some Unicode handling - # functions. This is faster, but means e.g. a search for "e" will not - # match "é". - ascii-input = false - -# -### Inclusion -# - # Configs can be split between multiple files, and then included - # within each other. - # include = /path/to/config diff --git a/.config/volumeicon/volumeicon b/.config/volumeicon/volumeicon deleted file mode 100644 index 72dddf1..0000000 --- a/.config/volumeicon/volumeicon +++ /dev/null @@ -1,28 +0,0 @@ -[Alsa] -card=default -channel=Master -logarithmic_scale=false - -[Notification] -show_notification=true -notification_type=0 - -[StatusIcon] -stepsize=5 -onclick=pavucontrol -theme=White Gnome -use_panel_specific_icons=false -reverse_scroll_direction=false -lmb_slider=false -mmb_mute=false -use_horizontal_slider=false -show_sound_level=false -use_transparent_background=false - -[Hotkeys] -up_enabled=true -down_enabled=true -mute_enabled=true -up=XF86AudioRaiseVolume -down=XF86AudioLowerVolume -mute=XF86AudioMute diff --git a/.config/waybar/config b/.config/waybar/config deleted file mode 100644 index 68f25d7..0000000 --- a/.config/waybar/config +++ /dev/null @@ -1,57 +0,0 @@ -{ - "layer": "top", - "height": 40, - "modules-left": ["custom/launcher", "hyprland/workspaces", "hyprland/window"], - "modules-right": ["tray", "cpu", "backlight", "battery", "clock"], - - // Modules configuration - "custom/launcher": { - "format": "" - }, - "hyprland/workspaces": { - "persistent-workspaces": { - "*": 10 - }, - "disable-scroll": true, - "format": "{icon}", - "on-click": "activate", - "format-icons": { - "urgent": "󰀨", - "active": "", - "empty": "", - "default": "", - "sort-by-number": true - }, - }, - "hyprland/window": { - "format": "> {title}", - "separate-outputs": true - }, - "tray": { - "spacing": 10 - }, - "clock": { - "timezone": "Asia/Kolkata", - "format": " {:%a, %Y-%m-%d  %H:%M}", - }, - "cpu": { - "format": " {usage}%", - "tooltip": false - }, - "backlight": { - "format": "{icon} {percent}%", - "format-icons": ["", "", "", "", "", "", "", "", ""] - }, - "battery": { - "bat": "BAT1", - "states": { - "warning": 30, - "critical": 15 - }, - "format": "{icon} {capacity}%", - "format-charging": " {capacity}%+", - "format-plugged": " {capacity}%", - "format-icons": ["", "", "", "", ""] - } -} - diff --git a/.config/waybar/style.css b/.config/waybar/style.css deleted file mode 100644 index a42db21..0000000 --- a/.config/waybar/style.css +++ /dev/null @@ -1,108 +0,0 @@ -* { - font-family: UbuntuMono Nerd Font Mono; - font-weight: 500; - font-size: 16px; -} - -window#waybar { - background-color: rgba(27, 27, 27, 1); - color: #f2f0fa; - transition-property: background-color; - transition-duration: .5s; -} - -button { - box-shadow: inset 0 -3px transparent; - border: none; - border-radius: 0px; -} - -button:hover { - background: inherit; -} - -#custom-launcher { - margin: 0 10px; - padding: 0 10px; -} - -#workspaces { - border-radius: 10px; - background-color: #f2f0fa; - color: #272727; - padding: 0 10px; -} - -#workspaces button { - padding: 0 10px; - color: #272727; - background-color: #f2f0fa; -} - -#workspaces button.active { - color: #272727; - background-color: #f2f0fa; -} - -#workspaces button.urgent { - color: #272727; - background-color: #f2f0fa; -} - -#clock { - padding: 0 10px; - margin: 0 10px; - color: #f2f0fa; - border-radius: 0px; -} - -#battery, -#cpu, -#backlight, -#tray { - padding: 0 10px; - margin: 0 0px; - background-color: #f2f0fa; - color: #272727; -} - -#battery { - border-radius: 0px 10px 10px 0px; -} - -#cpu { - border-radius: 10px 0px 0px 10px; -} - -#tray { - border-radius: 10px; - margin: 0 10px; -} - -#window, -#workspaces { - margin: 0 4px; -} - -/* If workspaces is the leftmost module, omit left margin */ -.modules-left > widget:first-child > #workspaces { - margin-left: 0; -} - -#battery.critical:not(.charging) { - background-color: #f53c3c; - color: #ffffff; -} - -label:focus { - background-color: #000000; -} - -#tray > .passive { - -gtk-icon-effect: dim; -} - -#tray > .needs-attention { - -gtk-icon-effect: highlight; - background-color: #eb4d4b; -} diff --git a/.dwm/bar.sh b/.dwm/bar.sh deleted file mode 100755 index 966afe8..0000000 --- a/.dwm/bar.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -battery() { - capacity="$(cat /sys/class/power_supply/BAT1/capacity)" - case "$(cat /sys/class/power_supply/BAT1/status)" in - Charging) printf " $capacity +";; - Discharging) printf " $capacity -";; - Full) printf " $capacity";; - esac -} - -wlan() { - case "$(cat /sys/class/net/wl*/operstate 2>/dev/null)" in - up) echo "󰤨 $(iwgetid -r)";; - down) printf "󰤭 Disconnected";; - esac -} - -clock() { - printf "󱑆 $(date '+%H:%M')" -} - -user() { - printf "$(whoami)" -} - -while(true) do - xsetroot -name "| $(battery) | $(wlan) | $(clock) | $(user) " && sleep 2 -done diff --git a/.dwm/power.sh b/.dwm/power.sh deleted file mode 100755 index e5c5ad2..0000000 --- a/.dwm/power.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -chosen=$(printf " Power Off\n Restart\n Suspend\n Hibernate\n󰗼 Log Out\n Lock" | rofi -dmenu -i -p "Choice:") - -case "$chosen" in - " Power Off") poweroff ;; - " Restart") reboot ;; - " Suspend") systemctl suspend-then-hibernate ;; - " Hibernate") systemctl hibernate ;; - "󰗼 Log Out") killall dwm ;; - " Lock") betterlockscreen -l ;; - *) exit 1 ;; -esac diff --git a/.local/bin/tmux-sessionizer b/.local/bin/tmux-sessionizer deleted file mode 100755 index 8f1c263..0000000 --- a/.local/bin/tmux-sessionizer +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -DIR=$(fdfind --type d --strip-cwd-prefix -L -H | fzf) -SESSION_NAME="$DIR_$(date +%M%S)" - -if [ -n "$DIR" ] -then - tmux new-session -d -c "$DIR" -s "$SESSION_NAME" - if [ -n "$TMUX" ] - then - tmux switch -t "$SESSION_NAME" - else - tmux attach -t "$SESSION_NAME" - fi -fi diff --git a/.sessionizer.sh b/.sessionizer.sh deleted file mode 100644 index 79dde27..0000000 --- a/.sessionizer.sh +++ /dev/null @@ -1,25 +0,0 @@ -sessionizer() { - DIR=$(fdfind . $HOME --type d -L -H | fzf) - SESSION_NAME="$DIR_$(date +%M%S)" - - if [ -n "$DIR" ] - then - if [ "$1" == "-cd" ] - then - cd $DIR - return - fi - tmux new-session -d -c "$DIR" -s "$SESSION_NAME" - if [ -n "$TMUX" ] - then - tmux switch -t "$SESSION_NAME" - else - tmux attach -t "$SESSION_NAME" - fi - fi -} - -if [[ $- != *i* ]] -then - sessionizer -fi diff --git a/.tmux.conf b/.tmux.conf index 5a92a90..94169b0 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -1,4 +1,4 @@ -set -sg escape-time 20 +set -sg escape-time 0 set -g history-limit 10000 set -g status-interval 5 @@ -40,14 +40,13 @@ bind-key c new-window -c "#{pane_current_path}" unbind f bind f split-pane "bash ~/.sessionizer.sh" -bg="#698DDA" +bg="#272727" set -g status-position "bottom" set -g status-style bg=default,fg=default -set -g status-justify "centre" -set -g status-left " #[bg=${bg},fg=#ffffff] tmux " -set -g status-right "compromyse " +set -g status-left " λ " +set -g status-right "" set -g window-status-format " #I:#W " -set -g window-status-current-format "#[bg=${bg},fg=#000000] #I:#W " +set -g window-status-current-format "#[bg=${bg},fg=#f2f0fa] #I:#W " run '~/.tmux/plugins/tpm/tpm' diff --git a/30-touchpad.conf b/30-touchpad.conf deleted file mode 100644 index 86ae81c..0000000 --- a/30-touchpad.conf +++ /dev/null @@ -1,6 +0,0 @@ -Section "InputClass" - Identifier "touchpad catchall" - Driver "libinput" - Option "Tapping" "on" - Option "DisableWhileTyping" "on" -EndSection diff --git a/DWM.desktop b/DWM.desktop deleted file mode 100644 index 68f6cd5..0000000 --- a/DWM.desktop +++ /dev/null @@ -1,5 +0,0 @@ -[Desktop Entry] -Name=Dynamic Window Manager -Comment=This session logs you into DWM -Exec=dwm -Type=XSession diff --git a/README.md b/README.md deleted file mode 100644 index 27ef622..0000000 --- a/README.md +++ /dev/null @@ -1 +0,0 @@ -# dotfiles \ No newline at end of file diff --git a/config/alacritty/alacritty.toml b/config/alacritty/alacritty.toml new file mode 100644 index 0000000..3c39090 --- /dev/null +++ b/config/alacritty/alacritty.toml @@ -0,0 +1,11 @@ +[window] +dynamic_title = true + +[font] +normal = { family = "UbuntuMono Nerd Font Mono", style = "Regular" } +bold = { family = "UbuntuMono Nerd Font Mono", style = "Bold" } +italic = { family = "UbuntuMono Nerd Font Mono", style = "Italic" } +bold_italic = { family = "UbuntuMono Nerd Font Mono", style = "Bold Italic" } + +[cursor] +style = { shape = "Beam" } diff --git a/config/dunst/dunstrc b/config/dunst/dunstrc new file mode 100644 index 0000000..902ba1c --- /dev/null +++ b/config/dunst/dunstrc @@ -0,0 +1,63 @@ +[global] + monitor = 1 + follow = none + indicate_hidden = yes + shrink = no + transparency = 0 + separator_height = 2 + padding = 8 + horizontal_padding = 8 + frame_width = 3 + frame_color = "#aaaaaa" + separator_color = frame + sort = yes + idle_threshold = 120 + font = Monospace 8 + line_height = 0 + markup = full + format = "%s\n%b" + alignment = left + vertical_alignment = center + show_age_threshold = 60 + word_wrap = yes + ellipsize = middle + ignore_newline = no + stack_duplicates = true + hide_duplicate_count = false + show_indicators = yes + icon_position = left + min_icon_size = 0 + max_icon_size = 32 + icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/ + sticky_history = yes + history_length = 20 + dmenu = /usr/bin/dmenu -p dunst: + browser = /usr/bin/sensible-browser + always_run_script = true + title = Dunst + class = Dunst + corner_radius = 0 + ignore_dbusclose = false + force_xinerama = false + mouse_left_click = close_current + mouse_middle_click = do_action, close_current + mouse_right_click = close_all +[experimental] + per_monitor_dpi = false + +[urgency_low] + background = "#131417" + foreground = "#ffffff" + timeout = 10 + +[urgency_normal] + background = "#131417" + foreground = "#ffffff" + timeout = 10 + +[urgency_critical] + background = "#131417" + foreground = "#ffffff" + timeout = 0 + +# vim: ft=cfg diff --git a/config/fuzzel/fuzzel.ini b/config/fuzzel/fuzzel.ini new file mode 100644 index 0000000..42f47df --- /dev/null +++ b/config/fuzzel/fuzzel.ini @@ -0,0 +1,16 @@ +width=50 +font=UbuntuMono Nerd Font:size=8 +terminal=alacritty -e +prompt="> " +layer=overlay +line-height=16 +icons-enabled=no + +[colors] +background=272727ff +selection-text=272727ff +selection-match=272727ff +selection=f2f0faff +text=f2f0faff +match=f2f0faff +border=f2f0faff diff --git a/config/hypr/hyprland.conf b/config/hypr/hyprland.conf new file mode 100644 index 0000000..075dbec --- /dev/null +++ b/config/hypr/hyprland.conf @@ -0,0 +1,108 @@ +monitor=eDP-1,1920x1080@60,0x0,1 +monitor=HDMI-A-1,2560x1440@60,-2560x-350,1 + +exec-once = waybar & hyprpaper & dunst & /nix/store/$(ls -la /nix/store | grep 'polkit-gnome' | grep 4096 | awk '{print $9}' | sed -n '$p')/libexec/polkit-gnome-authentication-agent-1 & blueman-applet & nm-applet + +xwayland { + force_zero_scaling = true +} + +input { + kb_layout = us + follow_mouse = 1 + touchpad { + natural_scroll = yes + } + sensitivity = 0 +} + +general { + gaps_in = 4 + gaps_out = 8 + border_size = 2 + col.active_border = rgba(f2f0faff) + col.inactive_border = rgba(272727ff) + + layout = master +} + +decoration { + rounding = 10 + + blur { + enabled = true + size = 3 + passes = 1 + } + + drop_shadow = yes + shadow_range = 4 + shadow_render_power = 3 + col.shadow = rgba(1a1a1aee) +} + +animations { + enabled = yes + + bezier = myBezier, 0.05, 0.9, 0.1, 1.05 + + animation = windows, 1, 4, myBezier + animation = windowsOut, 1, 4, default, popin 80% + animation = fade, 1, 4, default + animation = workspaces, 1, 4, default +} + +master { + new_is_master = false +} + +gestures { + workspace_swipe = true +} + +bind = SUPER SHIFT, RETURN, exec, alacritty +bind = SUPER SHIFT, Q, killactive +bind = SUPER SHIFT, B, exit +bind = SUPER, E, exec, dolphin +bind = SUPER SHIFT, F, togglefloating +bind = SUPER, F, fullscreen, 1 +bind = SUPER, SPACE, exec, pkill fuzzel || fuzzel +bind = SUPER, X, exec, waylock + +bind = SUPER, RETURN, layoutmsg, swapwithmaster master +bind = SUPER SHIFT, J, layoutmsg, swapnext +bind = SUPER SHIFT, K, layoutmsg, swapprev + +# Move focus with mainMod + arrow keys +bind = SUPER, L, movefocus, l +bind = SUPER, H, movefocus, r +bind = SUPER, K, movefocus, u +bind = SUPER, J, movefocus, d + +# Switch workspaces with mainMod + [0-9] +bind = SUPER, 1, workspace, 1 +bind = SUPER, 2, workspace, 2 +bind = SUPER, 3, workspace, 3 +bind = SUPER, 4, workspace, 4 +bind = SUPER, 5, workspace, 5 +bind = SUPER, 6, workspace, 6 +bind = SUPER, 7, workspace, 7 +bind = SUPER, 8, workspace, 8 +bind = SUPER, 9, workspace, 9 +bind = SUPER, 0, workspace, 10 + +# Move active window to a workspace with mainMod + SHIFT + [0-9] +bind = SUPER SHIFT, 1, movetoworkspace, 1 +bind = SUPER SHIFT, 2, movetoworkspace, 2 +bind = SUPER SHIFT, 3, movetoworkspace, 3 +bind = SUPER SHIFT, 4, movetoworkspace, 4 +bind = SUPER SHIFT, 5, movetoworkspace, 5 +bind = SUPER SHIFT, 6, movetoworkspace, 6 +bind = SUPER SHIFT, 7, movetoworkspace, 7 +bind = SUPER SHIFT, 8, movetoworkspace, 8 +bind = SUPER SHIFT, 9, movetoworkspace, 9 +bind = SUPER SHIFT, 0, movetoworkspace, 10 + +# Move/resize windows with mainMod + LMB/RMB and dragging +bindm = SUPER, mouse:272, movewindow +bindm = SUPER, mouse:273, resizewindow diff --git a/config/hypr/hyprpaper.conf b/config/hypr/hyprpaper.conf new file mode 100644 index 0000000..8204052 --- /dev/null +++ b/config/hypr/hyprpaper.conf @@ -0,0 +1,3 @@ +preload = /home/compromyse/Pictures/wallpaper.jpg +wallpaper = ,/home/compromyse/Pictures/wallpaper.jpg +splash = false diff --git a/config/nvim/init.lua b/config/nvim/init.lua new file mode 100644 index 0000000..f3873b6 --- /dev/null +++ b/config/nvim/init.lua @@ -0,0 +1,197 @@ +-- General Settings +vim.opt.number = true +vim.opt.mouse = '' +vim.opt.ignorecase = true +vim.opt.smartcase = true +vim.opt.hlsearch = false +vim.opt.wrap = true +vim.opt.breakindent = true +vim.opt.tabstop = 2 +vim.opt.shiftwidth = 2 +vim.opt.expandtab = true +vim.opt.termguicolors = true +vim.opt.splitbelow = true +vim.opt.scrolloff = 5 +vim.opt.mouse = 'a' +vim.api.nvim_set_option('clipboard','unnamedplus') +vim.opt.ruler = false +vim.cmd.colorscheme('rasmus') + +-- Reset Cursor On Exit +local au_id = vim.api.nvim_create_augroup('RestoreCursorShapeOnExit', {clear = true}) +vim.api.nvim_create_autocmd('VimLeave',{ + command = 'set guicursor=a:ver20', + group = au_id +}) + +-- Setup Packages +require('packer').startup(function(use) + use 'wbthomason/packer.nvim' + use 'lukas-reineke/indent-blankline.nvim' + use 'windwp/nvim-autopairs' + use 'numToStr/Comment.nvim' + + use 'kvrohit/rasmus.nvim' + + use 'hrsh7th/cmp-nvim-lsp' + use 'hrsh7th/nvim-cmp' + use 'neovim/nvim-lspconfig' + use 'hrsh7th/cmp-nvim-lsp-signature-help' + use { + 'nvim-telescope/telescope.nvim', + requires = { {'nvim-lua/plenary.nvim'} } + } + + use 'stevearc/oil.nvim' + + use 'akinsho/toggleterm.nvim' + use 'christoomey/vim-tmux-navigator' + + if install_plugins then + require('packer').sync() + end +end) + +if install_plugins then + return +end + + +local oil = require('oil') +_G.oil = oil +oil.setup { + default_file_explorer = true, + columns = { + 'icon', + }, + view_options = { + show_hidden = true + } +} + +require('ibl').setup() + +require('Comment').setup { + padding = true, + toggler = { + line = '\\\\' + }, + opleader = { + block = '\\\\' + } +} + +-- CMP Setup +local cmp = require'cmp' +cmp.setup({ + window = { + completion = cmp.config.window.bordered(), + documentation = cmp.config.window.bordered(), + }, + mapping = cmp.mapping.preset.insert({ + [''] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs(4), + [''] = cmp.mapping.complete(), + [''] = cmp.mapping.confirm({ select = true }), + }), + sources = cmp.config.sources({ + { name = 'nvim_lsp' } + }, { + { name = 'buffer' }, + } + ) +}) +cmp.setup.filetype('gitcommit', { + sources = cmp.config.sources({ + { name = 'cmp_git' }, + }, { + { name = 'buffer' }, + }) +}) +cmp.setup.cmdline({ '/', '?' }, { + mapping = cmp.mapping.preset.cmdline(), + sources = { + { name = 'buffer' } + } +}) +cmp.setup.cmdline(':', { + sources = cmp.config.sources({ + { name = 'path' } + }, { + { name = 'cmdline' } + }) +}) + +-- Set Up Lspconfig +local lspconfig = require('lspconfig') +local capabilities = require('cmp_nvim_lsp').default_capabilities() +servers = { 'pyright', 'ccls', 'gopls' } +for _, lsp in pairs(servers) do + lspconfig[lsp].setup { + capabilities = capabilities + } +end + +-- Set Up Telescope +local actions = require('telescope.actions') +local telescope = require('telescope') +telescope.setup({ + pickers = { + find_files = { + hidden = true + } + }, + defaults = { + layout_strategy = 'bottom_pane', + layout_config = { + height = 0.4 + }, + }, +}) + +-- Set Up ToggleTerm +require('toggleterm').setup { + direction = 'horizontal', + size = math.floor(0.8 * vim.api.nvim_win_get_height(0)) +} + +-- Set Up Autopairs +require('nvim-autopairs').setup({ map_cr = true }) + +-- Set Up Compile.lua +require('compile') + +-- Keyboard Shortcuts +vim.keymap.set('n', 'P', 'pu', { noremap = true }) + +vim.keymap.set('n', '', 'Telescope find_files', { noremap = true }) +vim.keymap.set('n', 'b', 'Telescope buffers', { noremap = true }) +vim.keymap.set('n', 'f', 'Telescope live_grep', { noremap = true }) + +vim.keymap.set('n', '', 'close', { noremap = true }) +vim.keymap.set('n', '', 'bdelete!', { noremap = true }) + +vim.keymap.set('t', '', '', { noremap = true }) + +vim.keymap.set('n', '\\d', vim.lsp.buf.definition, { noremap = true }) +vim.keymap.set('n', '\\f', vim.lsp.buf.declaration, { noremap = true }) + +vim.keymap.set('n', 'K', vim.lsp.buf.hover, { noremap = true }) + +vim.keymap.set('n', '', 'ToggleTerm', { noremap = true }) +vim.keymap.set('t', '', 'ToggleTerm', { noremap = true }) +vim.keymap.set('t', '', 'ToggleTerm', { noremap = true }) + +vim.keymap.set('n', '', 'bnext', { noremap = true }) +vim.keymap.set('n', '', 'bprev', { noremap = true }) + +vim.keymap.set('n', '', 'TmuxNavigateLeft', { noremap = true }) +vim.keymap.set('n', '', 'TmuxNavigateDown', { noremap = true }) +vim.keymap.set('n', '', 'TmuxNavigateUp', { noremap = true }) +vim.keymap.set('n', '', 'TmuxNavigateRight', { noremap = true }) + +vim.keymap.set('n', '', 'lua oil.toggle_float()', { noremap = true }) + +-- Splitting The Window +vim.api.nvim_set_keymap('n', '', ':vsplit', { noremap = true }) +vim.api.nvim_set_keymap('n', '', ':split', { noremap = true }) diff --git a/config/nvim/lua/compile.lua b/config/nvim/lua/compile.lua new file mode 100644 index 0000000..f529b90 --- /dev/null +++ b/config/nvim/lua/compile.lua @@ -0,0 +1,38 @@ +local openTerminal = function(command) + local Terminal = require('toggleterm.terminal').Terminal + local term = Terminal:new({ + cmd = command, + direction = 'horizontal' + }) + term:toggle() +end + +local path = vim.fn.getcwd() .. '/.compile' + +local run = function() + local file_exists = os.rename(path, path) + + if file_exists then + openTerminal( + 'echo "Directory: $(pwd)"; echo "Compilation started at $(date +"%H:%M:%S")"; echo; ' + .. 'bash ' .. path .. + '; echo; echo "Compilation finished at $(date +"%H:%M:%S")"; read' + ) + return + end + + local file = io.open(path, 'w') + + file:seek('set') + file:write([[#!/bin/sh +set -xe +]] + ) + file:close() + print('Created ' .. path) + return nil +end + +vim.keymap.set('n', 'zz', function() + run() +end) diff --git a/config/waybar/config b/config/waybar/config new file mode 100644 index 0000000..24cb4f0 --- /dev/null +++ b/config/waybar/config @@ -0,0 +1,58 @@ +{ + "layer": "top", + "output": "eDP-1", + "height": 40, + "modules-left": ["custom/launcher", "hyprland/workspaces", "hyprland/window"], + "modules-right": ["tray", "cpu", "backlight", "battery", "clock"], + + // Modules configuration + "custom/launcher": { + "format": "" + }, + "hyprland/workspaces": { + "persistent-workspaces": { + "*": 10 + }, + "disable-scroll": true, + "format": "{icon}", + "on-click": "activate", + "format-icons": { + "urgent": "󰀨", + "active": "", + "empty": "", + "default": "", + "sort-by-number": true + }, + }, + "hyprland/window": { + "format": "> {title}", + "separate-outputs": false + }, + "tray": { + "spacing": 10 + }, + "clock": { + "timezone": "Asia/Kolkata", + "format": " {:%a, %Y-%m-%d  %H:%M}", + }, + "cpu": { + "format": " {usage}%", + "tooltip": false + }, + "backlight": { + "format": "{icon} {percent}%", + "format-icons": ["", "", "", "", "", "", "", "", ""] + }, + "battery": { + "bat": "BAT1", + "states": { + "warning": 30, + "critical": 15 + }, + "format": "{icon} {capacity}%", + "format-charging": " {capacity}%+", + "format-plugged": " {capacity}%", + "format-icons": ["", "", "", "", ""] + } +} + diff --git a/config/waybar/style.css b/config/waybar/style.css new file mode 100644 index 0000000..a42db21 --- /dev/null +++ b/config/waybar/style.css @@ -0,0 +1,108 @@ +* { + font-family: UbuntuMono Nerd Font Mono; + font-weight: 500; + font-size: 16px; +} + +window#waybar { + background-color: rgba(27, 27, 27, 1); + color: #f2f0fa; + transition-property: background-color; + transition-duration: .5s; +} + +button { + box-shadow: inset 0 -3px transparent; + border: none; + border-radius: 0px; +} + +button:hover { + background: inherit; +} + +#custom-launcher { + margin: 0 10px; + padding: 0 10px; +} + +#workspaces { + border-radius: 10px; + background-color: #f2f0fa; + color: #272727; + padding: 0 10px; +} + +#workspaces button { + padding: 0 10px; + color: #272727; + background-color: #f2f0fa; +} + +#workspaces button.active { + color: #272727; + background-color: #f2f0fa; +} + +#workspaces button.urgent { + color: #272727; + background-color: #f2f0fa; +} + +#clock { + padding: 0 10px; + margin: 0 10px; + color: #f2f0fa; + border-radius: 0px; +} + +#battery, +#cpu, +#backlight, +#tray { + padding: 0 10px; + margin: 0 0px; + background-color: #f2f0fa; + color: #272727; +} + +#battery { + border-radius: 0px 10px 10px 0px; +} + +#cpu { + border-radius: 10px 0px 0px 10px; +} + +#tray { + border-radius: 10px; + margin: 0 10px; +} + +#window, +#workspaces { + margin: 0 4px; +} + +/* If workspaces is the leftmost module, omit left margin */ +.modules-left > widget:first-child > #workspaces { + margin-left: 0; +} + +#battery.critical:not(.charging) { + background-color: #f53c3c; + color: #ffffff; +} + +label:focus { + background-color: #000000; +} + +#tray > .passive { + -gtk-icon-effect: dim; +} + +#tray > .needs-attention { + -gtk-icon-effect: highlight; + background-color: #eb4d4b; +} diff --git a/configuration.nix b/configuration.nix old mode 100755 new mode 100644 index c4940ef..691a311 --- a/configuration.nix +++ b/configuration.nix @@ -1,10 +1,12 @@ { config, pkgs, ... }: { - imports = - [ - ./hardware-configuration.nix - ]; + imports = [ + ./hardware-configuration.nix + + ]; + + nix.settings.experimental-features = [ "nix-command" "flakes" ]; # Use the systemd-boot EFI boot loader. boot.loader.systemd-boot.enable = true; @@ -13,6 +15,11 @@ networking.hostName = "OwO"; networking.networkmanager.enable = true; + fileSystems."/data" = { + device = "/dev/sda"; + fsType = "ext4"; + }; + time.timeZone = "Asia/Kolkata"; nixpkgs.config.allowUnfree = true; @@ -55,6 +62,10 @@ }; }; + services.logind.extraConfig = '' + HandlePowerKey=ignore + ''; + systemd.services.greetd.serviceConfig = { Type = "idle"; StandardInput = "tty"; @@ -65,55 +76,146 @@ TTYVTDisallocate = true; }; - /* nixpkgs.overlays = [ - (self: super: { - waybar = super.waybar.overrideAttrs (oldAttrs: { - src = super.fetchFromGitHub { - owner = "Alexays"; - repo = "waybar"; - rev = "e46f66b4687eb807b6fc9c6714e52c52d0885926"; - hash = "sha256-bNzLLkkhH1MZmBneP3PH3xkED0hDWXyiaMqNWF2ilII="; - }; - }); - }) - ]; */ + environment.etc."inputrc".text = pkgs.lib.mkForce ( + builtins.readFile + '' + set completion-ignore-case on + '' + ); users.users.compromyse = { isNormalUser = true; extraGroups = [ "wheel" "storage" "libvirtd" ]; - packages = with pkgs; [ - neofetch - ]; }; - environment.systemPackages = with pkgs; [ - vim - wget - git + home-manager.useUserPackages = true; + home-manager.useGlobalPkgs = true; - polkit_gnome + home-manager.users.compromyse = { pkgs, ... }: { + home.packages = with pkgs; [ + wget + + tmux + fzf + fd + ripgrep + + cinnamon.nemo + mate.eom + + spotify + firefox + + pavucontrol + blueman + brillo + ]; + + programs.bash = { + enable = true; + initExtra= '' + export PS1="\[\e[38;5;243m\]\h \[\e[38;5;254m\]\w \[\033[0m\]> " + + sessionizer() { + DIR=$(fd . $HOME --type d -L -H | fzf) + SESSION_NAME="$DIR_$(date +%M%S)" + + if [ -n "$DIR" ] + then + if [ "$1" == "-cd" ] + then + cd $DIR + return + fi + tmux new-session -d -c "$DIR" -s "$SESSION_NAME" + if [ -n "$TMUX" ] + then + tmux switch -t "$SESSION_NAME" + else + tmux attach -t "$SESSION_NAME" + fi + fi + } + + if [[ $- != *i* ]] + then + sessionizer + fi + + bind '"\C-f": "sessionizer\n"' + bind '"\C-F": "sessionizer -cd\n"' + ''; + }; + + programs.git = { + enable = true; + userName = "Raghuram Subramani"; + userEmail = "raghus2247@gmail.com"; + }; + + programs.neovim = { + enable = true; + defaultEditor = true; + viAlias = true; + vimAlias = true; + vimdiffAlias = true; + }; + + + programs.alacritty = { + enable = true; + }; + + home.file = { + ".tmux.conf".source = ./.tmux.conf; + ".fdignore".source = ./.fdignore; + ".config" = { + source = ./config; + recursive = true; + }; + }; + + home.pointerCursor = { + gtk.enable = true; + package = pkgs.bibata-cursors; + name = "Bibata-Modern-Classic"; + size = 16; + }; + + gtk = { + enable = true; + + theme = { name = "adw-gtk3-dark"; package = pkgs.adw-gtk3; }; + iconTheme = { name = "Papirus-Light"; package = pkgs.papirus-icon-theme; }; + + font = { name = "UbuntuMono Nerd Font"; }; + }; + + qt = { + enable = true; + platformTheme = "gtk"; + style.name = "adwaita-dark"; + }; + + home.stateVersion = "23.11"; + programs.home-manager.enable = true; + }; + environment.systemPackages = with pkgs; [ waybar + tofi fuzzel dunst hyprpaper - greetd.tuigreet - greetd.greetd - terminator - firefox - spotify - virt-manager + networkmanagerapplet - pavucontrol - blueman + greetd.tuigreet + greetd.greetd + polkit_gnome + waylock libnotify libappindicator - - materia-theme - papirus-icon-theme - capitaine-cursors ]; fonts.packages = with pkgs; [ @@ -128,9 +230,10 @@ }; security.polkit.enable = true; + security.pam.services.waylock.text = '' + auth include login + ''; - system.copySystemConfiguration = true; - - system.stateVersion = "unstable"; + system.stateVersion = "23.11"; } diff --git a/hardware-configuration.nix b/hardware-configuration.nix new file mode 100644 index 0000000..4618943 --- /dev/null +++ b/hardware-configuration.nix @@ -0,0 +1,38 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/347f3061-af46-40c7-aae3-fd4546cebb24"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/03DC-FCFF"; + fsType = "vfat"; + }; + + swapDevices = [ ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp3s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/move_to_unstable.sh b/move_to_unstable.sh deleted file mode 100644 index dc48868..0000000 --- a/move_to_unstable.sh +++ /dev/null @@ -1,7 +0,0 @@ -# Install Debian Unstable -sudo cp sources.list /etc/apt/sources.list -sudo apt-get update -sudo apt-get -y full-upgrade -sudo apt-get -y dist-upgrade - -echo "Reboot To Finish.." diff --git a/setup_debian.sh b/setup_debian.sh deleted file mode 100644 index 33a1933..0000000 --- a/setup_debian.sh +++ /dev/null @@ -1,98 +0,0 @@ -#!/bin/bash - -CURRENT_DIR=$(pwd) -TEMP_DIR=$CURRENT_DIR/temp -rm -rf $TEMP_DIR -mkdir $TEMP_DIR - -# Warning To Install Debian Unstable -echo "Please run \"move_to_unstable.sh\" before this." -read -p "Press enter to continue..." - -# Add `bash_aliases` -cp .bash_aliases $HOME - -# Install Dependancies -sudo apt-get -y install git curl wget build-essential unzip autoconf autotools-dev libpam0g-dev libxcomposite-dev -sudo apt-get -y install libxft-dev libx11-dev libxinerama-dev libpam0g-dev libxcb1-dev xorg libpam0g-dev libxmu-dev -sudo apt-get -y install fonts-droid-fallback fonts-font-awesome j4-dmenu-desktop mate-polkit feh picom dunst network-manager-gnome volumeicon-alsa blueman xss-lock -sudo apt-get -y install lxappearance materia-gtk-theme papirus-icon-theme breeze-cursor-theme - -# Change `/opt` Permissions -sudo chown $USER:$USER -R /opt - -# Go To `/opt` And Clone Repositories -cd /opt -git clone https://github.com/compromyse/dwm - -# Install `DWM` -cd /opt/dwm -make -sudo make install -make clean - -# Install `ly` -cd /opt -git clone --recurse-submodules https://github.com/fairyglade/ly -cd /opt/ly -make -sudo make install -sudo make installsystemd -sudo systemctl enable ly.service - -# Install `xsecurelock` -cd /opt -git clone https://github.com/google/xsecurelock -cd xsecurelock -sh autogen.sh -echo "Enter a PAM service name (in /etc/pam.d): " -read choice -./configure --with-pam-service-name=$choice -make -sudo make install -make clean - -# Add `DWM.desktop` -sudo mkdir /usr/share/xsessions -cd $CURRENT_DIR -sudo cp DWM.desktop /usr/share/xsessions - -# Install `WMName` -cd /opt -git clone https://git.suckless.org/wmname -cd /opt/wmname -make -sudo make install -make clean - -# Add Dotfiles -cd $CURRENT_DIR/.config -cp -r * $HOME/.config -cd $CURRENT_DIR -cp -r .dwm $HOME - -# Install `packer.nvim` -git clone --depth 1 https://github.com/wbthomason/packer.nvim ~/.local/share/nvim/site/pack/packer/start/packer.nvim - -# Install Font -mkdir $HOME/.fonts -cd $TEMP_DIR -wget https://github.com/ryanoasis/nerd-fonts/releases/latest/download/UbuntuMono.zip -unzip UbuntuMono.zip -mv *.ttf $HOME/.fonts -cd $CURRENT_DIR - -# Install Programs -sudo apt-get install -y terminator nemo - -# Make `bash` Case Insensitive -echo 'set completion-ignore-case On' | sudo tee -a /etc/inputrc - -# Make systemd ignore power key -echo "HandlePowerKey=ignore" | sudo tee -a /etc/systemd/logind.conf - -# Copy touchpad configuration -sudo cp 30-touchpad.conf /etc/X11/xorg.conf.d/30-touchpad.conf - -# Remove The Temporary Directory -rm -rf $TEMP_DIR diff --git a/sources.list b/sources.list deleted file mode 100644 index 52cf4d9..0000000 --- a/sources.list +++ /dev/null @@ -1,2 +0,0 @@ -# Unstable Repository -deb http://deb.debian.org/debian/ sid main non-free contrib -- cgit v1.2.3