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 newlines '\n' in notifications.
ignore_newline = no ignore_newline = no
# The geometry of the window: # dynamic width from 0 to 400
# [{width}]x{height}[+/-{x}+/-{y}] # width = (0, 400)
# The geometry of the message window. # constant width of 400
# The height is measured in number of notifications everything else width = (320, 360)
# 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.
# 53 = 30 + 23 (bar-height) # Position the notification in the top right corner
geometry = "360x5-30+30" origin = top-right
# Offset from the origin
offset = 30x30
# Shrink window if it's smaller than the width. Will be ignored if # Shrink window if it's smaller than the width. Will be ignored if
# width is 0. # width is 0.
@ -74,7 +69,7 @@
# The transparency of the window. Range: [0; 100]. # The transparency of the window. Range: [0; 100].
# This option will only work if a compositing windowmanager is # This option will only work if a compositing windowmanager is
# present (e.g. xcompmgr, compiz, etc.). # present (e.g. xcompmgr, compiz, etc.).
transparency = 15 transparency = 20
# Don't remove messages, if the user is idle (no mouse or keyboard input) # Don't remove messages, if the user is idle (no mouse or keyboard input)
# for longer than idle_threshold seconds. # for longer than idle_threshold seconds.

View File

@ -9,7 +9,7 @@ GEM_SPEC_CACHE="$XDG_CACHE_HOME/gem"
GOPATH="$XDG_DATA_HOME/go" GOPATH="$XDG_DATA_HOME/go"
ICEAUTHORITY="$XDG_CACHE_HOME/ICEauthority" ICEAUTHORITY="$XDG_CACHE_HOME/ICEauthority"
NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME/npm/npmrc" 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" PYTHONSTARTUP="$XDG_CONFIG_HOME/python/startup"
RUSTUP_HOME="$XDG_DATA_HOME/rustup" RUSTUP_HOME="$XDG_DATA_HOME/rustup"
TERMINFO="$XDG_DATA_HOME/terminfo" TERMINFO="$XDG_DATA_HOME/terminfo"

View File

@ -19,8 +19,14 @@
[pull] [pull]
rebase = true rebase = true
prune = true prune = true
[merge]
ff = only
[rebase] [rebase]
autoStash = true autoStash = true
[remote "origin"]
fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
[remote "upstream"]
fetch = +refs/pull/*/head:refs/remotes/upstream/pr/*
[log] [log]
date = iso8601-local date = iso8601-local
[format] [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+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+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 $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 # Media player controls
bindsym XF86AudioPlay exec --no-startup-id playerctl -a play-pause 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