update before modes

This commit is contained in:
Tyler Starr 2022-12-17 13:01:44 -08:00
parent 7a3758e6a0
commit 01bfd6ea46
16 changed files with 103 additions and 16 deletions

View File

@ -47,6 +47,10 @@ sudo btrbk -c ~/.config/btrbk/home_btrbk.conf -v run # creates user backups and
sudo btrbk -c ~/.config/btrbk/root_btrbk.conf -v run # creates root snapshots
```
SSH keypair is used for password-less root ssh for remote back-up. See Github.
anacron is used for daily backups. Copy home_backup.sh to /etc/cron.daily.
## Automount network drive with fstab
Fstab can be mounted when the network drive is accessed. This is done for the "engi" home server.

View File

View File

@ -5,6 +5,8 @@ if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
export LC_COLLATE="C"
# User specific environment
if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]
then

View File

@ -0,0 +1,3 @@
#!/bin/sh
#
btrbk -c /home/tstarr/.config/btrbk/home_btrbk.conf run

View File

@ -15,15 +15,18 @@ stream_buffer 256m
snapshot_preserve_min 2d
snapshot_preserve 14d
target_preserve_min no
target_preserve_min 2d
target_preserve 20d 10w *m
snapshot_dir .snapshots
ssh_identity /etc/btrbk/ssh/id_rsa
ssh_user root
# Local snapshots
volume /home
subvolume tstarr
# Always create snapshot, even if targets are unreachable
snapshot_create always
# Need a btrfs server before this will work
#target /mnt/engi/backup/kestrel_backups
target ssh://192.168.1.136/engi/backup/kestrel_backups

View File

@ -99,6 +99,14 @@ for_window [con_mark="scratch-warrior"] floating enable, \
resize set 1000 px 800 px, \
move position 780 px 320 px
for_window [class="Blueman-manager"] floating enable, \
resize set 1000 px 800 px, \
move position 780 px 320 px
for_window [class="Nm-connection-editor"] floating enable, \
resize set 1000 px 800 px, \
move position 780 px 320 px
#-------------------------------------------------------------------------------
#----- BINDING APPLICATIONS TO WORKSPACE
#-------------------------------------------------------------------------------
@ -122,15 +130,15 @@ bindsym $mod+Ctrl+l resize grow width 50
bindsym $mod+z layout splith
bindsym $mod+x layout tabbed
bindsym $mod+c layout stacked
bindsym $mod+v layout splitv
bindsym $mod+s split h
# bindsym $mod+v layout splitv
# bindsym $mod+s split h
bindsym $mod+Shift+s split v
# program management
bindsym $mod+d kill
bindsym $mod+f fullscreen toggle
bindsym $mod+t floating toggle
bindsym $mod+g sticky toggle
bindsym $mod+s sticky toggle
bindsym $mod+Tab focus mode_toggle
floating_modifier $mod
@ -173,6 +181,7 @@ bindsym XF86AudioMute exec amixer -q set Master toggle
bindsym $mod+Return exec kitty
bindsym $mod+a exec rofi -show drun -theme gruvbox-dark-soft -show-icons
bindsym $mod+Shift+a exec rofi -show window -theme gruvbox-dark-soft -show-icons
bindsym $mod+g exec rofi -modi "clipboard:greenclip print" -show clipboard -run-command '{cmd}'
bindsym $mod+u exec firefox
bindsym $mod+i exec steam
@ -192,6 +201,10 @@ bindsym $mod+m exec $HOME/.config/i3/scripts/scratch.sh \
exec --no-startup-id "$HOME/.config/i3/scripts/xrandr.sh && \
chezmoi apply && \
i3-msg restart && \
$HOME/.config/i3/scripts/polybar.sh"
i3-msg restart"
exec --no-startup-id greenclip daemon
exec_always --no-startup-id "$HOME/.config/i3/scripts/polybar.sh"
exec_always --no-startup-id "nm-applet"
exec_always --no-startup-id "blueman-applet"
exec_always --no-startup-id nitrogen --restore

View File

@ -7,8 +7,8 @@ require("harpoon").setup({
}
})
nnoremap("<leader>ha", function() require("harpoon.mark").add_file() end, silent)
nnoremap("<leader>hl", function() require("harpoon.ui").toggle_quick_menu() end, silent)
nnoremap("<leader>qa", function() require("harpoon.mark").add_file() end, silent)
nnoremap("<leader>ql", function() require("harpoon.ui").toggle_quick_menu() end, silent)
nnoremap("<leader>1", function() require("harpoon.ui").nav_file(1) end, silent)
nnoremap("<leader>2", function() require("harpoon.ui").nav_file(2) end, silent)

View File

@ -6,3 +6,9 @@ nnoremap("<leader>tn", "<cmd>tabnew<CR>")
nnoremap("<leader>th", "<cmd>tabn<CR>")
nnoremap("<leader>tl", "<cmd>tabp<CR>")
nnoremap("<leader>tc", "<cmd>tabc<CR>")
nnoremap("<leader>h", "<C-w>h")
nnoremap("<leader>j", "<C-w>j")
nnoremap("<leader>k", "<C-w>k")
nnoremap("<leader>l", "<C-w>l")
nnoremap("<leader>H", "<cmd>wincmd p<CR>")

View File

@ -0,0 +1,4 @@
local nnoremap = require("tstarr.keymap").nnoremap
nnoremap("<leader>u", "<cmd>UndotreeFocus<CR>")
nnoremap("<leader>ut", "<cmd>UndotreeToggle<CR>")

View File

@ -38,9 +38,41 @@ cmp.setup({
{ name = 'nvim_lsp' },
{ name = 'luasnip' }, -- For luasnip users.
}, {
{ name = 'buffer' },
{ name = 'buffer',
option = {
get_bufnrs = function()
local bufs = {}
for _, win in ipairs(vim.api.nvim_list_wins()) do
bufs[vim.api.nvim_win_get_buf(win)] = true
end
return vim.tbl_keys(bufs)
end
}
},
})
})
cmp.setup.cmdline('/', {
mapping = cmp.mapping.preset.cmdline(),
sources = {
{ name = 'buffer' }
}
})
cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
{ name = 'path' },
{ name = 'buffer' }
}, {
{
name = 'cmdline',
option = {
ignore_cmds = { 'Man', '!' }
}
}
})
})
local function config(_config)
return vim.tbl_deep_extend("force", {

View File

@ -16,7 +16,10 @@ return require('packer').startup(function(use)
use ('nvim-telescope/telescope-project.nvim')
use ('ThePrimeagen/harpoon')
use ('mbbill/undotree')
use ('kdheepak/lazygit.nvim')
-- LSP
use ('neovim/nvim-lspconfig')
use ('hrsh7th/cmp-nvim-lsp')
use ('hrsh7th/cmp-buffer')
@ -26,5 +29,4 @@ return require('packer').startup(function(use)
use ('L3MON4D3/LuaSnip')
use ('saadparwaiz1/cmp_luasnip')
end)

View File

@ -0,0 +1,5 @@
- name: Grab {{ item.repo }} latest binaries
unarchive:
src: "https://github.com/{{ item.user }}/{{ item.repo }}/releases/download/{{ repo_latest['tag'] }}/{{ item.name }}"
dest: /usr/local/bin
remote_src: true

View File

@ -15,6 +15,12 @@
- polybar # Fast and easy-to-use status bar
- xprop
- mpv
- pavucontrol
- lxappearance
- network-manager-applet
- blueman
- xdotool
- xclip
state: present
become: true
@ -28,5 +34,13 @@
state: present
become: true
#- name: Grab desktop binaries
# get_url:
# url: "{{ item.url }}"
# dest: /home/{{ user }}/bin/{{ item.name }}
# mode: 0755
# loop:
# - {name: "greenclip", url: "https://github.com/erebe/greenclip/releases/download/v4.2/greenclip-v4.2"}
# Using sxhkd until swhkd supports keychords
# - import_tasks: swhkd.yml

View File

@ -10,6 +10,7 @@
- ffmpeg # Digital VCR and streaming server
- wireguard # Fast, modern, secure vpn tunnel
- wireguard-tools # Tool for wireguard
- anacron
state: present
become: true

View File

@ -33,7 +33,5 @@ update {tags} # valid tags: configs, updates, packages, services, once
## TODO
- make homesever use btrfs and fix "target" for home backups
- update home directory with subvolumes to exclude from snapshots, etc.
- hide desktop files from gnome app menu
- Add task warrior (and maybe time warrior). Find or make extension that makes a report on a given date.
- Add zsh with workable config
- setup pavucontrol and bluetooth with scratchpads, polybar integration, etc.