Compare commits
	
		
			8 Commits 
		
	
	
		
			e36b04aaa7
			...
			7fb822dbff
		
	
	| Author | SHA1 | Date | 
|---|---|---|
| 
							
							
								
									
								
								 | 
						7fb822dbff | |
| 
							
							
								
									
								
								 | 
						5e5d88a92a | |
| 
							
							
								
									
								
								 | 
						f6e525cf53 | |
| 
							
							
								
									
								
								 | 
						e5fe794c41 | |
| 
							
							
								
									
								
								 | 
						d576a3f8e7 | |
| 
							
							
								
									
								
								 | 
						7149917762 | |
| 
							
							
								
									
								
								 | 
						5d2cb51aee | |
| 
							
							
								
									
								
								 | 
						c88c54b9ca | 
| 
						 | 
				
			
			@ -1,3 +1,4 @@
 | 
			
		|||
# shellcheck shell=bash
 | 
			
		||||
# vim: set ft=bash :
 | 
			
		||||
 | 
			
		||||
# Alias aliases
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,3 +1,4 @@
 | 
			
		|||
# shellcheck shell=bash
 | 
			
		||||
# vim: set ft=bash :
 | 
			
		||||
 | 
			
		||||
reboot-to-windows ()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,3 +1,4 @@
 | 
			
		|||
# shellcheck shell=bash
 | 
			
		||||
# vim: set ft=bash :
 | 
			
		||||
 | 
			
		||||
source "$HOME/.bash_aliases/dualboot"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,3 +1,4 @@
 | 
			
		|||
# shellcheck shell=bash
 | 
			
		||||
# vim: set ft=bash :
 | 
			
		||||
 | 
			
		||||
# Set NeoVim as default editor
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +1,5 @@
 | 
			
		|||
# Laptop configuration
 | 
			
		||||
# shellcheck shell=bash
 | 
			
		||||
# vim: set ft=bash :
 | 
			
		||||
 | 
			
		||||
# >>> mamba initialize >>>
 | 
			
		||||
# !! Contents within this block are managed by 'mamba init' !!
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +1,6 @@
 | 
			
		|||
# shellcheck shell=bash
 | 
			
		||||
# vim: set ft=bash :
 | 
			
		||||
 | 
			
		||||
get_branch_name() {
 | 
			
		||||
  git symbolic-ref --quiet --short HEAD 2>/dev/null \
 | 
			
		||||
    || git rev-parse --short HEAD 2>/dev/null \
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,3 @@
 | 
			
		|||
#!/usr/env/bin bash
 | 
			
		||||
 | 
			
		||||
ipython -i /home/h/.bin/calc.py
 | 
			
		||||
| 
						 | 
				
			
			@ -1,5 +1,6 @@
 | 
			
		|||
vim.cmd([[
 | 
			
		||||
set runtimepath^=~/.vim runtimepath+=~/.vim/after
 | 
			
		||||
let &packpath = &runtimepath
 | 
			
		||||
source ~/.vimrc"
 | 
			
		||||
]])
 | 
			
		||||
require("vim")
 | 
			
		||||
require("ftdetect")
 | 
			
		||||
require("keymaps")
 | 
			
		||||
require("highlight")
 | 
			
		||||
 | 
			
		||||
-- vim.opt.background = "dark"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,5 @@
 | 
			
		|||
vim.filetype.add({
 | 
			
		||||
  filename = {
 | 
			
		||||
    [".lintstagedrc"] = "json",
 | 
			
		||||
  },
 | 
			
		||||
})
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,14 @@
 | 
			
		|||
local autocmd = vim.api.nvim_create_autocmd
 | 
			
		||||
local augroup = vim.api.nvim_create_augroup
 | 
			
		||||
 | 
			
		||||
local function yank_highlight()
 | 
			
		||||
  vim.highlight.on_yank({ higroup = "Visual", timeout = 150 })
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
-- Yanked text highlight feedback (source: https://github.com/nvim-lua/kickstart.nvim/blob/master/init.lua)
 | 
			
		||||
augroup("YankHighlight", { clear = true })
 | 
			
		||||
autocmd("TextYankPost", {
 | 
			
		||||
  desc = "Highlight when yanking (copying) text",
 | 
			
		||||
  group = "YankHighlight",
 | 
			
		||||
  callback = yank_highlight,
 | 
			
		||||
})
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,13 @@
 | 
			
		|||
local set = vim.keymap.set
 | 
			
		||||
 | 
			
		||||
set("n", "<leader>cx", "<cmd>!chmod +x %<CR>", { silent = true, desc = "Run `chmod +x` on current file" })
 | 
			
		||||
set("n", "yp", "<cmd>let @+ = expand('%r')<CR>:p<CR>", { silent = true, desc = "Yank path" })
 | 
			
		||||
 | 
			
		||||
-- Remap native NeoVim comment keymaps
 | 
			
		||||
set({ "n", "x" }, "<leader>c", "gc", { remap = true, desc = "Toggle comment" })
 | 
			
		||||
set("n", "<leader>cc", "gcc", { remap = true, desc = "Toggle comment line" })
 | 
			
		||||
set("o", "<leader>c", "gc", { remap = true, desc = "Comment textobject" })
 | 
			
		||||
 | 
			
		||||
-- Move lines
 | 
			
		||||
set("v", "K", ": '<,'>move '<-2<cr>gv")
 | 
			
		||||
set("v", "J", ": '<,'>move '>+1<cr>gv")
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,5 @@
 | 
			
		|||
vim.cmd([[
 | 
			
		||||
set runtimepath^=~/.vim runtimepath+=~/.vim/after
 | 
			
		||||
let &packpath = &runtimepath
 | 
			
		||||
source ~/.vimrc"
 | 
			
		||||
]])
 | 
			
		||||
| 
						 | 
				
			
			@ -167,7 +167,7 @@ myModMask = mod4Mask
 | 
			
		|||
 | 
			
		||||
myConfig =
 | 
			
		||||
  def
 | 
			
		||||
    { terminal = "alacritty",
 | 
			
		||||
    { terminal = "kitty",
 | 
			
		||||
      modMask = myModMask,
 | 
			
		||||
      workspaces = withScreen 1 myWorkspaces ++ withScreen 2 mySharedWorkspaces,
 | 
			
		||||
      -- Styling
 | 
			
		||||
| 
						 | 
				
			
			@ -197,7 +197,6 @@ myKeys =
 | 
			
		|||
    ("M-<Space> M-<Space>", nextLayout),        -- ..fat finger
 | 
			
		||||
    ("M-<Space> M-S-<Space>", defaultLayout),   --
 | 
			
		||||
    ("<F8>",  spawnKeepassXC),
 | 
			
		||||
    ("M-z",   spawnZettelkasten),
 | 
			
		||||
    ("M-p",   spawnLauncher),
 | 
			
		||||
    ("M-w", spawnWindowSwitcher),
 | 
			
		||||
    ("M-S-w", spawnWifiMenu),
 | 
			
		||||
| 
						 | 
				
			
			@ -217,7 +216,6 @@ myKeys =
 | 
			
		|||
    ("M-S-<XF86MonBrightnessUp>", resetTemp),   --
 | 
			
		||||
    ("M-S-<XF86MonBrightnessDown>", resetTemp), --
 | 
			
		||||
    ("M-S-b", fullscreenBrowser),
 | 
			
		||||
    ("<XF86Calculator>", spawnCalculator),
 | 
			
		||||
    ("<XF86PowerOff>", spawn "systemctl suspend"), --TODO: Only enable this on laptop
 | 
			
		||||
    ("M-c", windows copyToAll),
 | 
			
		||||
    ("M-S-c", killAllOtherCopies),
 | 
			
		||||
| 
						 | 
				
			
			@ -255,9 +253,6 @@ nextLayout = sendMessage NextLayout
 | 
			
		|||
defaultLayout :: X ()
 | 
			
		||||
defaultLayout = setLayout $ Layout myLayoutHook
 | 
			
		||||
 | 
			
		||||
spawnZettelkasten :: X ()
 | 
			
		||||
spawnZettelkasten = spawn "alacritty --class Zettelkasten,Zettelkasten -e nvim $(cat ~/.zk/current-zettel.txt)"
 | 
			
		||||
 | 
			
		||||
spawnKeepassXC :: X ()
 | 
			
		||||
spawnKeepassXC = spawn "keepassxc"
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -265,12 +260,12 @@ fullscreenBrowser :: X ()
 | 
			
		|||
fullscreenBrowser = spawn "firefox --fullscreen"
 | 
			
		||||
 | 
			
		||||
spawnWindowSwitcher = spawn "rofi -show window -show-icons"
 | 
			
		||||
 | 
			
		||||
spawnWifiMenu = spawn "rofi -show wifi -modi \"wifi:iwdrofimenu\""
 | 
			
		||||
 | 
			
		||||
spawnLauncher, spawnClipManager, spawnCalculator :: X ()
 | 
			
		||||
spawnLauncher, spawnClipManager :: X ()
 | 
			
		||||
spawnLauncher = spawn "rofi -show drun -show-icons"
 | 
			
		||||
spawnClipManager = spawn "rofi -modi 'clipboard:greenclip print' -show clipboard -run-command '{cmd}'"
 | 
			
		||||
spawnCalculator = spawn "alacritty --class 'Calculator' -e ipython -i /home/h/.bin/calc.py"
 | 
			
		||||
 | 
			
		||||
printScreen :: X ()
 | 
			
		||||
printScreen = spawn "flameshot gui"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue