diff --git a/.config/sway/config b/.config/sway/config index 54adc14..4d43956 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -1 +1,5 @@ -include ~/.config/sway/config.d/* +include ~/.config/sway/config.d/exec +include ~/.config/sway/config.d/display +include ~/.config/sway/config.d/theme +include ~/.config/sway/config.d/keybinds +include ~/.config/sway/config.d/custom diff --git a/.config/sway/config.d/custom.d/input-settings b/.config/sway/config.d/custom.d/input-settings new file mode 100644 index 0000000..a031fbb --- /dev/null +++ b/.config/sway/config.d/custom.d/input-settings @@ -0,0 +1,36 @@ +# vim: filetype=i3config + +# swap caps and ctrl on Thinkpad keyboard +input 1:1:AT_Translated_Set_2_keyboard { + xkb_options "ctrl:swapcaps" +} + +# dugod keyboard and 2.4G variant +input 12136:130:Hoksi_Technology_DURGOD_Taurus_K320 { + # swap caps with ctrl, and lalt with lwin + xkb_options "ctrl:swapcaps, altwin:swap_lalt_lwin" +} + +input 12136:32832:Hoksi_Technology_DURGOD_Infinite_Link { + xkb_options "ctrl:swapcaps, altwin:swap_lalt_lwin" +} + +input type:mouse { + accel_profile flat +} + +# always disable touchpad +input type:touchpad { + events disabled +# accel_profile adaptive +# pointer_accel -0.3 +# natural_scroll enabled +# tap enabled +# dwt enabled +# events disabled_on_external_mouse +} + +input 2:14:ETPS/2_Elantech_TrackPoint { + accel_profile adaptive + pointer_accel 0 +} diff --git a/.config/sway/config.d/custom.d/output b/.config/sway/config.d/custom.d/output new file mode 100644 index 0000000..92417a2 --- /dev/null +++ b/.config/sway/config.d/custom.d/output @@ -0,0 +1,8 @@ +output DP-2 mode 2560x1440@74.968Hz +output DP-2 subpixel rgb +output * adaptive_sync on +output eDP-1 subpixel rgb + +# TV at home +output 'Unknown HUAWEI INC 0x00000000' mode 3840x2160@60.000Hz +output 'Unknown HUAWEI INC 0x00000000' scale 2 diff --git a/.config/sway/config.d/display b/.config/sway/config.d/display index 6e9d992..aade454 100644 --- a/.config/sway/config.d/display +++ b/.config/sway/config.d/display @@ -1,8 +1,5 @@ # vim: filetype=i3config -# wallpaper -output * bg $(find -L ~/Pictures/Wallpapers/dark -type f | shuf -n1) fill - # laptop output mode set $laptop eDP-1 bindswitch --reload --locked lid:on output $laptop disable diff --git a/.config/sway/config.d/exec b/.config/sway/config.d/exec index b8d5d18..1f5f9a7 100644 --- a/.config/sway/config.d/exec +++ b/.config/sway/config.d/exec @@ -1,6 +1,7 @@ # vim: filetype=i3config ##starting userspace software +exec_always sh -c ~/.config/sway/scripts/update-wallpaper.sh exec mkfifo /tmp/kitty exec wlsunset -l 30.4 -L 104.0 -T 6500 -t 3500 exec light -S 70 diff --git a/.config/sway/config.d/keybinds b/.config/sway/config.d/keybinds index 4e97ab8..25a9100 100644 --- a/.config/sway/config.d/keybinds +++ b/.config/sway/config.d/keybinds @@ -8,7 +8,7 @@ set $right l set $term kitty -1 set $menu wofi | xargs swaymsg exec -- -#my keybinds +# my keybinds # screenshot bindsym $mod+Print exec ~/.config/sway/scripts/grimshot-ui.sh @@ -22,7 +22,18 @@ bindsym $mod+Ctrl+space exec fcitx5-remote -t # Change theme bindsym $mod+Ctrl+t exec ~/.config/sway/scripts/themes.sh -#bind fn keys +# bind gesture +bindgesture swipe:3:right workspace prev +bindgesture swipe:3:left workspace next + +# use mouse wheel to switch workspaces +bindsym --whole-window $mod+button4 workspace prev +bindsym --whole-window $mod+button5 workspace next +# side buttons +bindsym --whole-window $mod+button8 workspace prev +bindsym --whole-window $mod+button9 workspace next + +# bind fn keys bindsym XF86AudioMicMute exec amixer set Capture toggle exec mkfifo $SWAYSOCK.wob && tail -f $SWAYSOCK.wob | wob bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% && pactl get-sink-volume @DEFAULT_SINK@ | head -n 1| awk '{print substr($5, 1, length($5)-1)}' > $SWAYSOCK.wob diff --git a/.config/sway/scripts/themes.sh b/.config/sway/scripts/themes.sh index a3e92cf..c66b5f0 100755 --- a/.config/sway/scripts/themes.sh +++ b/.config/sway/scripts/themes.sh @@ -12,7 +12,6 @@ else fi sed -i $command ~/.config/kitty/kitty.conf -sed -i $command ~/.config/sway/config.d/display sed -i $command ~/.config/sway/config.d/theme sed -i $command ~/.config/swaync/style.css sed -i $command ~/.config/waybar/style.css @@ -24,9 +23,17 @@ swaync-client -rs & if [ $scheme = "light" ]; then kitty -1 sh -c "kitty @ set-colors -a -c ~/.config/kitty/themes/light.conf" & mv ~/.config/zathura/zathurarc.light ~/.config/zathura/zathurarc + + # set wallpaper location + unlink ~/.config/sway/Wallpaper + ln -s ~/Pictures/Wallpapers/light ~/.config/sway/Wallpaper else kitty -1 sh -c "kitty @ set-colors -a -c ~/.config/kitty/themes/dark.conf" & mv ~/.config/zathura/zathurarc.dark ~/.config/zathura/zathurarc + + # set dark wallpaper + unlink ~/.config/sway/Wallpaper + ln -s ~/Pictures/Wallpapers/dark ~/.config/sway/Wallpaper fi sway reload diff --git a/.config/sway/scripts/update-wallpaper.sh b/.config/sway/scripts/update-wallpaper.sh new file mode 100755 index 0000000..4b8f501 --- /dev/null +++ b/.config/sway/scripts/update-wallpaper.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +export PATH="${PATH}:${HOME}/.local/bin" +export XDG_RUNTIME_DIR=/run/user/1000 +export XDG_CACHE_HOME=$HOME/.cache + +if ! pidof swww-daemon > /dev/null +then + swww init + exit +fi + +swww img $(find -L ~/.config/sway/Wallpaper/ -type f | shuf -n1) -t wave --transition-fps 60 --transition-duration 5 --transition-wave 16,16 diff --git a/.config/zathura/zathurarc b/.config/zathura/zathurarc index 18c4b70..24dcafa 100644 --- a/.config/zathura/zathurarc +++ b/.config/zathura/zathurarc @@ -37,4 +37,7 @@ set render-loading-fg "#3c3836" # fg set recolor-lightcolor "#fbf1c7" # bg set recolor-darkcolor "#3c3836" # fg set recolor "true" -# set recolor-keephue true # keep original color +set recolor-keephue true # keep original color + +# selection clipboard +set selection-clipboard clipboard diff --git a/.zshrc b/.zshrc index 101657c..6ebe31d 100644 --- a/.zshrc +++ b/.zshrc @@ -22,8 +22,8 @@ zinit ice lucid wait zinit light juancldcmt/colorize zinit ice lucid wait zinit light juancldcmt/shortify.zsh -zinit ice lucid wait -zinit light juancldcmt/direnv.zsh +# zinit ice lucid wait +# zinit light juancldcmt/direnv.zsh zinit ice compile'(pure|async).zsh' pick'async.zsh' src'pure.zsh' zinit light sindresorhus/pure diff --git a/Pictures/Wallpapers/dark-brown/oneshot-messiah.png b/Pictures/Wallpapers/dark-brown/oneshot-messiah.png deleted file mode 100644 index 6755aa9..0000000 Binary files a/Pictures/Wallpapers/dark-brown/oneshot-messiah.png and /dev/null differ diff --git a/Pictures/Wallpapers/light/ben-neale-29w9FiMWSr8-unsplash.jpg b/Pictures/Wallpapers/light/ben-neale-29w9FiMWSr8-unsplash.jpg deleted file mode 100644 index 23c397b..0000000 Binary files a/Pictures/Wallpapers/light/ben-neale-29w9FiMWSr8-unsplash.jpg and /dev/null differ