From b5f96ec5f91ae7b6c69db2a1f488f85beaa172af Mon Sep 17 00:00:00 2001 From: James Patrick Date: Fri, 21 Aug 2020 23:53:23 -0400 Subject: [PATCH 01/15] Added github key for zuk --- ssh/public_keys/zuk/github.com.pub | 1 + 1 file changed, 1 insertion(+) create mode 100644 ssh/public_keys/zuk/github.com.pub diff --git a/ssh/public_keys/zuk/github.com.pub b/ssh/public_keys/zuk/github.com.pub new file mode 100644 index 0000000..cb487a9 --- /dev/null +++ b/ssh/public_keys/zuk/github.com.pub @@ -0,0 +1 @@ +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII08PboVnJBQr/V65fEb4xxeW/UG8b3gHJ+YpPwdg/3K zuk: Mon 17 Aug 2020 09:17:40 PM EDT From 5134aebbaa13989b84bd0e62fa9c919936f44146 Mon Sep 17 00:00:00 2001 From: James Patrick Date: Mon, 24 Aug 2020 21:07:30 -0400 Subject: [PATCH 02/15] Added access to rofi scripts --- sway/config | 1 + sway/config.d/keybinds.config | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sway/config b/sway/config index fbd6d94..6a2eb04 100644 --- a/sway/config +++ b/sway/config @@ -8,6 +8,7 @@ set $up k set $right l set $term kitty set $scripts $HOME/.config/sway/scripts +set $rofi-scripts $HOME/.config/rofi/scripts set $tty-popup $scripts/tty-popup set $menu bash $scripts/menu diff --git a/sway/config.d/keybinds.config b/sway/config.d/keybinds.config index d8b5bcf..2816dc8 100644 --- a/sway/config.d/keybinds.config +++ b/sway/config.d/keybinds.config @@ -138,7 +138,7 @@ bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle bindsym XF86MonBrightnessDown exec light -U 5 && light -G | cut -d'.' -f1 > /tmp/wobpipe bindsym XF86MonBrightnessUp exec light -A 5 && light -G | cut -d'.' -f1 > /tmp/wobpipe bindsym Pause exec playerctl play-pause -bindsym Shift+Pause exec bash $scripts/media_controls +bindsym Shift+Pause exec bash $rofi-scripts/media_controls # Drag floating windows by holding down $mod and left mouse button. # Resize them with right mouse button + $mod. From a245fa357116846623121871e076b8d06ae5243f Mon Sep 17 00:00:00 2001 From: James Patrick Date: Mon, 24 Aug 2020 21:09:10 -0400 Subject: [PATCH 03/15] Reordered icons. I'm going to do a series of refactoring commit and wanted to change some things prior. --- waybar/config.json | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/waybar/config.json b/waybar/config.json index 281c5a8..020ef01 100644 --- a/waybar/config.json +++ b/waybar/config.json @@ -3,7 +3,7 @@ "height": 35, "modules-left": ["sway/workspaces", "sway/mode", "custom/media"], "modules-center": ["sway/window"], - "modules-right": ["pulseaudio", "network", "cpu", "memory", "backlight", "battery", "battery#bat2", "clock", "tray", "idle_inhibitor"], + "modules-right": ["pulseaudio", "network", "cpu", "memory", "backlight", "battery", "clock", "tray", "idle_inhibitor"], "sway/workspaces": { "disable-scroll": true, "all-outputs": true @@ -26,35 +26,34 @@ "format-alt": "{:%Y-%m-%d}" }, "cpu": { - "format": "{usage}% " + "format": " {usage}%" }, "memory": { - "format": "{}% " + "format": " {}%" }, "backlight": { - "format": "{percent}% {icon}", + "format": "{icon} {percent}% ", "format-icons": ["", ""] }, "battery": { + "interval": 1, "states": { "good": 95, "warning": 30, "critical": 15 }, - "format": "{capacity}% {icon}", + "format": " {capacity}%", + "format-discharging": "{icon} {capacity}%", "format-icons": ["", "", "", "", ""] }, - "battery#bat2": { - "bat": "BAT2" - }, "network": { - "format-wifi": "{essid} ({signalStrength}%) ", + "format-wifi": " {essid} ({signalStrength}%)", "format-ethernet": "{ifname}: {ipaddr}/{cidr} ", "format-disconnected": "⚠", "on-click": "rofi-wifi-menu" }, "pulseaudio": { - "format": "{volume}% {icon}", + "format": "{icon} {volume}%", "format-bluetooth": "{volume}% {icon}", "format-muted": "", "format-icons": { From e595adafbcc4e2f9f6a51dc913df0553437ff238 Mon Sep 17 00:00:00 2001 From: James Patrick Date: Mon, 24 Aug 2020 21:11:23 -0400 Subject: [PATCH 04/15] Switched to gammastep from no longer supported redshft --- sway/config.d/autostart.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sway/config.d/autostart.config b/sway/config.d/autostart.config index 60ed5c2..ef7ac27 100644 --- a/sway/config.d/autostart.config +++ b/sway/config.d/autostart.config @@ -5,7 +5,7 @@ exec --no-startup-id nextcloud 2>&1 >/tmp/nextcloud.log exec --no-startup-id protonmail-bridge 2>&1 >/tmp/mail.log ### Make things a little easier easier on the eyes. -exec --no-startup-id redshift 2>&1 >/tmp/redshift.log +exec --no-startup-id gammastep 2>&1 >/tmp/gammastep.log ### Clipboard manager exec --no-startup-id $scripts/clipboard daemon 2>&1 >/tmp/clipboardmanager.log From 5569f2db2aaa8e96917b3a2b27fbf255bf7a5ea0 Mon Sep 17 00:00:00 2001 From: James Patrick Date: Mon, 24 Aug 2020 21:12:09 -0400 Subject: [PATCH 05/15] Fixing the log errors. The old Xresources based configuration format is deprecated. --- rofi/config.rasi | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 rofi/config.rasi diff --git a/rofi/config.rasi b/rofi/config.rasi new file mode 100644 index 0000000..09f3b37 --- /dev/null +++ b/rofi/config.rasi @@ -0,0 +1,4 @@ +configuration { + font: "FuraCode Nerd Font Mono 13"; + theme: "default.rasi"; +} From df58c9f4f2dbdd73b1f53e180c075db1ba07af68 Mon Sep 17 00:00:00 2001 From: James Patrick Date: Thu, 27 Aug 2020 00:55:38 -0400 Subject: [PATCH 06/15] Added more states for waybar. --- waybar/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/waybar/config.json b/waybar/config.json index 020ef01..082e849 100644 --- a/waybar/config.json +++ b/waybar/config.json @@ -33,7 +33,7 @@ }, "backlight": { "format": "{icon} {percent}% ", - "format-icons": ["", ""] + "format-icons": ["", "", "", ""] }, "battery": { "interval": 1, From 4a9e7f32d7e332c990b7f9fd501afc40e3ad1032 Mon Sep 17 00:00:00 2001 From: James Patrick Date: Thu, 3 Sep 2020 00:34:42 -0400 Subject: [PATCH 07/15] Extracted out color constants to prevent repeating myself. Extracted out color constants to prevent repeating myself. --- sway/config.d/ui.config | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/sway/config.d/ui.config b/sway/config.d/ui.config index 1dbbbd3..425cdca 100644 --- a/sway/config.d/ui.config +++ b/sway/config.d/ui.config @@ -1,6 +1,12 @@ ################################################################################ # UI tweaks +set $focus_bg #12e689 +set $urgent_bg #ff4551 +set $inactive_bg #161720 +set $light_fg #1f212e +set $dark_fg #aab5c6 + ### Font stuff font pango:Fira Code 10 @@ -9,11 +15,11 @@ gaps inner 5 gaps outer 2 ### Colors -# class border backgr text indicator child_border -client.focused #12e689 #12e689 #1f212e #12e689 #12e689 -client.focused_inactive #1f212e #1f212e #aab5c6 #1f212e #1f212e -client.unfocused #161720 #161720 #aab5c6 #161720 #161720 -client.urgent #ff4551 #ff4551 #1f212e #ff4551 #ff4551 +# class border backgr text indicator child_border +client.focused $focus_bg $focus_bg $light_fg $focus_bg $focus_bg +client.focused_inactive $inactive_bg $inactive_bg $dark_fg $inactive_bg $inactive_bg +client.unfocused $inactive_bg $inactive_bg $dark_fg $inactive_bg $inactive_bg +client.urgent $urgent_bg $urgent_bg $light_fg $urgent_bg $urgent_bg # GTK 3 settings # See https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland for more info. From dba9d579651e66e217e4c071024764551777840b Mon Sep 17 00:00:00 2001 From: James Patrick Date: Thu, 3 Sep 2020 00:35:14 -0400 Subject: [PATCH 08/15] Using nerdfont for more icons. --- waybar/style.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/waybar/style.css b/waybar/style.css index 5e134b1..0d87888 100644 --- a/waybar/style.css +++ b/waybar/style.css @@ -1,8 +1,8 @@ * { border: none; border-radius: 0; - font-family: Roboto, Helvetica, Arial, sans-serif; - font-size: 16px; + font-family: Ubuntu Nerd Font, NotoSans Nerd Font, Roboto, Helvetica, Arial, sans-serif; + font-size: 15px; min-height: 0; } From 4e5cb3baadf1f3d86fcc87d99e778e03d973cfab Mon Sep 17 00:00:00 2001 From: James Patrick Date: Thu, 3 Sep 2020 00:36:14 -0400 Subject: [PATCH 09/15] Fixed some issue nonstandard font name. --- emacs/config.el | 2 +- kitty/kitty.conf | 6 +++--- sway/config.d/ui.config | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/emacs/config.el b/emacs/config.el index 02fb817..c782477 100644 --- a/emacs/config.el +++ b/emacs/config.el @@ -6,7 +6,7 @@ ;; Firacode is broken with Emacs-plus on osx. Fallback to Hasklig. (if IS-MAC (setq doom-font (font-spec :family "Hasklig" :size 12)) - (setq doom-font (font-spec :family "FuraCode NF" :size 12)) + (setq doom-font (font-spec :family "FiraCode Nerd Font" :size 12)) ) ;; ;; Set font diff --git a/kitty/kitty.conf b/kitty/kitty.conf index bed2595..863a897 100644 --- a/kitty/kitty.conf +++ b/kitty/kitty.conf @@ -17,9 +17,9 @@ #: have many weight variants like Book, Medium, Thick, etc. For #: example:: -font_family Fira Code Retina -bold_font Fira Code Medium -italic_font Fira Code Italic +font_family Fira Code Regular Nerd Font Complete +bold_font Fira Code Bold Nerd Font Complete +italic_font Fira Code Regular Nerd Font Complete Italic bold_italic_font Fira Code Medium Italic font_size 12.0 diff --git a/sway/config.d/ui.config b/sway/config.d/ui.config index 425cdca..3386720 100644 --- a/sway/config.d/ui.config +++ b/sway/config.d/ui.config @@ -8,7 +8,7 @@ set $light_fg #1f212e set $dark_fg #aab5c6 ### Font stuff -font pango:Fira Code 10 +font pango:FiraCode Nerd Font 10 ### Gaps gaps inner 5 From 50ef9fd177965219e9c8918e88b20e84c04eccce Mon Sep 17 00:00:00 2001 From: James Patrick Date: Wed, 16 Sep 2020 22:08:52 -0400 Subject: [PATCH 10/15] refactor and adding custom wifi module. --- waybar/config.json | 23 +++++++++-------------- waybar/custom_modules/wifi.sh | 21 +++++++++++++++++++++ 2 files changed, 30 insertions(+), 14 deletions(-) create mode 100755 waybar/custom_modules/wifi.sh diff --git a/waybar/config.json b/waybar/config.json index 082e849..e9fe438 100644 --- a/waybar/config.json +++ b/waybar/config.json @@ -3,7 +3,7 @@ "height": 35, "modules-left": ["sway/workspaces", "sway/mode", "custom/media"], "modules-center": ["sway/window"], - "modules-right": ["pulseaudio", "network", "cpu", "memory", "backlight", "battery", "clock", "tray", "idle_inhibitor"], + "modules-right": ["pulseaudio", "custom/network","backlight", "battery", "clock", "tray", "idle_inhibitor"], "sway/workspaces": { "disable-scroll": true, "all-outputs": true @@ -25,12 +25,6 @@ "tooltip-format": "{:%Y-%m-%d | %H:%M}", "format-alt": "{:%Y-%m-%d}" }, - "cpu": { - "format": " {usage}%" - }, - "memory": { - "format": " {}%" - }, "backlight": { "format": "{icon} {percent}% ", "format-icons": ["", "", "", ""] @@ -43,15 +37,9 @@ "critical": 15 }, "format": " {capacity}%", - "format-discharging": "{icon} {capacity}%", + "format-discharging": "{icon} {capacity}%", "format-icons": ["", "", "", "", ""] }, - "network": { - "format-wifi": " {essid} ({signalStrength}%)", - "format-ethernet": "{ifname}: {ipaddr}/{cidr} ", - "format-disconnected": "⚠", - "on-click": "rofi-wifi-menu" - }, "pulseaudio": { "format": "{icon} {volume}%", "format-bluetooth": "{volume}% {icon}", @@ -78,5 +66,12 @@ "on-click": "playerctl play-pause", "escape": true, "exec": "$HOME/.config/waybar/custom_modules/mediaplayer.py 2> /dev/null" + }, + "custom/network": { + "escape" :true, + "exec": "$HOME/.config/waybar/custom_modules/wifi.sh 2> /dev/null", + "on-click": "rofi-wifi-menu", + "restart-interval": 1, + "return-type": "json" } } diff --git a/waybar/custom_modules/wifi.sh b/waybar/custom_modules/wifi.sh new file mode 100755 index 0000000..92d39ca --- /dev/null +++ b/waybar/custom_modules/wifi.sh @@ -0,0 +1,21 @@ +#! /usr/bin/env bash + +main(){ + connected_val="$(iwgetid 1> /dev/null ; echo $?)" + if [ $connected_val -eq 255 ]; then + echo '{"text": "⚠ Disconnected", "class":"disconnected"}' + return + else + wg_val="$(wg 2> /dev/null ; echo $?)" + if [ $wg_val -eq 0 ]; then + echo "{\"text\": \" $(iwgetid -r)\", \"class\":\"connected\"}" + else + echo "{\"text\": \"聯 $(iwgetid -r)\", \"class\":\"secured\"}" + fi + fi +} + +while true; do + main + sleep 1 +done From 23d3efc525e3833f172303b30cd529767549a7ef Mon Sep 17 00:00:00 2001 From: James Patrick Date: Wed, 16 Sep 2020 22:09:35 -0400 Subject: [PATCH 11/15] Updated clipboard script to actually work. Kind of There are some issues around escaping characters. But it is currently functioning. --- sway/scripts/clipboard | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/sway/scripts/clipboard b/sway/scripts/clipboard index 9cc57f3..e25c9cc 100755 --- a/sway/scripts/clipboard +++ b/sway/scripts/clipboard @@ -65,7 +65,12 @@ on-select(){ if [ -z "$result" ]; then exit 0 fi - (cat "$(parse-file "${result}")" || exit 1) | wl-copy + echo 1 + wl-paste + local file + file="$(parse-file "${result}")" + wl-copy < "$file" + swaymsg exec "ydotool type \"$(wl-paste)\"" } menu(){ @@ -74,13 +79,15 @@ menu(){ --info=hidden \ --reverse \ -d "${delim}" --nth ..2 --with-nth 2 \ - --bind="del:execute()" \ - --prompt='clip:: ' \ - --pointer='➜' \ - --color="gutter:0,prompt:4" \ - --no-multi \ - --preview "$0 preview '{}'" --preview-window=down:3:wrap --ansi \ - | on-select + --bind="del:execute()" \ + --prompt='clip:: ' \ + --pointer='➜' \ + --color="gutter:0,prompt:4" \ + --no-multi \ + --preview "$0 preview {}" \ + --preview-window=down:3:wrap \ + --ansi \ + | on-select } usage(){ @@ -106,12 +113,15 @@ preview(){ return fi - printf $(bat -l bash --color always -pp "$file") + bat -l bash --color always -pp "$file" } case "$1" in daemon|on-copy|menu|list) - $1;; + $1 + echo 3 + wl-paste + ;; lock) touch "$workdir/.lock" ; echo "locked";; unlock) From 4d25b2e7b3d77a93d78d47393869777002afa5ce Mon Sep 17 00:00:00 2001 From: James Patrick Date: Wed, 16 Sep 2020 22:10:32 -0400 Subject: [PATCH 12/15] Reworked some styling and removed old values --- waybar/style.css | 45 ++++++++++----------------------------------- 1 file changed, 10 insertions(+), 35 deletions(-) diff --git a/waybar/style.css b/waybar/style.css index 0d87888..d57d85f 100644 --- a/waybar/style.css +++ b/waybar/style.css @@ -7,8 +7,8 @@ } window#waybar { - background: rgba(43, 48, 59, 0.5); - border-bottom: 3px solid rgba(100, 114, 125, 0.5); + background: rgba(43, 48, 59, 0.0); + border-bottom: 3px solid rgba(100, 114, 125, 0.0); color: #ffffff; } @@ -17,6 +17,7 @@ window#waybar { padding: 0 5px; background: transparent; color: #ffffff; + background: rgba(43, 48, 59, 0.4); border-bottom: 3px solid transparent; } @@ -34,7 +35,7 @@ window#waybar { border-bottom: 3px solid #ffffff; } -#clock, #battery, #cpu, #memory, #temperature, #backlight, #network, #pulseaudio, #custom-media, #tray, #mode, #idle_inhibitor { +#clock, #battery, #cpu, #memory, #temperature, #backlight, #network, #pulseaudio, #custom-network , #custom-media, #tray, #mode, #idle_inhibitor { padding: 0 10px; margin: 0 3px; } @@ -70,24 +71,19 @@ window#waybar { animation-direction: alternate; } -#cpu { - background: #2ecc71; - color: #000000; -} - -#memory { - background: #9b59b6; -} - #backlight { background: #90b1b1; } -#network { +#custom-network { background: #2980b9; } -#network.disconnected { +#custom-network.secured { + background: #9b59b6; +} + +#custom-network.disconnected { background: #f53c3c; } @@ -101,27 +97,6 @@ window#waybar { color: #2a5c45; } -#custom-media { - background: #66cc99; - color: #2a5c45; -} - -.custom-spotify { - background: #66cc99; -} - -.custom-vlc { - background: #ffa000; -} - -#temperature { - background: #f0932b; -} - -#temperature.critical { - background: #eb4d4b; -} - #tray { background-color: #2980b9; } From 10a658bd5bbdbdeb034092578121ad609fbd36db Mon Sep 17 00:00:00 2001 From: James Patrick Date: Tue, 6 Oct 2020 23:39:43 -0400 Subject: [PATCH 13/15] Sanitized cliphistory. --- sway/scripts/clipboard | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sway/scripts/clipboard b/sway/scripts/clipboard index e25c9cc..bf8b347 100755 --- a/sway/scripts/clipboard +++ b/sway/scripts/clipboard @@ -70,7 +70,7 @@ on-select(){ local file file="$(parse-file "${result}")" wl-copy < "$file" - swaymsg exec "ydotool type \"$(wl-paste)\"" + swaymsg exec "ydotool type $(wl-paste | sed -e "s/'/'\\\\''/g; 1s/^/'/; \$s/\$/'/")" } menu(){ From 486e5faa64915a983328ddddac830e350ebab719 Mon Sep 17 00:00:00 2001 From: James Patrick Date: Wed, 7 Oct 2020 01:44:52 -0400 Subject: [PATCH 14/15] Addd binds for QR and deleting items in buffer. --- sway/scripts/clipboard | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/sway/scripts/clipboard b/sway/scripts/clipboard index bf8b347..963004f 100755 --- a/sway/scripts/clipboard +++ b/sway/scripts/clipboard @@ -65,7 +65,6 @@ on-select(){ if [ -z "$result" ]; then exit 0 fi - echo 1 wl-paste local file file="$(parse-file "${result}")" @@ -74,12 +73,11 @@ on-select(){ } menu(){ - #--bind "del:execute-silent($0 delete '{}')+abort" \ list | fzf --read0 +s \ --info=hidden \ --reverse \ -d "${delim}" --nth ..2 --with-nth 2 \ - --bind="del:execute()" \ + --bind="del:execute-silent($0 delete {})+reload($0 list),f1:execute($0 qr {})" \ --prompt='clip:: ' \ --pointer='➜' \ --color="gutter:0,prompt:4" \ @@ -101,9 +99,28 @@ Hello, this is the usuage menu. $0 supports the following arguments. - lock :: prevents daemon/on-clip from saving value. Use for passwords, etc. - unlock :: like lock, but in reverse. - preview :: the preview used by fzf. Requires clip file. + - delete :: deletes the file, requires file. + - qr :: bind to f1. Displays a qr code of the value. EOF } +qr(){ + local file + file="$(parse-file "$1")" + cat $file | + qrencode -o - \ + --size=25 \ + --background=161720 \ + --foreground=AAB5C6 | + feh - +} + +delete(){ + local file + file="$(parse-file "$1")" + rm $file +} + preview(){ local file file="$(parse-file "$1")" @@ -118,16 +135,14 @@ preview(){ case "$1" in daemon|on-copy|menu|list) - $1 - echo 3 - wl-paste - ;; + $1;; lock) touch "$workdir/.lock" ; echo "locked";; unlock) rm -f "$workdir/.lock" ; echo "unlocked";; - preview) - shift ; preview "$*";; + preview|delete|qr) + var=$1 + shift ; $var $*;; *) usage;; esac From f0fd387fbf8618c8034eee50f6726ff96d259a9a Mon Sep 17 00:00:00 2001 From: James Patrick Date: Fri, 20 Nov 2020 12:34:00 -0500 Subject: [PATCH 15/15] LSP for web wasn't working well last time I tried. There was a fair bit on slow request/response time from the server. --- emacs/init.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emacs/init.el b/emacs/init.el index ed96fc9..015b25a 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -189,7 +189,7 @@ ;;solidity ; do you need a blockchain? No. ;;swift ; who asked for emoji variables? ;;terra ; Earth and Moon in alignment for performance. - (web +lsp) ; the tubes + web ; the tubes yaml ; JSON, but readable :email