Fix prompt, update sway colorscheme
j3s j3s@c3f.net
Wed, 23 Jun 2021 00:06:05 +0000
5 files changed,
16 insertions(+),
22 deletions(-)
M
.config/sway/config
→
.config/sway/config
@@ -68,13 +68,11 @@ xkb_layout us
xkb_options ctrl:nocaps } - - ### Key bindings # # Basics: # - client.focused #4c7899 #000000 #000000 #2e9ef4 #ff6ec7 + client.focused #4c7899 #000000 #000000 #2e9ef4 #31c200 for_window [title="^weallfloatdownhere$"] floating enable, border pixel # Start a terminal@@ -245,8 +243,8 @@ # The default just shows the current date and time.
status_command statusbar colors { - statusline #ff6ec7 - focused_workspace #ff6ec7 #ff6ec7 #000000 + statusline #41FF00 + focused_workspace #41FF00 #41FF00 #000000 background #000000 inactive_workspace #32323200 #32323200 #5c5c5c }
D
bin/pa-dmenu
@@ -1,8 +0,0 @@
-#!/bin/sh - -cd "${PA_DIR:-$HOME/.local/share/pa}" -password_files="$(find * -type f | grep -v '/.git')" -password=$(printf '%s\n' "$password_files" | sed 's/.age//' | dmenu "$@") - -pa show "$password" | head -n 1 | - xdotool type --clearmodifiers --file -
M
bin/pa-rofi
→
bin/pa-rofi
@@ -1,8 +1,10 @@
#!/bin/sh +# +# prompt for a password, then type the selected password cd "${PA_DIR:-$HOME/.local/share/pa}" password_files="$(find * -type f | grep -v '/.git')" password=$(printf '%s\n' "$password_files" | sed 's/.age//' | rofi -dmenu "$@") pa show "$password" | head -n 1 | - xdotool type --clearmodifiers --file - + wtype -
M
bin/prompt.go
→
bin/prompt.go
@@ -3,7 +3,7 @@
import ( "fmt" "os" - "os/exec" + "os/exec" "strings" )@@ -16,14 +16,15 @@ if strings.HasPrefix(cwd, home) {
cwd = "~" + cwd[len(home):] } - out, err := exec.Command("git", "branch", "--show-current").Output() - if err != nil { - out = []byte("^(;,;)^\n") - } - branchname := strings.TrimSuffix(string(out), "\n") + out, err := exec.Command("git", "branch", "--show-current").Output() + if err != nil { + out = []byte("^(;,;)^\n") + } + branchname := strings.TrimSuffix(string(out), "\n") - fmt.Printf("\033[38;5;162m[%s]\033[0m ", host) + fmt.Printf("\033[92m[%s]\033[0m ", host) + fmt.Printf("\033[94m") parts = strings.Split(cwd, "/") for i, part := range parts { if i == len(parts)-1 {@@ -36,6 +37,7 @@ fmt.Printf("/")
} } } + fmt.Printf("\033[0m") - fmt.Printf(" (%s)", branchname) + fmt.Printf(" (%s)", branchname) }