1
0
mirror of https://github.com/frebib/dotfiles.git synced 2024-06-14 12:57:23 +00:00

Compare commits

...

6 Commits

Author SHA1 Message Date
8e74101f3e
git: Fetch GitHub pull request refs by default
I can't find a way to make this a wildcard that applies to all remotes,
so this adds the two most common remotes that I'm likely to use.

Signed-off-by: Joe Groocock <me@frebib.net>
2021-11-23 11:21:45 +00:00
898190a99f
git: Use fast-forward-only merge by default
Merge commits are nasty, so make sure they're only created explicitly
and never by default.

Signed-off-by: Joe Groocock <me@frebib.net>
2021-11-23 11:16:08 +00:00
d771bf0448
environment: Re-enable PASSWORD_STORE_DIR override
gopass seems to be behaving itself more now.

Signed-off-by: Joe Groocock <me@frebib.net>
2021-11-23 11:10:39 +00:00
634db612a1
dunst: Fix window geometry with new version
This more or less replicates the old behaviour with window placement
using the new configuration options.

Signed-off-by: Joe Groocock <me@frebib.net>
2021-11-23 11:08:09 +00:00
a7778c30a7
i3: Add $mod+z otp selector
Signed-off-by: Joe Groocock <me@frebib.net>
2021-11-23 11:05:34 +00:00
49554ca359
i3: Fix $mod+i "paste" with text starting with a dash
Shell escaping is the devil

Signed-off-by: Joe Groocock <me@frebib.net>
2021-11-23 11:04:38 +00:00
5 changed files with 61 additions and 17 deletions

View File

@ -51,21 +51,16 @@
# Ignore newlines '\n' in notifications.
ignore_newline = no
# The geometry of the window:
# [{width}]x{height}[+/-{x}+/-{y}]
# The geometry of the message window.
# The height is measured in number of notifications everything else
# in pixels. If the width is omitted but the height is given
# ("-geometry x2"), the message window expands over the whole screen
# (dmenu-like). If width is 0, the window expands to the longest
# message displayed. A positive x is measured from the left, a
# negative from the right side of the screen. Y is measured from
# the top and down respectevly.
# The width can be negative. In this case the actual width is the
# screen width minus the width defined in within the geometry option.
# dynamic width from 0 to 400
# width = (0, 400)
# constant width of 400
width = (320, 360)
# 53 = 30 + 23 (bar-height)
geometry = "360x5-30+30"
# Position the notification in the top right corner
origin = top-right
# Offset from the origin
offset = 30x30
# Shrink window if it's smaller than the width. Will be ignored if
# width is 0.
@ -74,7 +69,7 @@
# The transparency of the window. Range: [0; 100].
# This option will only work if a compositing windowmanager is
# present (e.g. xcompmgr, compiz, etc.).
transparency = 15
transparency = 20
# Don't remove messages, if the user is idle (no mouse or keyboard input)
# for longer than idle_threshold seconds.

View File

@ -9,7 +9,7 @@ GEM_SPEC_CACHE="$XDG_CACHE_HOME/gem"
GOPATH="$XDG_DATA_HOME/go"
ICEAUTHORITY="$XDG_CACHE_HOME/ICEauthority"
NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME/npm/npmrc"
#PASSWORD_STORE_DIR="$XDG_DATA_HOME/pass"
PASSWORD_STORE_DIR="$XDG_DATA_HOME/pass"
PYTHONSTARTUP="$XDG_CONFIG_HOME/python/startup"
RUSTUP_HOME="$XDG_DATA_HOME/rustup"
TERMINFO="$XDG_DATA_HOME/terminfo"

View File

@ -19,8 +19,14 @@
[pull]
rebase = true
prune = true
[merge]
ff = only
[rebase]
autoStash = true
[remote "origin"]
fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
[remote "upstream"]
fetch = +refs/pull/*/head:refs/remotes/upstream/pr/*
[log]
date = iso8601-local
[format]

View File

@ -151,7 +151,8 @@ bindsym $mod+$alt+space exec systemd-run-i3 -s background -n ~/.config/i
bindsym $mod+numbersign exec systemd-run-i3 -n i3-sensible-terminal --hold -e sh -c 'xclip -o | gpg --decrypt 2>&1'
bindsym $mod+r exec bash -c 'pwgen -snc 32 1 | tee >(xargs notify-send Generated\ password\:) | xclip -i -r'
bindsym $mod+g exec systemd-run-i3 -n notify-send -c transfer "$(gist -PRpc)"
bindsym --release $mod+i exec systemd-run-i3 -s background -n sh -c 'sleep 0.5 && xdotool getactivewindow type --delay 250 "$(xclip -o -selection clipboard)"'
bindsym --release $mod+i exec systemd-run-i3 -s background -n sh -c 'sleep 0.5 && xdotool getactivewindow type --delay 10 -- "$(xclip -o -selection clipboard)"'
bindsym $mod+z exec otp | rofi -dmenu -p otp | xargs otp
# Media player controls
bindsym XF86AudioPlay exec --no-startup-id playerctl -a play-pause

42
scripts/otp Executable file
View File

@ -0,0 +1,42 @@
#!/usr/bin/env bash
while getopts "on:" o; do
case "${o}" in
o)
stdout=1;;
n)
caller="${OPTARG}"
;;
*)
exec ykman oath accounts list
;;
esac
done
shift $((OPTIND-1))
if [ $# -lt 1 ]; then
exec ykman oath accounts list
fi
if [ -n "$caller" ]; then
notif="$(notify-send -p "Touch your Yubikey" "$caller is requesting otp for $1")"
fi
ykman oath accounts code -s "$1" 2>&1 |
while read -r x; do
if grep -Pqw '[0-9]{6}' <<< "$x"; then
if [ -z "$stdout" ]; then
echo "$x" | tee >(xclip -i)
xdotool type "$x"
else
echo "$x"
fi
fi
if [ -z "$stdout" ]; then
notify-send "$x";
fi
done
if [ -n "$notif" ]; then
notify-send -r "$notif" -t 1000 "Touch your Yubikey" "otp generated for $caller"
fi