diff --git a/additional-setup.md b/additional-setup.md index d234ee10..04fabf63 100644 --- a/additional-setup.md +++ b/additional-setup.md @@ -27,8 +27,12 @@ vdirsyncer -c ~/.config/vdirsyncer/config_contacts sync Wireguard is nice for a home vpn and [pivpn](https://pivpn.io/) makes it easy. -1. Create client on server and copy resulting `.conf` file to `/etc/wireguard` -2. Start/stop vpn with `wg-quick` +1. Create client on server and copy resulting `.conf` file to local machine +2. Import to networkmanager with: +```bash +nmcli connection import type wireguard file +``` +3. Turn on/off from nm-applet ## BTRFS back-ups with btrbk @@ -83,26 +87,17 @@ expects them. taskopen). - `phone photos` - personal photos synched from android. - `phone screenshots` - personal screenshots synced from android. +- `keys` - contains ssh keys for git remotes (~/.ssh/keys) ## Lxappearance My GTK theme is pulled down by chezmoi, but isn't active by default. This can be fixed with the lxappearance gui. -## Single GPU Passthrough with Windows +## nb notebooks -Install libvirt hooks: +Remote nb notebooks are added with the following command: ```bash -sudo mkdir -p /etc/libvirt/hooks -sudo wget 'https://raw.githubusercontent.com/PassthroughPOST/VFIO-Tools/master/libvirt_hooks/qemu' \ - -O /etc/libvirt/hooks/qemu -sudo chmod +x /etc/libvirt/hooks/qemu -``` - -reboot.... - - -```bash - +nb notebooks add https://github.com/starr-dusT/nb ``` diff --git a/home/dot_config/btrbk/home_btrbk.conf b/home/dot_config/btrbk/home_btrbk.conf index 25507062..76283960 100644 --- a/home/dot_config/btrbk/home_btrbk.conf +++ b/home/dot_config/btrbk/home_btrbk.conf @@ -29,4 +29,4 @@ volume /home # Always create snapshot, even if targets are unreachable snapshot_create always # Need a btrfs server before this will work - target ssh://192.168.1.136/engi/backup/kestrel_backups + target ssh://192.168.1.135/engi/backup/kestrel_backups diff --git a/home/dot_config/i3/config.tmpl b/home/dot_config/i3/config.tmpl index 0ce11d1d..d7f8ba0a 100644 --- a/home/dot_config/i3/config.tmpl +++ b/home/dot_config/i3/config.tmpl @@ -25,8 +25,6 @@ set $tag5 "5:web" set $tag6 "6:web" set $tag7 "7:web" set $tag8 "8:comm" -set $tag9 "9:eng" -set $tag0 "10:web" set $e exec i3-msg mode default @@ -61,12 +59,10 @@ workspace $tag1 output $DISP_PRI workspace $tag2 output $DISP_PRI workspace $tag3 output $DISP_PRI workspace $tag4 output $DISP_PRI -workspace $tag5 output $DISP_PRI +workspace $tag5 output $DISP_SEC workspace $tag6 output $DISP_SEC workspace $tag7 output $DISP_SEC workspace $tag8 output $DISP_SEC -workspace $tag9 output $DISP_SEC -workspace $tag0 output $DISP_SEC #------------------------------------------------------------------------------- #----- CONTAINER GAPS @@ -133,39 +129,33 @@ mode utility { bindsym q exit bindsym r restart bindsym p exec "rofi-rbw", $e - # TODO: flameshot (mod+Ctrl+f) # TODO: gamemode (mod+Ctrl+g). Needs script to toggle bindsym Escape mode default } -# layo[u]t commands -bindsym $mod+u mode layout -mode layout { - bindsym z layout splith - bindsym x layout tabbed - bindsym c layout stacked - bindsym v layout splitv - bindsym h resize shrink width 50 - bindsym j resize shrink height 50 - bindsym k resize grow height 50 - bindsym l resize grow width 50 - bindsym e move position center - bindsym Escape mode default -} +# layout commands +bindsym $mod+Ctrl+t splitv; layout tabbed +bindsym $mod+Ctrl+v layout splitv +bindsym $mod+Ctrl+s layout splith +bindsym $mod+Ctrl+h resize shrink width 50 +bindsym $mod+Ctrl+j resize shrink height 50 +bindsym $mod+Ctrl+k resize grow height 50 +bindsym $mod+Ctrl+l resize grow width 50 +bindsym $mod+Ctrl+c move position center # program management bindsym $mod+d kill bindsym $mod+f fullscreen toggle -bindsym $mod+y floating toggle +bindsym $mod+t floating toggle bindsym $mod+s sticky toggle bindsym $mod+Tab focus mode_toggle floating_modifier $mod # spatial container management -bindsym $mod+h focus left -bindsym $mod+j focus down -bindsym $mod+k focus up -bindsym $mod+l focus right +bindsym $mod+h exec $HOME/.config/i3/scripts/tabfocus.sh "h" +bindsym $mod+j exec $HOME/.config/i3/scripts/tabfocus.sh "j" +bindsym $mod+k exec $HOME/.config/i3/scripts/tabfocus.sh "k" +bindsym $mod+l exec $HOME/.config/i3/scripts/tabfocus.sh "l" bindsym $mod+Shift+h move left bindsym $mod+Shift+j move down bindsym $mod+Shift+k move up @@ -178,22 +168,18 @@ bindsym $mod+1 workspace $tag1 bindsym $mod+2 workspace $tag2 bindsym $mod+3 workspace $tag3 bindsym $mod+4 workspace $tag4 -bindsym $mod+5 workspace $tag5 -bindsym $mod+q workspace $tag6 -bindsym $mod+w workspace $tag7 -bindsym $mod+e workspace $tag8 -bindsym $mod+r workspace $tag9 -bindsym $mod+t workspace $tag0 +bindsym $mod+q workspace $tag5 +bindsym $mod+w workspace $tag6 +bindsym $mod+e workspace $tag7 +bindsym $mod+r workspace $tag8 bindsym $mod+Shift+1 move container to workspace $tag1 bindsym $mod+Shift+2 move container to workspace $tag2 bindsym $mod+Shift+3 move container to workspace $tag3 bindsym $mod+Shift+4 move container to workspace $tag4 -bindsym $mod+Shift+5 move container to workspace $tag5 -bindsym $mod+Shift+q move container to workspace $tag6 -bindsym $mod+Shift+w move container to workspace $tag7 -bindsym $mod+Shift+e move container to workspace $tag8 -bindsym $mod+Shift+r move container to workspace $tag9 -bindsym $mod+Shift+t move container to workspace $tag0 +bindsym $mod+Shift+q move container to workspace $tag5 +bindsym $mod+Shift+w move container to workspace $tag6 +bindsym $mod+Shift+e move container to workspace $tag7 +bindsym $mod+Shift+r move container to workspace $tag8 # audio bindsym XF86AudioRaiseVolume exec pactl set-sink-volume 0 +2% @@ -233,4 +219,6 @@ exec --no-startup-id "pipewire & pipewire-pulse &" exec --no-startup-id "udiskie &" exec_always --no-startup-id "$HOME/.config/i3/scripts/polybar.sh" exec_always --no-startup-id "blueman-applet" +exec_always --no-startup-id "nm-applet" +exec_always --no-startup-id "flameshot" exec_always --no-startup-id "xsetroot -solid '#282A36'" diff --git a/home/dot_config/i3/scripts/executable_tabfocus.sh b/home/dot_config/i3/scripts/executable_tabfocus.sh new file mode 100644 index 00000000..ab341fbd --- /dev/null +++ b/home/dot_config/i3/scripts/executable_tabfocus.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env python + +import i3ipc +import sys + +move_normal = {"h": "focus left", + "j": "focus down", + "k": "focus up", + "l": "focus right"} + +move_tabbed = {"h": "focus parent; focus left", + "j": "focus right", + "k": "focus left", + "l": "focus parent; focus right"} + +i3 = i3ipc.Connection() + +# Get the focused container +focused = i3.get_tree().find_focused() + +# Get the layout of the parent container +layout = focused.parent.layout + +if layout == "tabbed": + i3.command(move_tabbed[sys.argv[1]]) +else: + i3.command(move_normal[sys.argv[1]]) diff --git a/home/dot_config/polybar/dracula.tmpl b/home/dot_config/polybar/dracula.tmpl index a7989575..0f5b404e 100644 --- a/home/dot_config/polybar/dracula.tmpl +++ b/home/dot_config/polybar/dracula.tmpl @@ -10,7 +10,7 @@ wm-restack = i3 modules-left = i3 spacing spacing xwindow modules-center = date -modules-right = memory separator cpu separator spacing pulseaudio separator wlan separator bandwidth separator +modules-right = memory separator cpu separator spacing pulseaudio separator bandwidth separator [module/xwindow] type = internal/xwindow @@ -60,16 +60,6 @@ format-padding = 2 format-background = "#44475a" label-font = 2 -[module/wlan] -type = internal/network -interface = {{ .network_interface }} -interval = 5 -label-connected = 直 %local_ip% -label-connected-foreground = "#50fa7b" -label-disconnected = 睊 NOT CONNECTED -label-disconnected-foreground = "#ff5555" -content-padding = 2 - [module/bandwidth] type = internal/network interface = {{ .network_interface }} diff --git a/home/dot_config/tmuxinator/nb.yml b/home/dot_config/tmuxinator/nb.yml index b8fdb688..6decb76b 100644 --- a/home/dot_config/tmuxinator/nb.yml +++ b/home/dot_config/tmuxinator/nb.yml @@ -3,8 +3,6 @@ name: nb root: ~/ -on_project_first_start: ssh-add ~/.ssh/personal_github - windows: - home: - nb use home diff --git a/home/dot_zprofile b/home/dot_zprofile index 2f5a78a1..f8234dbe 100644 --- a/home/dot_zprofile +++ b/home/dot_zprofile @@ -1,3 +1,9 @@ +export SSH_AUTH_SOCK=~/.ssh/ssh-agent.$HOSTNAME.sock +ssh-add -l 2>/dev/null >/dev/null +if [ $? -ge 2 ]; then + ssh-agent -a "$SSH_AUTH_SOCK" >/dev/null +fi + if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then startx fi diff --git a/provision/tasks/desktop/packages.yml b/provision/tasks/desktop/packages.yml index 9919fbf5..edc0a296 100644 --- a/provision/tasks/desktop/packages.yml +++ b/provision/tasks/desktop/packages.yml @@ -28,9 +28,7 @@ - nerd-fonts # Iconic font aggregator, collection and patcher - xdotool # Command-line X11 automation tool - flameshot # Powerful yet simple to use screenshot software for GNU/Linux - - cups - - hplip - - system-config-printer + - system-config-printer # CUPS printer configuration tool and status applet state: present become: true diff --git a/provision/tasks/system/configs.yml b/provision/tasks/system/configs.yml index 2703a629..59514a7c 100644 --- a/provision/tasks/system/configs.yml +++ b/provision/tasks/system/configs.yml @@ -29,12 +29,15 @@ shell: | ln -s /etc/sv/dbus /var/service ln -s /etc/sv/polkitd /var/service + ln -s /etc/sv/elogind /var/service ln -s /etc/sv/bluetoothd /var/service ln -s /etc/sv/sshd /var/service ln -s /etc/sv/libvirtd /var/service ln -s /etc/sv/virtlockd /var/service ln -s /etc/sv/virtlogd /var/service ln -s /etc/sv/NetworkManager /var/service + ln -s /etc/sv/cupsd /var/service + ln -s /etc/sv/cups-browsed /var/service ignore_errors: true become: true diff --git a/provision/tasks/system/packages.yml b/provision/tasks/system/packages.yml index 2ffa8856..744a2406 100644 --- a/provision/tasks/system/packages.yml +++ b/provision/tasks/system/packages.yml @@ -41,6 +41,8 @@ - psensor # Graphical hardware temperature monitor for Linux - upower # Abstraction for enumerating power devices - android-udev-rules # Android udev rules list aimed to be the most comprehensive on the net + - cups # Common Unix Printing System + - hplip # HP Linux Imaging and Printing state: present become: true