mirror of
https://github.com/frebib/dotfiles.git
synced 2024-06-14 12:57:23 +00:00
Compare commits
6 Commits
895d0ff0aa
...
8e74101f3e
Author | SHA1 | Date | |
---|---|---|---|
8e74101f3e | |||
898190a99f | |||
d771bf0448 | |||
634db612a1 | |||
a7778c30a7 | |||
49554ca359 |
@ -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.
|
||||
|
@ -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"
|
||||
|
@ -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]
|
||||
|
@ -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
42
scripts/otp
Executable 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
|
Loading…
Reference in New Issue
Block a user