Merge branch 'master' of git.jpatrick.io:james/dotfiles into master

This commit is contained in:
James Patrick 2020-11-27 16:59:16 -05:00
commit 8f7cf56234
13 changed files with 109 additions and 82 deletions

View File

@ -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

View File

@ -194,7 +194,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

View File

@ -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

4
rofi/config.rasi Normal file
View File

@ -0,0 +1,4 @@
configuration {
font: "FuraCode Nerd Font Mono 13";
theme: "default.rasi";
}

View File

@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII08PboVnJBQr/V65fEb4xxeW/UG8b3gHJ+YpPwdg/3K zuk: Mon 17 Aug 2020 09:17:40 PM EDT

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -1,19 +1,25 @@
################################################################################
# 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
font pango:FiraCode Nerd Font 10
### Gaps
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.

View File

@ -65,22 +65,27 @@ on-select(){
if [ -z "$result" ]; then
exit 0
fi
(cat "$(parse-file "${result}")" || exit 1) | wl-copy
wl-paste
local file
file="$(parse-file "${result}")"
wl-copy < "$file"
swaymsg exec "ydotool type $(wl-paste | sed -e "s/'/'\\\\''/g; 1s/^/'/; \$s/\$/'/")"
}
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()" \
--prompt='clip:: ' \
--pointer='➜' \
--color="gutter:0,prompt:4" \
--no-multi \
--preview "$0 preview '{}'" --preview-window=down:3:wrap --ansi \
| on-select
--bind="del:execute-silent($0 delete {})+reload($0 list),f1:execute($0 qr {})" \
--prompt='clip:: ' \
--pointer='➜' \
--color="gutter:0,prompt:4" \
--no-multi \
--preview "$0 preview {}" \
--preview-window=down:3:wrap \
--ansi \
| on-select
}
usage(){
@ -94,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")"
@ -106,7 +130,7 @@ preview(){
return
fi
printf $(bat -l bash --color always -pp "$file")
bat -l bash --color always -pp "$file"
}
case "$1" in
@ -116,8 +140,9 @@ case "$1" in
touch "$workdir/.lock" ; echo "locked";;
unlock)
rm -f "$workdir/.lock" ; echo "unlocked";;
preview)
shift ; preview "$*";;
preview|delete|qr)
var=$1
shift ; $var $*;;
*)
usage;;
esac

View File

@ -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", "custom/network","backlight", "battery", "clock", "tray", "idle_inhibitor"],
"sway/workspaces": {
"disable-scroll": true,
"all-outputs": true
@ -25,36 +25,23 @@
"tooltip-format": "{:%Y-%m-%d | %H:%M}",
"format-alt": "{:%Y-%m-%d}"
},
"cpu": {
"format": "{usage}% "
},
"memory": {
"format": "{}% "
},
"backlight": {
"format": "{percent}% {icon}",
"format-icons": ["", ""]
"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-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": {
@ -79,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"
}
}

21
waybar/custom_modules/wifi.sh Executable file
View File

@ -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

View File

@ -1,14 +1,14 @@
* {
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;
}
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;
}