diff options
| -rw-r--r-- | .config/i3status/config | 14 | ||||
| -rw-r--r-- | .config/sway/blue032 | 1 | ||||
| -rw-r--r-- | .config/sway/config | 23 | ||||
| -rw-r--r-- | .env | 6 | ||||
| -rwxr-xr-x | .local/bin/any_position_wrapper.sh | 13 | ||||
| -rw-r--r-- | .ssh/config | 12 | ||||
| -rw-r--r-- | .vimrc | 2 | ||||
| -rwxr-xr-x | .xinitrc | 3 |
8 files changed, 56 insertions, 18 deletions
diff --git a/.config/i3status/config b/.config/i3status/config index e769ee2..1525d00 100644 --- a/.config/i3status/config +++ b/.config/i3status/config @@ -12,7 +12,9 @@ general { interval = 5 } -order += "cpu_temperature 0" +order += "tztime holder__vpn" +#order += "cpu_temperature 0" +order += "tztime holder__temp" order += "ethernet _first_" order += "wireless _first_" order += "ipv6" @@ -21,11 +23,21 @@ order += "memory" order += "load" order += "volume master" #order += "tztime local" +# We use ~/.local/bin/any_position_wrapper.sh as a wrapper which +# will fill these custom placeholders order += "tztime holder__jdate" order += "tztime tehran" order += "tztime vancouver" order += "battery 0" +tztime holder__vpn { + format = "holder__vpn" +} + +tztime holder__temp { + format = "holder__temp" +} + cpu_temperature 0 { format = "CPU T: %degrees °C" path = "/sys/class/hwmon/hwmon4/temp1_input" diff --git a/.config/sway/blue032 b/.config/sway/blue032 deleted file mode 100644 index 812b029..0000000 --- a/.config/sway/blue032 +++ /dev/null @@ -1 +0,0 @@ -output eDP-1 pos 0 0 diff --git a/.config/sway/config b/.config/sway/config index 1e25051..8f0caa3 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -29,7 +29,15 @@ output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill # timeout 300 'swaylock -f -c 000000' \ # timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \ # before-sleep 'swaylock -f -c 000000' - +# Note: use idlehack to prevent idle when Firefox/Chromium is playing video. See +# https://wiki.archlinux.org/title/Sway and +# https://github.com/loops/idlehack +exec swayidle -w \ + idlehint 30 \ + timeout 300 'swaylock -f -c 000000 -i ~/Pictures/wave.jpg' \ + timeout 600 'swaymsg "output * power off"' \ + before-sleep 'playerctl pause; swaylock -f -i ~/Pictures/wave.jpg' \ + after-resume 'swaymsg "output * power on"' # This will lock your screen after 300 seconds of inactivity, then turn off # your displays after another 300 seconds, and turn your screens back on when # resumed. It will also lock your screen before your computer goes to sleep. @@ -48,9 +56,10 @@ output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill # You can get the names of your inputs by running: swaymsg -t get_inputs # Read `man 5 sway-input` for more information about this section. +# See man 7 xkeyboard-config for available options input * { - xkb_layout "de(nodeadkeys),ir" - xkb_options "lv3:caps_switch,grp:lctrl_lwin_toggle,shift:both_shiftlock" + xkb_layout "eu,ir,de(nodeadkeys)" + xkb_options "lv3:caps_switch,grp:lctrl_lwin_toggle,shift:both_shiftlock,grp_led:scroll" } input "9456:320:Metadot_-_Das_Keyboard_Das_Keyboard" { @@ -71,8 +80,12 @@ bindsym --to-code --no-warn { $mod+Shift+q kill $mod+Shift+c reload $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit' + $mod+Pause exec systemctl suspend -i } +# Launchers +bindsym $mod+x exec fuzzel + # Drag floating windows by holding down $mod and left mouse button. # Resize them with right mouse button + $mod. # Despite the name, also works for non-floating windows. @@ -236,7 +249,7 @@ bar { # When the status_command prints a new line to stdout, swaybar updates. # The default just shows the current date and time. - status_command while echo $USER@$(hostname) $(date +'%A W%V %Y-%m-%d %l:%M:%S %p'); do sleep 1; done + status_command while echo $(get-layout.sh) $USER@$(hostname) $(date +'%A W%V %Y-%m-%d %l:%M:%S %p'); do sleep 1; done colors { statusline #ffffff @@ -258,3 +271,5 @@ include ~/.config/sway/`hostname` # Prepare for xdg-desktop-portal-wlr exec ~/.config/sway/xdpw +# Everything else +include /etc/sway/config.d/* @@ -63,5 +63,9 @@ export GPG_TTY="$(tty)" gpg-connect-agent updatestartuptty /bye >/dev/null # Null keyring for python - avoids problems with wallets -export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring +# And causes problems too! Gajim was unable to use kwallet +# See https://github.com/philipn/python-keyring-lib/blob/master/README.rst +# for more options to configure python keyring +#export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring +#export PYTHON_KEYRING_BACKEND=keyring.backends.kwallet.DBusKeyring diff --git a/.local/bin/any_position_wrapper.sh b/.local/bin/any_position_wrapper.sh index f821657..242381c 100755 --- a/.local/bin/any_position_wrapper.sh +++ b/.local/bin/any_position_wrapper.sh @@ -47,11 +47,24 @@ function irdate { json_array=$(update_holder holder__jdate "$json") } +function vpn { + local json="{ \"full_text\": \"mullvad: $(mullvad status | head -n1)\", \"color\": \"#FF78D1\" }" + json_array=$(update_holder holder__vpn "$json") +} + +function temp { + local cpu_temp=$(sensors | grep 'CPU Temperature' | awk '{print $3}') + local json="{ \"full_text\": \"$cpu_temp\", \"color\": \"#FF7800\" }" + json_array=$(update_holder holder__temp "$json") +} + i3status > >(read line; echo "$line"; read line ; echo "$line" ; read line ; echo "$line" ; while true do read line json_array="$(echo $line | sed -e 's/^,//')" irdate + vpn + temp echo ",$json_array" done) & PID=$! trap "kill -TERM $PID" 0 1 2 15 diff --git a/.ssh/config b/.ssh/config index f5155b2..76ea329 100644 --- a/.ssh/config +++ b/.ssh/config @@ -1,17 +1,11 @@ -Include ~/.ssh/config.d/* +Include conf.d/* +Include %L AddKeysToAgent yes SetEnv TERM=vt100 +ServerAliveInterval 30 Host * ControlMaster auto ControlPath ~/.ssh/ssh_mux_%h_%p_%r -Host gw.home - HostName localhost - ProxyJump home.mehdix.org - Port 2222 - -Host pg.home - Hostname 192.168.3.39 - ProxyJump gw.home @@ -23,3 +23,5 @@ imap <silent> <C-b> <Plug>RightAlign nmap <silent> <C-k>b :RightAlign<CR> vmap <silent> <C-k>b :RightAlign<CR> +" Copy to system clipboard on Wayland +xnoremap <silent> <C-p> :w !wl-copy<CR><CR> @@ -1,8 +1,7 @@ #!/bin/bash case $(tty | cut -b9-) in (2) exec xfce4-session;; - (4) exec i3;; - (5) exec openbox-session;; + (5) exec i3;; (6) [ "$DESKTOP_SESSION" = plasma ] && (export DESKTOP_SESSION=plasma; exec startplasma-x11);; (7) exec openbox-session;; esac |
