added markdown preview and script for i3 as well as i3 startup changes
This commit is contained in:
		
							parent
							
								
									db034b3e47
								
							
						
					
					
						commit
						9172051b79
					
				
							
								
								
									
										6
									
								
								.gitmodules
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										6
									
								
								.gitmodules
									
									
									
									
										vendored
									
									
								
							@ -92,3 +92,9 @@
 | 
			
		||||
[submodule "editors/nvim/site/pack/statusbar/start/vim-airline"]
 | 
			
		||||
	path = editors/nvim/site/pack/statusbar/start/vim-airline
 | 
			
		||||
	url = https://github.com/vim-airline/vim-airline.git
 | 
			
		||||
[submodule "editors/nvim/site/pack/typescript/opt/vim-typescript"]
 | 
			
		||||
	path = editors/nvim/site/pack/typescript/opt/vim-typescript
 | 
			
		||||
	url = https://github.com/leafgarland/typescript-vim.git
 | 
			
		||||
[submodule "editors/nvim/site/pack/markdown/start/markdown-preview.nvim"]
 | 
			
		||||
	path = editors/nvim/site/pack/markdown/start/markdown-preview.nvim
 | 
			
		||||
	url = https://github.com/iamcco/markdown-preview.nvim.git
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										9
									
								
								bin/markdown-preview.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										9
									
								
								bin/markdown-preview.sh
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,9 @@
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
if [ -n "$1" ] ; then
 | 
			
		||||
    URL="$1"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
i3-msg "workspace 1; exec brave --new-window $URL"
 | 
			
		||||
sleep 0.3
 | 
			
		||||
i3-msg "[class=st-256color] focus"
 | 
			
		||||
@ -18,3 +18,16 @@ function spellToggle()
 | 
			
		||||
        vim.o.spell = true
 | 
			
		||||
    end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
-- markdown preview
 | 
			
		||||
 | 
			
		||||
vim.keymap.set("n", "<leader>p", ":MarkdownPreviewToggle<CR>")
 | 
			
		||||
 | 
			
		||||
-- custom shell script to move windows
 | 
			
		||||
vim.cmd([[
 | 
			
		||||
    function OpenMarkdownPreview (url)
 | 
			
		||||
        execute "silent ! markdown-preview.sh " . a:url
 | 
			
		||||
    endfunction
 | 
			
		||||
]])
 | 
			
		||||
 | 
			
		||||
vim.g.mkdp_browserfunc = 'OpenMarkdownPreview'
 | 
			
		||||
 | 
			
		||||
@ -1,4 +1,3 @@
 | 
			
		||||
 | 
			
		||||
function toggleTransparent()
 | 
			
		||||
    transparent = not transparent
 | 
			
		||||
    if transparent then
 | 
			
		||||
 | 
			
		||||
@ -1,4 +1,5 @@
 | 
			
		||||
require('nvim-tree').setup({
 | 
			
		||||
    open_on_tab = false,
 | 
			
		||||
    filters = {
 | 
			
		||||
        dotfiles = true,
 | 
			
		||||
    },
 | 
			
		||||
@ -8,6 +9,7 @@ require('nvim-tree').setup({
 | 
			
		||||
        },
 | 
			
		||||
    },
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
showHiddenFiles = false
 | 
			
		||||
 | 
			
		||||
local function open_nvim_tree(data)
 | 
			
		||||
@ -16,7 +18,6 @@ local function open_nvim_tree(data)
 | 
			
		||||
    local directory = vim.fn.isdirectory(data.file) == 1
 | 
			
		||||
 | 
			
		||||
    local empty_file = data.file == ""
 | 
			
		||||
    print(empty_file)
 | 
			
		||||
 | 
			
		||||
    if not directory and not empty_file then
 | 
			
		||||
        return
 | 
			
		||||
@ -24,7 +25,6 @@ local function open_nvim_tree(data)
 | 
			
		||||
 | 
			
		||||
    if directory then
 | 
			
		||||
        vim.cmd.cd(data.file)
 | 
			
		||||
 | 
			
		||||
    end
 | 
			
		||||
    vim.cmd.enew()
 | 
			
		||||
    vim.cmd.bw(data.buf)
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										2
									
								
								editors/nvim/site/after/ftplugin/typescript.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								editors/nvim/site/after/ftplugin/typescript.lua
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,2 @@
 | 
			
		||||
-- adding packages
 | 
			
		||||
vim.cmd('packadd vim-typescript')
 | 
			
		||||
@ -0,0 +1 @@
 | 
			
		||||
Subproject commit 02cc3874738bc0f86e4b91f09b8a0ac88aef8e96
 | 
			
		||||
@ -0,0 +1 @@
 | 
			
		||||
Subproject commit 52f3ca3474d51f5021696ffb7297d989e49121ac
 | 
			
		||||
@ -21,11 +21,11 @@ exec --no-startup-id dex --autostart --environment i3
 | 
			
		||||
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock-blur --nofork
 | 
			
		||||
 | 
			
		||||
# auto starting default applications
 | 
			
		||||
assign [class="st-256color"] 1
 | 
			
		||||
assign [class="Brave-browser"] 2
 | 
			
		||||
# assign [class="st-256color"] 1
 | 
			
		||||
# assign [title="startup-browser"] 2
 | 
			
		||||
 | 
			
		||||
exec --no-startup-id st -e tmux
 | 
			
		||||
exec --no-startup-id brave
 | 
			
		||||
exec --no-startup-id i3-msg "workspace 1; exec st -e tmux"
 | 
			
		||||
exec --no-startup-id i3-msg "workspace 2; exec brave"
 | 
			
		||||
 | 
			
		||||
# Use pactl to adjust volume in PulseAudio.
 | 
			
		||||
set $refresh_i3status killall -SIGUSR1 i3status
 | 
			
		||||
 | 
			
		||||
@ -11,6 +11,7 @@
 | 
			
		||||
    ~/.local/bin/i3-scratchpad.sh: bin/i3-scratchpad.sh
 | 
			
		||||
    ~/.local/bin/todo_display.sh: bin/todo_display.sh
 | 
			
		||||
    ~/.local/bin/display_uptime: bin/display_uptime
 | 
			
		||||
    ~/.local/bin/markdown-preview.sh: bin/markdown-preview.sh
 | 
			
		||||
    ~/.local/bin/docker_check: bin/docker_check
 | 
			
		||||
    ~/.local/bin/seafile_check: bin/seafile_check
 | 
			
		||||
    ~/.local/bin/watertracker: src/watertracker/watertracker
 | 
			
		||||
 | 
			
		||||
@ -126,6 +126,8 @@ source $ZSH/oh-my-zsh.sh
 | 
			
		||||
# alias zshconfig="mate ~/.zshrc"
 | 
			
		||||
# alias ohmyzsh="mate ~/.oh-my-zsh"
 | 
			
		||||
# 
 | 
			
		||||
# switching to vimrc
 | 
			
		||||
alias vim="nvim"
 | 
			
		||||
# helpful aliasis
 | 
			
		||||
alias ifconfig="/sbin/ifconfig"
 | 
			
		||||
# git stuff
 | 
			
		||||
@ -156,7 +158,6 @@ export FZF_DEFAULT_OPTS='--layout=reverse --border'
 | 
			
		||||
 | 
			
		||||
#alias bat="batcat" Only needed on ubuntu/debian
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# vim  wiki alias
 | 
			
		||||
alias vimwiki="nvim $HOME/vimwiki/index.md"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user