From 7a76dd3bf74a526d0c7a077aff0f512a7c9df879 Mon Sep 17 00:00:00 2001 From: John Mertz Date: Sat, 23 Jul 2022 04:04:25 -0400 Subject: [PATCH 01/10] Update behaviours Identify XWayland windows in title. Include app_id in title. allow 'urgency' hint to linger move cursor to center of container on changing to it WIP: Tablet mode (not working) --- sway/behaviours | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/sway/behaviours b/sway/behaviours index 19db82feb..9d851cc52 100644 --- a/sway/behaviours +++ b/sway/behaviours @@ -35,3 +35,28 @@ for_window [class="Gvim"] floating enable for_window [class="Orage"] floating enable for_window [class="Claws-mail"] layout stacking for_window [class="Vncviewer"] fullscreen enable + +################################################################################ +# Window titles +################################################################################ + +# Mark legacy windows running in Xwayland +for_window [shell="."] title_format "%title (%app_id)" +for_window [shell="xwayland"] title_format "%title [XWayland]" + +################################################################################ +# Misc behaviour +################################################################################ + +# Maintain 'urgency' for 1 second +force_display_urgency_hint 1000 ms + +# Move cursor to center of container when switching +mouse_warping container + +# Restore display configuration on reload +bindswitch --reload lid:on /home/jpm/scripts/sway/displays.pl detached + +# Rotate screen and toggle OSK on tablet mode change +bindswitch --reload tablet:on busctl call --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 SetVisible b true; swaymsg output eDP-1 rotate 270 +bindswitch --reload tablet:off busctl call --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 SetVisible b false; swaymsg output eDP-1 rotate 0 From b9acd4f227bc83a2cf6488a07ba68832ede0aeb8 Mon Sep 17 00:00:00 2001 From: John Mertz Date: Tue, 23 Aug 2022 10:44:58 -0600 Subject: [PATCH 02/10] Update default workspaces Thunderbird, FireFox, RocketChat --- sway/behaviours | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sway/behaviours b/sway/behaviours index 9d851cc52..d56f4cae6 100644 --- a/sway/behaviours +++ b/sway/behaviours @@ -4,14 +4,13 @@ # Default workspaces ################################################################################ -#assign [class="Xchat"] 1-chat Replaced by irssi which will open on the first workspace at startup -assign [class="XTerm"] 1 assign [class="Mattermost"] 1 +assign [class="Rocket.Chat"] 1 assign [class="UXTerm"] grave -assign [class="Thunderbird"] 2 +assign [app_id="thunderbird"] 2 assign [class="Chromium"] 3 assign [class="Linphone"] 5 -assign [class="firefox"] 7 +assign [app_id="firefox"] 7 assign [app_id="com.github.gittyup.Gittyup"] 9 # Don't use VNC viewer anymore. I've defaulted to running virt-manager on this workspace because it's similar From 0ddfa88ed9bba9c3556f802c6b1b5ac1bf0986af Mon Sep 17 00:00:00 2001 From: John Mertz Date: Tue, 23 Aug 2022 10:46:08 -0600 Subject: [PATCH 03/10] Don't run bash_login on SSH session --- bash/bashrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bash/bashrc b/bash/bashrc index 318c88860..2b95718d0 100644 --- a/bash/bashrc +++ b/bash/bashrc @@ -11,7 +11,7 @@ export SSH_AUTH_SOCK=~/.ssh/ssh-agent.sock # agetty is set to automatically log me in on tty1 # Automatically launch GUI on tty1 after login -if [ "$(tty)" == '/dev/tty1' ]; then +if [ "$(tty)" == '/dev/tty1' ] && [ ! $SSH_TTY ]; then . ${HOME}/.dotfiles/bash/bash_login LAST_GUI=`cat ${HOME}/.spool/last_login_gui 2>/dev/null` if [ -f "${HOME}/.spool/last_login_gui" ]; then From 55d9d06705038553a0c4689a08f388cb4852d6aa Mon Sep 17 00:00:00 2001 From: John Mertz Date: Tue, 23 Aug 2022 10:47:03 -0600 Subject: [PATCH 04/10] Default editor Neovim --- bash/bashrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bash/bashrc b/bash/bashrc index 2b95718d0..41e647690 100644 --- a/bash/bashrc +++ b/bash/bashrc @@ -20,7 +20,7 @@ if [ "$(tty)" == '/dev/tty1' ] && [ ! $SSH_TTY ]; then fi # Setup editor -export EDITOR="vim" +export EDITOR="flatpak run io.neovim.nvim" # don't put duplicate lines or lines starting with space in the history. shopt -s histappend From 848d6678cf13065061237489be5be28453e35a92 Mon Sep 17 00:00:00 2001 From: John Mertz Date: Tue, 23 Aug 2022 13:54:19 -0600 Subject: [PATCH 05/10] 'apt' module generalized for 'pkg' --- waybar/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/waybar/style.css b/waybar/style.css index 85a9d499c..23ddcc444 100644 --- a/waybar/style.css +++ b/waybar/style.css @@ -66,7 +66,7 @@ window#waybar { /* Tray */ -#tray, #custom-todo, #custom-osk, #custom-apt, #custom-bar, #idle_inhibitor, #custom-clock, #custom-power { +#tray, #custom-todo, #custom-osk, #custom-pkg, #custom-bar, #idle_inhibitor, #custom-clock, #custom-power { color: @bluehi; } From 6ec9d8fc4a09ced17e0ddecc80867981b6a51e26 Mon Sep 17 00:00:00 2001 From: John Mertz Date: Tue, 23 Aug 2022 13:55:14 -0600 Subject: [PATCH 06/10] Favour VPN pixels over wifi --- waybar/style.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/waybar/style.css b/waybar/style.css index 23ddcc444..38223c3ef 100644 --- a/waybar/style.css +++ b/waybar/style.css @@ -133,11 +133,12 @@ window#waybar { #network { color: @blue; + margin-right: -8px; } #network.wireguard { padding: 0px; - margin-left: -8px; + margin-right: 0px; } #network.disconnected { From d9f20e07f89793237921af9cdb109a76562414c5 Mon Sep 17 00:00:00 2001 From: John Mertz Date: Tue, 23 Aug 2022 13:56:33 -0600 Subject: [PATCH 07/10] Centre tray icons --- waybar/style.css | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/waybar/style.css b/waybar/style.css index 38223c3ef..6cc049274 100644 --- a/waybar/style.css +++ b/waybar/style.css @@ -230,15 +230,25 @@ window#waybar { /* Todo-txt */ #custom-todo { - color: @fg; - color: @bluehi; + font-size: 40px; + margin-top: -13px; + margin-bottom: -10px; + margin-left: -8px; + margin-right: -8px; +} + +/* Package upgrades */ + +#custom-pkg { + margin-bottom: -3px; } /* On-Screen Keyboard */ #custom-osk { - color: @fg; - color: @bluehi; + font-size: 50px; + margin-top: -13px; + margin-bottom: -15px; } /* Idle Inhibitor */ @@ -252,6 +262,7 @@ window#waybar { #custom-power { margin-right: 15px; + margin-top: 8px; color: @red; } From e8df2abe5d119ab4f70876bdc43650067a102099 Mon Sep 17 00:00:00 2001 From: John Mertz Date: Tue, 23 Aug 2022 13:58:01 -0600 Subject: [PATCH 08/10] hair space between icons and text --- waybar/config.template | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/waybar/config.template b/waybar/config.template index 2f1368610..42f0203ab 100644 --- a/waybar/config.template +++ b/waybar/config.template @@ -187,26 +187,26 @@ "on-click": "if [ $(sudo pgrep -xc rofi) -gt 0 ]; then pkill rofi; else ${HOME}/scripts/rofi/rofi-openvpn.sh; fi" }, "cpu": { - "format": "{usage}%", + "format": "\u200a{usage}%", "tooltip": true, "on-click": "${HOME}/scripts/waybar/waybar-cpu.sh" }, "memory": { - "format": "{}%", + "format": "\u200a{}%", "on-click": "${HOME}/scripts/waybar/waybar-mem.sh" }, "custom/disk": { - "format": "\uf0a0{}", + "format": "\uf0a0\u200a{}", "exec": "df / | tail -n 1 | awk {'print $5'}", "on-click": "${HOME}/scripts/waybar/waybar-disk.sh" }, "temperature": { "critical-threshold": 80, - "format": "{temperatureC}°C" + "format": "\u200a{temperatureC}°C" }, "backlight": { // "device": "acpi_video1", - "format": "{icon}{percent}%", + "format": "{icon}\u200a{percent}%", "format-icons": [ "•", "☼", "o", "", ""], "on-click": "${HOME}/scripts/thinkpad/blc.pl --notify %", "on-scroll-up": "${HOME}/scripts/thinkpad/blc.pl --notify ++", @@ -215,13 +215,13 @@ "custom/battery": { "format": "{}", "return-type": "json", - "exec": "${HOME}/scripts/thinkpad/pow.pl -b", + "exec": "${HOME}/scripts/thinkpad/pow.pl --bar", "interval": 5, "on-click": "notify-send Power \"`${HOME}/scripts/thinkpad/pow.pl -p`\"" }, "pulseaudio": { //"scroll-step": 1, - "format": "{icon}{volume}%", + "format": "{icon}\u200a{volume}%", "format-bluetooth": "{icon}{volume}%", "format-muted": "", "format-icons": { From 7f920bb7bd730ef4f9cd33fa117601a71823bb26 Mon Sep 17 00:00:00 2001 From: John Mertz Date: Tue, 23 Aug 2022 14:16:06 -0600 Subject: [PATCH 09/10] Update themes --- sway/config | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sway/config b/sway/config index 7dd61e21a..7b4211dfe 100755 --- a/sway/config +++ b/sway/config @@ -34,11 +34,11 @@ seat * idle_wake keyboard switch ################################################################################ # Gtk themes -exec gsettings set org.gnome.desktop.interface gtk-theme 'Oled' & -exec gsettings set org.gnome.desktop.interface icon-theme 'Papirus-Dark-Grey' & +exec gsettings set org.gnome.desktop.interface gtk-theme 'Flat-Remix-GTK-Blue-Darkest-Solid-NoBorder' & +exec gsettings set org.gnome.desktop.interface icon-theme 'Flat-Remix-Blue-Dark' & # X11 Cursor theme -exec gsettings set org.gnome.desktop.interface cursor-theme 'FlatbedCursors-Blue' & +exec gsettings set org.gnome.desktop.interface cursor-theme 'Vimix-cursors' & seat seat0 xcursor_theme FlatbedCursors-Blue # Minimize borders from all windows From 600a64c35456e4597204e378576b42d8e853aa4b Mon Sep 17 00:00:00 2001 From: John Mertz Date: Tue, 23 Aug 2022 14:16:27 -0600 Subject: [PATCH 10/10] Update plugins --- nvim/init.vim | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/nvim/init.vim b/nvim/init.vim index 8c5455193..802f8179d 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -11,12 +11,17 @@ unlet autoload_plug_path call plug#begin('~/.dotfiles/nvim/plugins') " Plugins here +" LSP - Language Server Protocol +Plug 'neovim/nvim-lspconfig' +Plug 'hrsh7th/cmp-nvim-lsp' +Plug 'hrsh7th/cmp-buffer' +Plug 'hrsh7th/cmp-path' +Plug 'hrsh7th/cmp-cmdline' +Plug 'hrsh7th/nvim-cmp' " TreeSitter - Syntax highlighting Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} " Fold-Cycle - Better management of foldable blocks Plug 'jghauser/fold-cycle.nvim' -" LSP - Language Server Protocol -Plug 'neovim/nvim-lspconfig' " Git Gutter - Git diff markers Plug 'airblade/vim-gitgutter' " Lightline - lightweight status/tabline beautification