Removed backup folder

Majority of this has been ported over and I don't need it as a reference
as much anymore.
This commit is contained in:
Alejandro Angulo 2023-04-02 15:45:19 -07:00
parent 766bb7f737
commit 37c3a97fdd
Signed by: alejandro-angulo
GPG key ID: 75579581C74554B6
16 changed files with 0 additions and 3086 deletions

View file

@ -1,33 +0,0 @@
{
config,
pkgs,
...
}: {
home.packages = [pkgs.alacritty];
programs.alacritty = {
enable = true;
settings = {
window.opacity = 0.9;
font = {
size = 11.0;
normal = {
family = "Hack Nerd Font";
style = "Regular";
};
bold = {
family = "Hack Nerd Font";
style = "Bold";
};
italic = {
family = "Hack Nerd Font";
style = "Italic";
};
bold_italic = {
family = "Hack Nerd Font";
style = "Bold Italic";
};
};
};
};
}

View file

@ -1,61 +0,0 @@
{
config,
pkgs,
...
}: {
home.packages = with pkgs; [
git
git-crypt
];
programs.git = {
delta = {
enable = true;
options = {
line-numbers = true;
navigate = true;
};
};
enable = true;
userName = "Alejandro Angulo";
userEmail = "iam@alejandr0angul0.dev";
aliases = {
lol = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative";
pushup = "push -u origin HEAD";
};
signing = {
key = "0xE1B13CCEFDEDDFB7";
signByDefault = true;
};
ignores = [
# PyCharm
".idea/"
# Vim artifacts
"*.swp"
"*.swo"
"tags"
".vimspector.json"
".vimlocal"
"Session.vim*"
# direnv
".envrc"
".direnv"
];
extraConfig = {
init = {
defaultBranch = "main";
};
pull = {
rebase = true;
};
};
};
}

View file

@ -1,38 +0,0 @@
{
config,
pkgs,
...
}: {
home.packages = with pkgs; [
gnupg
pinentry-curses
];
programs.gpg = {
enable = true;
scdaemonSettings = {
# Fix conflicts with config in common/yubikey.nix
disable-ccid = true;
};
};
programs.ssh = {
enable = true;
matchBlocks = {
"pi" = {
user = "nixos";
};
};
};
services.gpg-agent = {
enable = true;
pinentryFlavor = "curses";
enableZshIntegration = true;
enableSshSupport = true;
sshKeys = [
# run `gpg-connect-agent 'keyinfo --list' /bye` to get these values for existing keys
"E274D5078327CB6C8C83CFF102CC12A2D493C77F"
];
};
}

View file

@ -1,49 +0,0 @@
{
config,
pkgs,
...
}: {
imports = [
./alacritty.nix
./git.nix
./git.nix
./gpg.nix
./mako.nix
./rofi.nix
./sway/sway.nix
./tmux.nix
#./vim/vim.nix
./neovim.nix
./zsh.nix
];
home.packages = with pkgs; [
kitty
signal-desktop
nodejs # For vim's CoC plugin
pamixer # For sway binding to control audio
# TODO: Remove this? Need to add programs.light.enable in system config
#light # For sway binding to control backlight
#swaynagmode
python310
gammastep # Requires `services.geoclue2.enable` set in system config
super-slicer
firefox
kanshi
#pkgs.busybox
playerctl
];
services.gammastep = {
enable = true;
provider = "geoclue2";
#latitude = 34.0;
#longitude = -118.4;
};
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
}

View file

@ -1,24 +0,0 @@
{
config,
pkgs,
...
}: {
home.packages = with pkgs; [
mako
libnotify
];
# TODO: Add hack nerd font
programs.mako = {
enable = true;
font = "'Hack Nerd Font' Regular 9";
backgroundColor = "#1D2021F0";
textColor = "#FFFFDF";
borderColor = "#1C1C1C";
borderRadius = 10;
padding = "10";
};
}

View file

@ -1,359 +0,0 @@
{
config,
pkgs,
...
}: {
home.packages = with pkgs; [fzf fd];
programs.neovim = {
enable = true;
withNodeJs = true;
withPython3 = true;
extraPython3Packages = ps: with ps; [black isort flake8 ipdb];
#extraPackages = with pkgs; [];
plugins = with pkgs.vimPlugins; [
# tree-sitter (code parser)
(nvim-treesitter.withPlugins (_: pkgs.tree-sitter.allGrammars))
# git integration
gitgutter
fugitive
rhubarb
# coc plugins
coc-json
coc-yaml
coc-pyright
coc-spell-checker
coc-rust-analyzer
# Eye candy
nvim-web-devicons
# base16-vim
nvim-base16
{
plugin = lualine-nvim;
type = "lua";
config = ''
require('lualine').setup {
options = {
icons_enabled = true,
theme = 'auto',
component_separators = { left = '', right = ''},
section_separators = { left = '', right = ''},
disabled_filetypes = {
statusline = {},
winbar = {},
},
ignore_focus = {},
always_divide_middle = true,
globalstatus = false,
refresh = {
statusline = 1000,
tabline = 1000,
winbar = 1000,
}
},
sections = {
lualine_a = {'mode'},
lualine_b = {'branch', 'diff', 'diagnostics'},
lualine_c = {'filename'},
lualine_x = {'encoding', 'fileformat', 'filetype'},
lualine_y = {'progress'},
lualine_z = {'location'}
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = {'filename'},
lualine_x = {'location'},
lualine_y = {},
lualine_z = {}
},
tabline = {},
winbar = {},
inactive_winbar = {},
extensions = {}
}
'';
}
# tmux integration
tmux-navigator
tmuxline-vim
vim-obsession
vim-nix
# Telescope (fuzzy finding)
telescope-nvim # Config for this in `extraConfig` since it depends on <leader> and I override that. (Generated config places plugin config above contents of extraConfig
{
plugin = telescope-file-browser-nvim;
type = "lua";
config = ''
vim.api.nvim_set_keymap(
"n",
"<space>fb",
":Telescope file_browser<CR>",
{ noremap = true }
)
require("telescope").load_extension("file_browser")
'';
}
{
plugin = telescope-coc-nvim;
type = "lua";
config = ''
require("telescope").setup({
extensions = {
coc = {
prefer_locations = true;
}
}
})
require("telescope").load_extension("coc")
vim.api.nvim_set_keymap(
"n",
"<leader>coc",
":Telescope coc<CR>",
{ noremap = true }
)
'';
}
];
coc = {
enable = true;
settings = ''
{
coc.preferences.formatOnSaveFiletypes": [
"*"
],
python.formatting.provider": "black"
}
'';
# Copied the below from coc's README
pluginConfig =
''
" Some servers have issues with backup files, see #649.
set nobackup
set nowritebackup
" Having longer updatetime (default is 4000 ms = 4 s) leads to noticeable
" delays and poor user experience.
set updatetime=300
" Always show the signcolumn, otherwise it would shift the text each time
" diagnostics appear/become resolved.
set signcolumn=yes
" Use tab for trigger completion with characters ahead and navigate.
" NOTE: There's always complete item selected by default, you may want to enable
" no select by `"suggest.noselect": true` in your configuration file.
" NOTE: Use command ':verbose imap <tab>' to make sure tab is not mapped by
" other plugin before putting this into your config.
inoremap <silent><expr> <TAB>
\ coc#pum#visible() ? coc#pum#next(1) :
\ CheckBackspace() ? "\<Tab>" :
\ coc#refresh()
inoremap <expr><S-TAB> coc#pum#visible() ? coc#pum#prev(1) : "\<C-h>"
" Make <CR> to accept selected completion item or notify coc.nvim to format
" <C-g>u breaks current undo, please make your own choice.
inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm()
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
function! CheckBackspace() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~# '\s'
endfunction
" Use <c-space> to trigger completion.
if has('nvim')
inoremap <silent><expr> <c-space> coc#refresh()
else
inoremap <silent><expr> <c-@> coc#refresh()
endif
" Use `[g` and `]g` to navigate diagnostics
" Use `:CocDiagnostics` to get all diagnostics of current buffer in location list.
nmap <silent> [g <Plug>(coc-diagnostic-prev)
nmap <silent> ]g <Plug>(coc-diagnostic-next)
" GoTo code navigation.
nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references)
" Use K to show documentation in preview window.
nnoremap <silent> K :call ShowDocumentation()<CR>
function! ShowDocumentation()
if CocAction('hasProvider', 'hover')
call CocActionAsync('doHover')
else
call feedkeys('K', 'in')
endif
endfunction
" Highlight the symbol and its references when holding the cursor.
autocmd CursorHold * silent call CocActionAsync('highlight')
" Symbol renaming.
nmap <leader>rn <Plug>(coc-rename)
" Formatting selected code.
xmap <leader>f <Plug>(coc-format-selected)
nmap <leader>f <Plug>(coc-format-selected)
augroup mygroup
autocmd!
" Setup formatexpr specified filetype(s).
autocmd FileType typescript,json setl formatexpr=CocAction('formatSelected')
" Update signature help on jump placeholder.
autocmd User CocJumpPlaceholder call CocActionAsync('showSignatureHelp')
augroup end
" Applying codeAction to the selected region.
" Example: `<leader>aap` for current paragraph
xmap <leader>a <Plug>(coc-codeaction-selected)
nmap <leader>a <Plug>(coc-codeaction-selected)
" Remap keys for applying codeAction to the current buffer.
nmap <leader>ac <Plug>(coc-codeaction)
" Apply AutoFix to problem on the current line.
nmap <leader>qf <Plug>(coc-fix-current)
" Run the Code Lens action on the current line.
nmap <leader>cl <Plug>(coc-codelens-action)
" Map function and class text objects
" NOTE: Requires 'textDocument.documentSymbol' support from the language server.
xmap if <Plug>(coc-funcobj-i)
omap if <Plug>(coc-funcobj-i)
xmap af <Plug>(coc-funcobj-a)
omap af <Plug>(coc-funcobj-a)
xmap ic <Plug>(coc-classobj-i)
omap ic <Plug>(coc-classobj-i)
xmap ac <Plug>(coc-classobj-a)
omap ac <Plug>(coc-classobj-a)
" Remap <C-f> and <C-b> for scroll float windows/popups.
if has('nvim-0.4.0') || has('patch-8.2.0750')
nnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
nnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
inoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(1)\<cr>" : "\<Right>"
inoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(0)\<cr>" : "\<Left>"
vnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
vnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
endif
" Use CTRL-S for selections ranges.
" Requires 'textDocument/selectionRange' support of language server.
nmap <silent> <C-s> <Plug>(coc-range-select)
xmap <silent> <C-s> <Plug>(coc-range-select)
" Add `:Format` command to format current buffer.
command! -nargs=0 Format :call CocActionAsync('format')
" Add `:Fold` command to fold current buffer.
command! -nargs=? Fold :call CocAction('fold', <f-args>)
" Add `:OR` command for organize imports of the current buffer.
command! -nargs=0 OR :call CocActionAsync('runCommand', 'editor.action.organizeImport')
" Add (Neo)Vim's native statusline support.
" NOTE: Please see `:h coc-status` for integrations with external plugins that
" provide custom statusline: lightline.vim, vim-airline.
set statusline^=%{coc#status()}%{get(b:,'coc_current_function',''
+ "''"
+ '' )}
" Mappings for CoCList
" Show all diagnostics.
nnoremap <silent><nowait> <space>a :<C-u>CocList diagnostics<cr>
" Manage extensions.
nnoremap <silent><nowait> <space>e :<C-u>CocList extensions<cr>
" Show commands.
nnoremap <silent><nowait> <space>c :<C-u>CocList commands<cr>
" Find symbol of current document.
nnoremap <silent><nowait> <space>o :<C-u>CocList outline<cr>
" Search workspace symbols.
nnoremap <silent><nowait> <space>s :<C-u>CocList -I symbols<cr>
" Do default action for next item.
nnoremap <silent><nowait> <space>j :<C-u>CocNext<CR>
" Do default action for previous item.
nnoremap <silent><nowait> <space>k :<C-u>CocPrev<CR>
" Resume latest coc list.
nnoremap <silent><nowait> <space>p :<C-u>CocListResume<CR>
''
# The below is custom and did not come from coc's README
+ ''
" GoTo code navigation.
nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gs :call CocAction('jumpDefinition', 'split')<CR>
nmap <silent> gv :call CocAction('jumpDefinition', 'vsplit')<CR>
nmap <silent> gn :call CocAction('jumpDefinition', 'tabe')<CR>
nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references)
'';
};
extraConfig = ''
set tabstop=4
set shiftwidth=4
set mouse=a
set expandtab
set number
set autoindent
syntax on
let mapleader = "`"
" Eye Candy (selects theme and sets up transparency)
colorscheme base16-darktooth
hi Normal guibg=none ctermbg=none
hi NormalNC guibg=NONE
hi LineNr guibg=none ctermbg=none
hi Folded guibg=none ctermbg=none
hi NonText guibg=none ctermbg=none
hi SpecialKey guibg=none ctermbg=none
hi VertSplit guibg=none ctermbg=none
hi SignColumn guibg=none ctermbg=none
hi EndOfBuffer guibg=none ctermbg=none
" Toggle line highlighting based on focus
autocmd BufEnter * setlocal cursorline
autocmd BufLeave * setlocal nocursorline
" Toggle relative line numbers
nmap <leader>num :set invrelativenumber<CR>
" Bindings for telescope-nvim
nnoremap <leader>ff <cmd>lua require('telescope.builtin').find_files()<cr>
nnoremap <leader>fg <cmd>lua require('telescope.builtin').live_grep()<cr>
nnoremap <leader>fb <cmd>lua require('telescope.builtin').buffers()<cr>
nnoremap <leader>fh <cmd>lua require('telescope.builtin').help_tags()<cr>
" coc
nnoremap <Leader>cmd :CocCommand<CR>
nnoremap <Leader>cfg :CocConfig<CR>
nnoremap <Leader>def :call CocAction('jumpDefinition')<CR>
nnoremap <Leader>fmt :call CocActionAsync('format')<CR>
vmap <leader>a <Plug>(coc-codeaction-selected)
nmap <leader>a <Plug>(coc-codeaction-selected)
" rhubarb
noremap <Leader>bro :GBrowse<CR>
" Tab completion
set wildmode=longest,list,full
set wildmenu
'';
};
}

File diff suppressed because it is too large Load diff

View file

@ -1,17 +0,0 @@
{
config,
pkgs,
...
}: {
home.packages = [pkgs.rofi];
# TODO: Add Hack Nerd Font
programs.rofi = {
enable = true;
font = "Hack Nerd Font 10";
theme = "gruvbox-dark-hard";
extraConfig = {
show-icons = true;
};
};
}

View file

@ -1,160 +0,0 @@
{
config,
pkgs,
...
}: let
cfg = config.wayland.windowManager.sway.config;
nag = "swaynag";
leaveModeKeys = {
"Insert" = "mode default";
"Escape" = "mode default";
"Return" = "mode default";
};
in {
config.wayland.windowManager.sway.config = {
modes = {
resize =
{
# left will shrink the containers width
# right will grow the containers width
# up will shrink the containers height
# down will grow the containers height
"${cfg.left}" = "resize shrink width 50px";
"${cfg.down}" = "resize grow height 50px";
"${cfg.up}" = "resize shrink height 50px";
"${cfg.right}" = "resize grow width 50px";
# Ditto, with arrow keys
"Left" = "resize shrink width 50px";
"Down" = "resize grow height 50px";
"Up" = "resize shrink height 50px";
"Right" = "resize grow width 50px";
}
// leaveModeKeys;
nag = {
"Ctrl+d" = "mode default";
"Ctrl+c" = "exec ${nag} --exit";
"q" = "exec ${nag} --exit";
"Escape" = "exec ${nag} --exit";
"Return" = "exec ${nag} --confirm";
"j" = "exec ${nag} --next";
"Tab" = "exec ${nag} --next";
"Up" = "exec ${nag} --next";
"k" = "exec ${nag} --prev";
"Shift+Tab" = "exec ${nag} prev";
"Down" = "exec ${nag} prev";
};
};
keybindings = {
# Activate modes
"${cfg.modifier}+s" = "mode resize";
# Misc
"${cfg.modifier}+Return" = "exec ${cfg.terminal}";
"${cfg.modifier}+c" = "kill";
"${cfg.modifier}+p" = "exec ${cfg.menu}";
"${cfg.modifier}+z" = "reload";
"${cfg.modifier}+x" = "exec swaylock -i ${config.home.homeDirectory}/dotfiles/users/alejandro/sway/wallpaper.png";
# Volume control
"XF86AudioRaiseVolume" = " exec 'pamixer --increase 5'";
"XF86AudioLowerVolume" = " exec 'pamixer --decrease 5'";
"XF86AudioMute" = " exec 'pamixer --toggle-mute'";
# Music player control
"XF86AudioPrev" = "exec 'playerctl previous'";
"XF86AudioNext" = "exec 'playerctl next'";
"XF86AudioPlay" = "exec 'playerctl play-pause'";
"${cfg.modifier}+Down" = "exec 'playerctl pause'";
"${cfg.modifier}+Up" = "exec 'playerctl play'";
"${cfg.modifier}+Right" = "exec 'playerctl next'";
"${cfg.modifier}+Left" = "exec 'playerctl previous'";
# Backlight keys
"XF86MonBrightnessDown" = "exec 'light -U 5'";
"XF86MonBrightnessUp" = "exec 'light -A 5'";
# Navigation
## Focus
### Move your focus around
"${cfg.modifier}+${cfg.left}" = "focus left";
"${cfg.modifier}+${cfg.down}" = "focus down";
"${cfg.modifier}+${cfg.up}" = "focus up";
"${cfg.modifier}+${cfg.right}" = "focus right";
### Move the focused window with the same, but add Shift
"${cfg.modifier}+Shift+${cfg.left}" = "move left";
"${cfg.modifier}+Shift+${cfg.down}" = "move down";
"${cfg.modifier}+Shift+${cfg.up}" = "move up";
"${cfg.modifier}+Shift+${cfg.right}" = "move right";
## Workspaces
### Switch to a workspace
"${cfg.modifier}+q" = "workspace number 1";
"${cfg.modifier}+w" = "workspace number 2";
"${cfg.modifier}+e" = "workspace number 3";
"${cfg.modifier}+r" = "workspace number 4";
"${cfg.modifier}+t" = "workspace number 5";
"${cfg.modifier}+y" = "workspace number 6";
"${cfg.modifier}+u" = "workspace number 7";
"${cfg.modifier}+i" = "workspace number 8";
"${cfg.modifier}+o" = "workspace number 9";
### Move focused container to workspace
"${cfg.modifier}+Shift+q" = "move container to workspace number 1";
"${cfg.modifier}+Shift+w" = "move container to workspace number 2";
"${cfg.modifier}+Shift+e" = "move container to workspace number 3";
"${cfg.modifier}+Shift+r" = "move container to workspace number 4";
"${cfg.modifier}+Shift+t" = "move container to workspace number 5";
"${cfg.modifier}+Shift+y" = "move container to workspace number 6";
"${cfg.modifier}+Shift+u" = "move container to workspace number 7";
"${cfg.modifier}+Shift+i" = "move container to workspace number 8";
"${cfg.modifier}+Shift+o" = "move container to workspace number 9";
# Layout
## Split direction
"${cfg.modifier}+v" = "splith";
"${cfg.modifier}+g" = "splitv";
## Switch the current container between different layout styles
"${cfg.modifier}+b" = "layout stacking";
"${cfg.modifier}+n" = "layout tabbed";
"${cfg.modifier}+m" = "layout toggle split";
## Make the current focus fullscreen
"${cfg.modifier}+f" = "fullscreen";
## move container between displays
"${cfg.modifier}+semicolon" = "move workspace to output right";
## Toggle the current focus between tiling and floating mode
"${cfg.modifier}+Shift+f" = "floating toggle";
## Swap focus between the tiling area and the floating area
"${cfg.modifier}+space" = "focus mode_toggle";
## Move focus to the parent container
"${cfg.modifier}+a" = "focus parent";
# Scratchpad
# Move the currently focused window to the scratchpad
"${cfg.modifier}+Shift+minus" = "move scratchpad";
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
"${cfg.modifier}+minus" = "scratchpad show";
# Exit sway (logs you out of your Wayland session)
"${cfg.modifier}+Shift+z" = "exec ${nag} -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit' -b 'Reload' 'swaymsg reload'";
};
};
}

View file

@ -1,114 +0,0 @@
{
config,
pkgs,
...
}: let
wallpaper = "${config.home.homeDirectory}/dotfiles/users/alejandro/sway/wallpaper.png";
in {
imports = [
./keybindings.nix
./waybar.nix
];
home.packages = with pkgs; [
#light # TODO: Not enough to have this package, need it enabled in system config.
pamixer
playerctl
rofi
swaylock
wl-clipboard
];
services.playerctld.enable = true;
services.swayidle = {
enable = true;
timeouts = [
{
timeout = 300;
command = "${pkgs.swaylock}/bin/swaylock -i ${wallpaper}";
}
{
timeout = 600;
command = "${pkgs.sway}/bin/swaymsg 'output * dpms off'";
resumeCommand = "${pkgs.sway}/bin/swaymsg 'output * dpms on'";
}
];
events = [
{
event = "before-sleep";
command = "${pkgs.swaylock}/bin/swaylock -i ${wallpaper}";
}
];
};
wayland.windowManager.sway = {
enable = true;
swaynag.enable = true;
wrapperFeatures.gtk = true; # so that gtk works properly
config = {
modifier = "Mod4";
terminal = "alacritty"; # TODO: include in packages above?
menu = "rofi -show run";
workspaceAutoBackAndForth = true;
colors = {
focused = {
border = "#2B3C44";
background = "#4E3D45";
text = "#FFFFFF";
indicator = "#333333";
childBorder = "#000000";
};
focusedInactive = {
border = "#484848";
background = "#333333";
text = "#FFFFFF";
indicator = "#000000";
childBorder = "#000000";
};
unfocused = {
border = "#484848";
background = "#333333";
text = "#FFFFFF";
indicator = "#000000";
childBorder = "#000000";
};
};
window = {
titlebar = true;
commands = [
{
command = "inhibit_idle fullscreen";
criteria = {class = ".*";};
}
];
};
focus.followMouse = false;
fonts = {
names = ["Hack Nerd Font"];
size = 10.0;
};
output = {
"*".bg = "${wallpaper} fill";
"eDP-1".scale = "1";
"Unknown ASUS VG24V 0x00007AAC" = {
mode = "1920x1080@120Hz";
position = "0 830";
};
"Dell Inc. DELL S2721QS 47W7M43" = {
transform = "270";
position = "1920 0";
};
"Dell Inc. DELL S2721QS 4FR7M43".position = "4080 830";
};
};
};
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 MiB

View file

@ -1,148 +0,0 @@
{
config,
pkgs,
options,
...
}: {
home.packages = with pkgs; [
#pactl
waybar
];
programs.waybar = {
enable = true;
systemd.enable = true;
style = builtins.readFile ./waybar_style.css;
settings = [
{
layer = "top";
position = "top";
height = 20;
modules-left = ["sway/workspaces"];
modules-center = ["clock"];
modules-right = [
"idle_inhibitor"
"temperature"
"cpu"
"pulseaudio"
"battery"
"memory"
"backlight"
"network"
"tray"
];
"sway/workspaces" = {
disable-scroll = false;
all-outputs = true;
format = "{icon}";
format-icons = {
"1" = "q";
"2" = "w";
"3" = "e";
"4" = "r";
"5" = "t";
"6" = "y";
"7" = "u";
"8" = "i";
"9" = "o";
urgent = " ";
focused = " ";
default = " ";
};
};
idle_inhibitor = {
format = "{icon}";
format-icons = {
activated = " ";
deactivated = " ";
};
};
temperature = {
critical-threshold = 80;
format = "{temperatureC}°C {icon}";
format-icons = [" " " " " "];
};
cpu = {
format = "{usage}% ";
tooltip = false;
};
pulseaudio = {
format = "{icon} {volume}% {format_source}";
format-bluetooth = "{icon} {volume}% {format_source}";
format-bluetooth-muted = " {volume}% {format_source}";
format-muted = " {format_source}";
format-source = " ";
format-source-muted = " ";
format-icons = {
headphone = " ";
hands-free = " ";
headset = " ";
phone = " ";
portable = " ";
car = " ";
default = [" " " " " "];
};
tooltip-format = "{desc}, {volume}%";
# TODO: Figure out how to get pactl binary?
on-click = "pactl set-sink-mute @DEFAULT_SINK@ toggle";
on-click-right = "pactl set-source-mute @DEFAULT_SOURCE@ toggle";
on-click-middle = "pavucontrol";
};
battery = {
states = {
warning = 30;
critical = 1;
};
format = "{icon} {capacity}%";
tooltip-format = "{timeTo}, {capacity}%";
format-charging = " {capacity}%";
format-plugged = " ";
format-alt = "{time} {icon}";
format-icons = ["" "" "" "" ""];
};
memory = {
format = "{}% ";
};
backlight = {
format = "{icon} {percent}%";
format-icons = [" " " "];
on-scroll-up = "light -A 1";
on-scroll-down = "light -U 1";
};
network = {
format-wifi = " ";
format-ethernet = "{ifname}: {ipaddr}/{cidr} ";
format-linked = "{ifname} (No IP) ";
format-disconnected = " ";
format-alt = "{ifname}: {ipaddr}/{cidr}";
tooltip-format = "{essid} {signalStrength}%";
};
tray = {
spacing = 10;
};
}
];
};
wayland.windowManager.sway.config.bars = [];
#wayland.windowManager.sway.config.bars = [
#{
#position = "top";
#statusCommand = "${pkgs.waybar}/bin/waybar";
#workspaceNumbers = false;
#workspaceButtons = false;
#}
#];
}

View file

@ -1,132 +0,0 @@
* {
border: none;
font-family: Hack Nerd Font, sans-serif;
font-size: 10px;
}
window#waybar {
background-color: rgba(29, 32, 33, 0.9);
border-bottom: 3px solid #1d2021;
color: #ffffdf;
transition-property: background-color;
transition-duration: .5s;
}
window#waybar.hidden {
opacity: 0.2;
}
#workspaces,
#mode,
#cpu,
#memory,
#temperature,
#clock,
#idle_inhibitor,
#language,
#pulseaudio,
#backlight,
#battery,
#network,
#tray {
background-color: #303030;
padding: 0 10px;
margin: 3px;
border: 3px solid rgba(0, 0, 0, 0);
border-radius: 90px;
background-clip: padding-box;
}
#workspaces button {
padding: 0 5px;
min-width: 20px;
color: #87afaf;
}
#workspaces button:hover {
background-color: rgba(0, 0, 0, 1)
}
#workspaces button.focused {
color: #ffaf00;
}
#workspaces button.urgent {
color: #e06c75;
}
#clock {
color: #61afef;
}
#idle_inhibitor {
color: #abb2bf;
}
#idle_inhibitor.activated {
background-color: #abb2bf;
color: #1e222a;
}
#temperature {
color: #fb4934;
}
#temperature.critical {
color: #1d2021;
background-color: #9d0006;
}
#cpu {
color: #ff8700;
}
#memory {
color: #87af87;
}
#battery {
color: #b8bb26;
}
#battery.charging, #battery.plugged {
background-color: #1f321c;
color: #ffffaf;
}
@keyframes blink {
to {
background-color: #1f321c;
color: #ffffaf;
}
}
#battery.critical:not(.charging) {
background-color: #afaf00;
color: #303030;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
#pulseaudio {
color: #fabd2f;
}
#pulseaudio.muted {
color: #b57614;
}
#backlight {
color: #17ccd5;
}
#network {
color: #d787af;
}
#network.disconnected {
color: #875f87;
}

View file

@ -1,65 +0,0 @@
{
config,
pkgs,
...
}: {
programs.tmux = {
enable = true;
keyMode = "vi";
newSession = true;
sensibleOnTop = true;
terminal = "screen-256color";
plugins = with pkgs.tmuxPlugins; [
{
plugin = resurrect;
extraConfig = ''
set -g @resurrect-capture-pane-contents 'on'
set -g @resurrect-strategy-vim 'session'
'';
}
vim-tmux-navigator
];
extraConfig = ''
# Color fix
# set-option -ga terminal-overrides ",alacritty:Tc,xterm-256color:Tc"
# Scrolling with mouse wheel scrolls output instead of previous commands
setw -g mouse on
# Open panes in the same directory
bind c new-window -c "#{pane_current_path}"
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
# Eye Candy
# set -g @plugin 'mattdavis90/base16-tmux'
# set -g @colors-base16 'darktooth'
# Integration with tmuxline.vim
source-file ~/theme
# Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigator
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?\\.?g?(view|n?vim?x?)(-wrapped)?(diff)?$'"
bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L'
bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D'
bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U'
bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R'
tmux_version='$(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p")'
if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \
"bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\' 'select-pane -l'"
if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' \
"bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\\\' 'select-pane -l'"
bind-key -T copy-mode-vi 'C-h' select-pane -L
bind-key -T copy-mode-vi 'C-j' select-pane -D
bind-key -T copy-mode-vi 'C-k' select-pane -U
bind-key -T copy-mode-vi 'C-l' select-pane -R
bind-key -T copy-mode-vi 'C-\' select-pane -l
'';
};
}

View file

@ -1,166 +0,0 @@
{
config,
pkgs,
...
}: {
# home.packages = [ pkgs.vim ];
home.packages = [pkgs.fzf];
programs.vim = {
enable = true;
plugins = with pkgs.vimPlugins; [
base16-vim
vim-airline
vim-airline-themes
vim-devicons
tmuxline-vim
gitgutter
fugitive
rhubarb
fzf-vim
nerdcommenter
nerdtree
tmux-navigator
vimspector
ale
coc-nvim
# TODO: Add coc plugins
vim-obsession
];
extraConfig = ''
set tabstop=4
set shiftwidth=4
set mouse=a
set ttymouse=sgr
set mousemodel=popup_setpos
set updatetime=100
set expandtab
set number
set autoindent
set laststatus=2
set encoding=utf-8
syntax on
let mapleader = "'"
" ALE (need to happen before ALE loaded)
let g:ale_display_lsp = 1
filetype plugin indent on
" Use tabs for makefile
autocmd Filetype make setlocal noexpandtab
" Toggle line highlighting based on focus
autocmd BufEnter * setlocal cursorline
autocmd BufLeave * setlocal nocursorline
" airline
let g:airline_theme='base16_vim'
let g:airline_powerline_fonts = 1
" Colorscheme
if !exists('g:colors_name') || g:colors_name != 'base16-darktooth'
set background=dark
let base16colorspace=256
colorscheme base16-darktooth
hi Normal ctermbg=NONE guibg=NONE
endif
" Toggle relative line numbers
nmap <leader>num :set invrelativenumber<CR>
" Tab completion
set wildmode=longest,list,full
set wildmenu
" Move splits
function! MarkWindowSwap()
let g:markedWinNum = winnr()
endfunction
function! DoWindowSwap()
" Mark destination
let curnum = winnr()
let curBut = bufnr( "%" )
" Switch to source and shuffle dest->source
let markedBuf = bufnr( "%" )
" Hide and open so that we aren't prompted and keep history
exe 'hide buf' curBuf
" Switch to dest and shuffle source->dest
exe curnum . "wincmd w"
" Hide and open so that we aren't prompted and keep history
exe 'hide buf' markedBuf
endfunction
nmap <silent> <leader>mv :call MarkWindowSwap()<CR>
nmap <silent> <leader>pw :call DoWindowSwap()<CR>
" NERDTree
nnoremap <leader>n :NERDTreeFocus<CR>
nnoremap <C-n> :NERDTree<CR>
nnoremap <C-t> :NERDTreeToggle<CR>
nnoremap <C-f> :NERDTreeFind<CR>
let g:NERDTreeQuitOnOpen = 1
let g:NERDTreeShowHidden = 1
" vimspector
let g:vimspector_enable_mappings = 'HUMAN'
let g:vimspector_enable_gadgets = ['debugpy', 'CodeLLDB']
let g:vimspector_base_dir = expand('$HOME/.vim/bundle/vimspector')
nmap <Leader>di <Plug>VimspectorBalloonEval
xmap <Leader>di <Plug>VimspectorBalloonEval
" fzf
nnoremap <C-P> :GFiles<CR>
nnoremap <C-G> :Rg<CR>
" coc.nvim
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
" use <tab> for trigger completion and navigate to the next complete item
function! s:check_back_space() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~ '\s'
endfunction
inoremap <silent><expr> <Tab>
\ pumvisible() ? "\<C-n>" :
\ <SID>check_back_space() ? "\<Tab>" :
\ coc#refresh()
" uses tab and shift-tab to navigate completion list
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
nnoremap <Leader>cmd :CocCommand<CR>
nnoremap <Leader>cfg :CocConfig<CR>
nnoremap <Leader>def :call CocAction('jumpDefinition')<CR>
nnoremap <Leader>fmt :call CocActionAsync('format')<CR>
noremap <Leader>bro :GBrowse<CR>
" GoTo code navigation.
nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gs :call CocAction('jumpDefinition', 'split')<CR>
nmap <silent> gv :call CocAction('jumpDefinition', 'vsplit')<CR>
nmap <silent> gn :call CocAction('jumpDefinition', 'tabe')<CR>
nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references)
" Project-specific config
silent! so .vimlocal
'';
};
}

View file

@ -1,79 +0,0 @@
{
config,
pkgs,
...
}: {
home.packages = with pkgs; [
# TODO: Should zsh be added here if already part of system configuration?
#zsh
ripgrep
bat
htop
ranger
lsd
jq
];
programs.direnv = {
enable = true;
enableZshIntegration = true;
};
programs.zsh = {
enable = true;
enableAutosuggestions = true;
enableCompletion = true;
envExtra = ''
export PATH=~/.local/bin:$PATH
export EDITOR=vim
'';
initExtra = ''
base16_darktooth
bindkey -v
bindkey '^A' beginning-of-line
bindkey '^E' end-of-line
bindkey '^R' history-incremental-search-backward
alias view="vim -R $1"
alias ls=lsd
alias l='ls -la'
'';
plugins = with pkgs; [
{
name = "zsh-syntax-highlighting";
src = fetchFromGitHub {
owner = "zsh-users";
repo = "zsh-syntax-highlighting";
rev = "0.6.0";
sha256 = "0zmq66dzasmr5pwribyh4kbkk23jxbpdw4rjxx0i7dx8jjp2lzl4";
};
file = "zsh-syntax-highlighting.zsh";
}
{
name = "powerlevel10k";
src = fetchFromGitHub {
owner = "romkatv";
repo = "powerlevel10k";
rev = "v1.16.1";
sha256 = "0fkfh8j7rd8mkpgz6nsx4v7665d375266shl1aasdad8blgqmf0c";
};
file = "powerlevel10k.zsh-theme";
}
{
name = "powerlevel10k-config";
src = lib.cleanSource ./p10k;
file = "p10k.zsh";
}
{
name = "base16-shell";
src = fetchFromGitHub {
owner = "chriskempson";
repo = "base16-shell";
rev = "ce8e1e540367ea83cc3e01eec7b2a11783b3f9e1";
sha256 = "1yj36k64zz65lxh28bb5rb5skwlinixxz6qwkwaf845ajvm45j1q";
};
file = "base16-shell.plugin.zsh";
}
];
};
}