diff --git a/global/.ssh/config b/global/.ssh/config index 0e6efc0..3b4abc4 100644 Binary files a/global/.ssh/config and b/global/.ssh/config differ diff --git a/global/scripts/bin/lock.sh b/global/scripts/bin/lock.sh new file mode 100755 index 0000000..5887b99 --- /dev/null +++ b/global/scripts/bin/lock.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env sh + +pkill -u "$USER" -USR1 dunst +~/.config/i3/i3lock +pkill -u "$USER" -USR2 dunst diff --git a/global/scripts/bin/screenshot.sh b/global/scripts/bin/screenshot.sh new file mode 100755 index 0000000..ea7c824 --- /dev/null +++ b/global/scripts/bin/screenshot.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +if (($# != 1)); then + echo "Error! No mode. Use: screenshot.sh full|region" + exit 2 +fi + +mode=$1 +screenshot="$HOME/Screenshots/screenshot-$(date +'%Y_%m_%d-%H_%M_%S').png" + +if [[ "$(uname)" == "Darwin" ]]; then + echo "Not implemented yet" + exit 0 +elif [[ "$(uname)" == "Linux" ]]; then + case $mode in + full) + maim $screenshot + rofi -e "Screenshot created: $screenshot" + ;; + region) + maim --select $screenshot + rofi -e "Screenshot created: $screenshot" + ;; + *) + echo "Error! Invalid mode. Use screenshot.sh full|region " + ;; + esac +else + echo "Unknown OS" + exit 2 +fi diff --git a/global/scripts/bin/setup_displays b/global/scripts/bin/setup_displays new file mode 100755 index 0000000..b9514c8 --- /dev/null +++ b/global/scripts/bin/setup_displays @@ -0,0 +1,12 @@ +#!/usr/bin/env sh + +connected_monitors=$(xrandr | grep " connected" | awk '{ print $1 }') +if echo "$connected_monitors" | grep -q "HDMI"; then + xrandr --output eDP-1 --off + xrandr --output HDMI-1-0 --mode 2560x1440 --rate 165.00 --dpi 120 + # xrandr --output eDP-1 --left-of HDMI-1-0 + xrandr --output HDMI-1-0 --primary +else + xrandr --output eDP-1 --mode 2560x1600 --rate 240.00 --dpi 160 +fi + diff --git a/linux/.config/i3/autostart.sh b/linux/.config/i3/autostart.sh index e06aab7..876bf3c 100755 --- a/linux/.config/i3/autostart.sh +++ b/linux/.config/i3/autostart.sh @@ -54,7 +54,7 @@ opensnitch-ui & setxkbmap -layout us,ru -option 'grp:alt_space_toggle' # lockscreen -xss-lock --transfer-sleep-lock -- i3lock --nofork +# xss-lock --transfer-sleep-lock -- ~/scripts/bin/lock.sh # archive commands # xinput --set-prop "pointer:Logitech MX Ergo Multi-Device Trackball " 'libinput Accel Speed' -0.2 diff --git a/linux/.config/i3/config b/linux/.config/i3/config index eb8bd94..fbc308e 100644 --- a/linux/.config/i3/config +++ b/linux/.config/i3/config @@ -28,8 +28,8 @@ font pango:monospace 8 # xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the # screen before suspend. Use loginctl lock-session to lock your screen. -exec --no-startup-id xss-lock --transfer-sleep-lock -- ~/.config/i3/i3lock --nofork -exec --no-startup-id xss-lock -- ~/.config/i3/i3lock --nofork +exec --no-startup-id xss-lock --transfer-sleep-lock -- ~/scripts/bin/lock.sh +#exec --no-startup-id xss-lock -- ~/scripts/bin/lock.sh # Use pactl to adjust volume in PulseAudio. # set $refresh_i3status killall -SIGUSR1 i3status @@ -172,7 +172,7 @@ bindsym $mod+Shift+r restart # exit i3 (logs you out of your X session) bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'" # i3lock -bindsym $mod+Shift+x exec --no-startup-id ~/.config/i3/i3lock +bindsym $mod+Shift+x exec --no-startup-id ~/scripts/bin/lock.sh & # screen bindsym $mod+Control+s exec --no-startup-id ~/scripts/bin/screenshot.sh region bindsym $mod+Control+f exec --no-startup-id ~/scripts/bin/screenshot.sh full diff --git a/linux/.config/i3/i3lock b/linux/.config/i3/i3lock index c9bfa5e..f0f49f7 100755 --- a/linux/.config/i3/i3lock +++ b/linux/.config/i3/i3lock @@ -8,29 +8,30 @@ WRONG='#880000bb' VERIFYING='#00564dE6' i3lock \ ---insidever-color=$CLEAR \ ---ringver-color=$VERIFYING \ -\ ---insidewrong-color=$CLEAR \ ---ringwrong-color=$WRONG \ -\ ---inside-color=$BLANK \ ---ring-color=$DEFAULT \ ---line-color=$BLANK \ ---separator-color=$DEFAULT \ -\ ---verif-color=$TEXT \ ---wrong-color=$TEXT \ ---time-color=$TEXT \ ---date-color=$TEXT \ ---layout-color=$TEXT \ ---keyhl-color=$WRONG \ ---bshl-color=$WRONG \ -\ ---screen 1 \ ---blur 9 \ ---clock \ ---indicator \ ---time-str="%H:%M:%S" \ ---date-str="%A, %Y-%m-%d" \ ---keylayout 1 \ + --insidever-color=$CLEAR \ + --ringver-color=$VERIFYING \ + \ + --insidewrong-color=$CLEAR \ + --ringwrong-color=$WRONG \ + \ + --inside-color=$BLANK \ + --ring-color=$DEFAULT \ + --line-color=$BLANK \ + --separator-color=$DEFAULT \ + \ + --verif-color=$TEXT \ + --wrong-color=$TEXT \ + --time-color=$TEXT \ + --date-color=$TEXT \ + --layout-color=$TEXT \ + --keyhl-color=$WRONG \ + --bshl-color=$WRONG \ + \ + --screen 1 \ + --blur 9 \ + --clock \ + --indicator \ + --time-str="%H:%M:%S" \ + --date-str="%A, %Y-%m-%d" \ + --keylayout 1 \ + -n diff --git a/linux/.config/solaar/config.yaml b/linux/.config/solaar/config.yaml index afc5a2b..f77b163 100644 --- a/linux/.config/solaar/config.yaml +++ b/linux/.config/solaar/config.yaml @@ -13,7 +13,7 @@ divert-keys: {82: 0, 83: 0, 86: 0, 91: 0, 93: 0, 237: 0} lowres-scroll-mode: false persistent-remappable-keys: null - pointer_speed: 180 + pointer_speed: 190 reprogrammable-keys: {80: 80, 81: 81, 82: 82, 83: 83, 86: 86, 91: 91, 93: 93, 237: 237} speed-change: 0 - _NAME: 'MX Ergo Multi-Device Trackball ' @@ -52,6 +52,7 @@ adc_power_management] _battery: 4096 _modelId: 'MX Ergo Multi-Device Trackball ' + _sensitive: {hires-scroll-mode: ignore, hires-smooth-invert: ignore, hires-smooth-resolution: ignore} change-host: null divert-keys: {82: 0, 83: 0, 86: 0, 91: 0, 93: 0, 237: 0} lowres-scroll-mode: false diff --git a/linux/.msmtprc b/linux/.msmtprc index c4c428d..4cfac77 100644 --- a/linux/.msmtprc +++ b/linux/.msmtprc @@ -13,7 +13,7 @@ port 465 tls_starttls off from foozzione@gmail.com user foozzione@gmail.com -passwordeval "gpg -dq $HOME/.config/mutt/gmail_isync.gpg" +passwordeval "gpg -dq --for-your-eyes-only $HOME/.config/mutt/gmail_isync.gpg" # Posteo account posteo @@ -22,7 +22,7 @@ port 465 tls_starttls off from fz0x1@posteo.net user fz0x1@posteo.net -passwordeval "gpg -dq $HOME/.config/mutt/posteo_isync.gpg" +passwordeval "gpg -dq --for-your-eyes-only $HOME/.config/mutt/posteo_isync.gpg" # Set a default account account default: posteo diff --git a/linux/.zshrc-additional b/linux/.zshrc-additional index 3f9cea6..69a883c 100644 --- a/linux/.zshrc-additional +++ b/linux/.zshrc-additional @@ -3,7 +3,7 @@ alias zup='sudo zypper dup' alias zin='sudo zypper in' alias rbf='sudo systemctl reboot --firmware-setup' ## Arch Linux -alias sleep='systemctl suspend' +alias ossleep='systemctl suspend' alias yyu='sudo pacman -Syyu' ## xsel alias cop='xsel --clipboard --input'