diff --git a/X11/xinitrc b/X11/xinitrc index 4f4c36f..37f31a3 100644 --- a/X11/xinitrc +++ b/X11/xinitrc @@ -19,7 +19,6 @@ sysmodmap=/etc/X11/xinit/.Xmodmap # Added xinitrc config dbus-update-activation-environment --systemd --all & systemctl --user import-environment DISPLAY & -hsetroot -cover /home/tavo/Pictures/Backgrounds/default.jpeg & xset r rate 300 50 & setxkbmap en & dwmblocks & @@ -27,6 +26,8 @@ clipmenud & dunst & picom --experimental-backends & clear & +#xrandr --output DVI-D-0 --right-of HDMI-0 +hsetroot -cover /home/tavo/Pictures/Backgrounds/default.jpg & while true; do dwm >/dev/null 2>&1 diff --git a/dunst/dunstrc b/dunst/dunstrc index dcb5f01..d3e9e93 100644 --- a/dunst/dunstrc +++ b/dunst/dunstrc @@ -2,7 +2,7 @@ width = (200, 300) height = 200 origin = top-right - offset = 32x32 + offset = 24x42 transparency = 0 padding = 4 horizontal_padding = 16 diff --git a/scripts/dwm/dwmotp b/scripts/dwm/dwmotp new file mode 100755 index 0000000..e2ec784 --- /dev/null +++ b/scripts/dwm/dwmotp @@ -0,0 +1,6 @@ +#!/bin/sh +PASSWORD_STORE_DIR="$HOME/.local/share/password-store" + +password="$(~/.config/scripts/menu/menu-pass)" +[ -z "$password" ] && exit +xdotool $(pass otp "$password" | head -n 1) diff --git a/scripts/dwm/dwmpass b/scripts/dwm/dwmpass new file mode 100755 index 0000000..0dfe89c --- /dev/null +++ b/scripts/dwm/dwmpass @@ -0,0 +1,6 @@ +#!/bin/sh +PASSWORD_STORE_DIR="$HOME/.local/share/password-store" + +password="$(~/.config/scripts/menu/menu-pass)" +[ -z "$password" ] && exit +xdotool $(pass "$password" | head -n 1) diff --git a/scripts/menu/menu b/scripts/menu/menu index 7c8a592..8124983 100755 --- a/scripts/menu/menu +++ b/scripts/menu/menu @@ -6,7 +6,7 @@ BRUN="-run" DRUN="_run" TRUN="-run" FRUN="" [ "$MODE" != "run" ] && BRUN="" DRUN="" TRUN="" FRUN="" # Configuration -menu="menu_bemenu" +menu="menu_dmenu" font="JetbrainsMono" font_size="10" col_white="#ebdbb2" # White diff --git a/scripts/menu/menu-input b/scripts/menu/menu-input index 78d32e0..ddd2ed5 100755 --- a/scripts/menu/menu-input +++ b/scripts/menu/menu-input @@ -5,7 +5,7 @@ input=$(pactl list short sources | cut -f 2 | grep input | menu "Input:") # Set audio device, notify command success -pactl set-default-source "$input" && notify-send "󰕾 Default Input" "Set to '$input'" || notify-send "󰕾 Default Input" "Didn't change" +pactl set-default-source "$input" && notify-send -r 11 "󰕾 Default Input" "Set to '$input'" || notify-send -r 11 "󰕾 Default Input" "Didn't change" # Reload statusbar volume module (dwm & dwmblocks) kill -45 "$(pidof dwmblocks)" diff --git a/scripts/menu/menu-output b/scripts/menu/menu-output index c45776b..331d37c 100755 --- a/scripts/menu/menu-output +++ b/scripts/menu/menu-output @@ -5,7 +5,7 @@ output=$(pactl list short sinks | cut -f 2 | menu "Output:") # Set audio device, notify command success -pactl set-default-sink "$output" && notify-send "󰕾 Default Output" "Set to '$output'" || notify-send "󰕾 Default Output" "Didn't change" +pactl set-default-sink "$output" && notify-send -r 10 "󰕾 Default Output" "Set to '$output'" || notify-send -r 10 "󰕾 Default Output" "Didn't change" # Reload statusbar module (dwm & dwmblocks) kill -44 "$(pidof dwmblocks)" diff --git a/scripts/menu/menu-pass b/scripts/menu/menu-pass index 7b943b9..c1d437b 100755 --- a/scripts/menu/menu-pass +++ b/scripts/menu/menu-pass @@ -1,5 +1,6 @@ #!/bin/sh # menu for 'pass' +PASSWORD_STORE_DIR="$HOME/.local/share/password-store" MENU="$HOME/.config/scripts/menu/menu" password="$(find "$PASSWORD_STORE_DIR" -type f -name '*.gpg' | sed "s@$PASSWORD_STORE_DIR/@@g ; s@.gpg@@g" | $MENU "Pass:")" diff --git a/scripts/menu/menu-xrandr b/scripts/menu/menu-xrandr new file mode 100755 index 0000000..51bb352 --- /dev/null +++ b/scripts/menu/menu-xrandr @@ -0,0 +1,12 @@ +#!/bin/sh +LIST="$(xrandr | sed '/disconnected/d;/connected/!d;s/ .*$//g')" +MONITORS="$(printf '%s' "$LIST" | tr '\n' ' ')" + +CMD="$(printf 'xrandr' ; for MONITOR in $MONITORS ; do + SELECT="$(printf '%s' "$LIST" | menu "Next monitor (to right):")" + [ -z "$SELECT" ] && exit 0 + [ -n "$LAST" ] && printf ' --output %s --right-of %s' "$SELECT" "$LAST" + LAST="$SELECT" +done)" + +$($CMD) diff --git a/shell/bashrc b/shell/bashrc index 30ccd1b..734d6c3 100644 --- a/shell/bashrc +++ b/shell/bashrc @@ -32,7 +32,8 @@ set -o vi # vi mode [ -e "$HOME/.config/shell/xdgspec" ] && source ~/.config/shell/xdgspec [ -e "$HOME/.config/shell/aliasrc" ] && source ~/.config/shell/aliasrc [ -e "$HOME/.config/shell/envvar" ] && source ~/.config/shell/envvar -[ -e "$HOME/.config/shell/sway" ] && source ~/.config/shell/sway +#[ -e "$HOME/.config/shell/sway" ] && source ~/.config/shell/sway +[ -e "$HOME/.config/shell/dwm" ] && source ~/.config/shell/dwm # Nice shell welcome [ -e "/usr/bin/afetch" ] && (afetch) || (fetch min) 2>/dev/null diff --git a/shell/envvar b/shell/envvar index 251e3cf..176fe4e 100644 --- a/shell/envvar +++ b/shell/envvar @@ -5,6 +5,7 @@ PATH="$HOME/.config/scripts/status${PATH:+:${PATH}}" PATH="$HOME/.config/scripts/menu${PATH:+:${PATH}}" PATH="$HOME/.config/scripts/sway${PATH:+:${PATH}}" +PATH="$HOME/.config/scripts/dwm${PATH:+:${PATH}}" PATH="$HOME/.config/wrappers${PATH:+:${PATH}}" PATH="$HOME/.config/scripts${PATH:+:${PATH}}" PATH="$HOME/.local/bin${PATH:+:${PATH}}"