update sway config

This commit is contained in:
cho 2023-05-03 21:36:47 +07:00
parent 27722d1154
commit 65058f3f2a

View File

@ -12,7 +12,7 @@ set $right l
set $term $TERMINAL set $term $TERMINAL
set $browser $BROWSER set $browser $BROWSER
set $editor $EDITOR set $editor $EDITOR
set $menu dmenu-wl_path | dmenu-wl | xargs swaymsg exec -- set $menu dmenu_path | dmenu | xargs swaymsg exec --
# wallpaper # wallpaper
output "*" background ~/.local/share/bg fill output "*" background ~/.local/share/bg fill
@ -21,7 +21,7 @@ output "*" background ~/.local/share/bg fill
### daemons ### daemons
# autotype # autotype
exec ydotoold exec ydotoold
# display orientation # display orientation
@ -45,6 +45,9 @@ exec syncthing --no-browser
# polkit # polkit
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
# emacs daemon
exec /usr/bin/emacs --daemon
exec_always autotiling exec_always autotiling
exec systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway exec systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
@ -57,14 +60,12 @@ workspace_auto_back_and_forth no
show_marks yes show_marks yes
# looks # looks
default_border pixel 2 gaps inner 25
default_floating_border pixel 2 bindsym $mod+Control+y border toggle
gaps inner 5
gaps outer 5
#bindsym $mod+Shift+y border toggle
set $cl_high #F5C2E7 #set $cl_high #F5C2E7
set $cl_indi #888888 set $cl_high #1C242D
set $cl_indi #1C242D
set $cl_back #1E1D2F set $cl_back #1E1D2F
set $cl_fore #d9d8d8 set $cl_fore #d9d8d8
set $cl_urge #FF0000 set $cl_urge #FF0000
@ -74,10 +75,6 @@ client.focused_inactive $cl_back $cl_back $cl_fore $cl_back $cl_back
client.unfocused $cl_back $cl_back $cl_fore $cl_back $cl_back client.unfocused $cl_back $cl_back $cl_fore $cl_back $cl_back
client.urgent $cl_urge $cl_urge $cl_fore $cl_urge $cl_urge client.urgent $cl_urge $cl_urge $cl_fore $cl_urge $cl_urge
# You can get the names of your outputs by running: swaymsg -t get_outputs
output HDMI-A-1 pos 0 0 res 1366x768
output DVI-D-1 pos 1366 0 transform 0
### Idle configuration ### Idle configuration
# timeout # timeout
@ -107,6 +104,9 @@ floating_modifier $mod normal
# reload the configuration file # reload the configuration file
bindsym $mod+Shift+r reload bindsym $mod+Shift+r reload
# toggle waybar
bindsym $mod+Shift+x exec killall -SIGUSR1 waybar
# exit sway (logs you out of your wayland session) # exit sway (logs you out of your wayland session)
bindsym $mod+Shift+backspace exec prompt "Do you really wont to exit sway? This will end your Wayland session" "swaymsg exit" bindsym $mod+Shift+backspace exec prompt "Do you really wont to exit sway? This will end your Wayland session" "swaymsg exit"
@ -125,10 +125,14 @@ bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right bindsym $mod+Shift+$right move right
# screenshot # screenshot
bindsym Print exec grimshot save output $HOME/pictures/Screenshots/$(date +'%Y-%m-%d_%H.%M.%S_%Z').png bindsym Print exec grimshot save output $HOME/Pictures/Screenshots/$(date +'%Y-%m-%d_%H.%M.%S_%Z').png
bindsym $mod+Print exec grimshot save active $HOME/pictures/Screenshots/$(date +'%Y-%m-%d_%H.%M.%S_%Z').png bindsym $mod+Print exec grimshot save active $HOME/Pictures/Screenshots/$(date +'%Y-%m-%d_%H.%M.%S_%Z').png
bindsym $mod+Shift+Print exec grimshot save window $HOME/pictures/Screenshots/$(date +'%Y-%m-%d_%H.%M.%S_%Z').png bindsym $mod+Shift+Print exec grimshot save window $HOME/Pictures/Screenshots/$(date +'%Y-%m-%d_%H.%M.%S_%Z').png
# alternative keybind
bindsym $mod+Control+u exec grimshot save output $HOME/pictures/Screenshots/$(date +'%Y-%m-%d_%H.%M.%S_%Z').png
bindsym $mod+u exec grimshot save active $HOME/pictures/Screenshots/$(date +'%Y-%m-%d_%H.%M.%S_%Z').png
bindsym $mod+Shift+u exec grimshot save window $HOME/pictures/Screenshots/$(date +'%Y-%m-%d_%H.%M.%S_%Z').png
### programs ### programs
@ -139,14 +143,15 @@ bindsym $mod+F1 exec $term -e $editor ~/.config/sway/config
# browser # browser
bindsym $mod+w exec $browser bindsym $mod+w exec $browser
# schedule # agenda
bindsym $mod+c exec $term -e sc-im $HOME/vimwiki/schedule.sc bindsym $mod+c exec emacsclient -c --eval '(org-agenda-list)'
# diary # diary
bindsym $mod+Control+n exec $term -e nvim -c VimwikiMakeDiaryNote bindsym $mod+Control+n exec emacsclient -c --eval '(org-journal-new-entry 1)'
# vimwiki (notebook) # notebook
bindsym $mod+n exec $term -e nvim -c VimwikiIndex bindsym $mod+n exec emacsclient -c -a emacs ~/notebook/index.org
bindsym $mod+Control+r exec emacsclient -c -a emacs ~/notebook/refile.org
# newsboat (rss) # newsboat (rss)
bindsym $mod+Shift+n exec $term -e newsboat bindsym $mod+Shift+n exec $term -e newsboat
@ -157,16 +162,19 @@ bindsym $mod+Shift+t exec $term -e swaync-client -t
# file manager # file manager
bindsym $mod+r exec $term -e lf bindsym $mod+r exec $term -e lf
# emacs
bindsym $mod+e exec emacsclient --create-frame --alternate-editor=emacs
# mail # mail
bindsym $mod+e exec $term -e neomutt #bindsym $mod+e exec $term -e neomutt
# start tasks in dmenu # start tasks in dmenu
bindsym $mod+x exec start-tasks bindsym $mod+x exec start-tasks
# bookmarks # bookmarks
bindsym $mod+b exec $term -e nvim ~/notebook/bookmarks/bookmarks.md bindsym $mod+b exec emacsclient --create-frame --alternate-editor=emacs ~/notebook/bookmarks.org
bindsym $mod+shift+b exec bookmark bindsym $mod+shift+b exec bookmark
bindsym $mod+Insert exec ydotool type $(grep -v '^#' $home/notebook/bookmarks/bookmarks.md | dmenu -l 50 | cut -d' ' -f1) bindsym $mod+Insert exec ydotool type "$(grep -v '^#' ~/notebook/bookmarks/bookmarks.org | dmenu -l 50 | cut -d' ' -f1)"
# kaomiji? # kaomiji?
#bindsym $mod+z exec dmenukaomoji #bindsym $mod+z exec dmenukaomoji
@ -176,9 +184,9 @@ bindsym $mod+shift+Insert exec keepmenu
# download script # download script
bindsym $mod+Control+m exec musdl bindsym $mod+Control+m exec musdl
#bindsym $mod+Shift+y exec $term ytfzf --detach -c youtube-url $(wl-paste)
#bindsym $mod+y exec io.freetubeapp.FreeTube $(wl-paste) # youtube client
bindsym --no-repeat $mod+t exec todo-wp bindsym $mod+y exec io.freetubeapp.FreeTube $(wl-paste)
# workspace names # workspace names
set $wp1 1 set $wp1 1
@ -242,6 +250,9 @@ bindsym $mod+Alt+down move workspace to output down
# bindsym $mod+b splith # bindsym $mod+b splith
# bindsym $mod+v splitv # bindsym $mod+v splitv
# sticky
bindsym $mod+s sticky toggle
# switch the current container between different layout styles # switch the current container between different layout styles
# bindsym $mod+s layout stacking # bindsym $mod+s layout stacking
# bindsym $mod+w layout tabbed # bindsym $mod+w layout tabbed
@ -291,23 +302,30 @@ mode "resize" {
# status bar # status bar
include $HOME/.config/sway/bar #include $HOME/.config/sway/bar
#exec_always killall waybar exec_always killall waybar
#exec_always sleep 2 && waybar exec_always sleep 2 && waybar
### special keys ### special keys
# mute # keyboard brightness
# TODO mic mute and audio mute w/ wpctl bindsym XF86MonBrightnessDown exec brightnessctl set 10%-
bindsym $mod+Shift+m exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle bindsym XF86MonBrightnessUp exec brightnessctl set +10%
# volume # volume
bindsym $mod+minus exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- bindsym $mod+minus exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
bindsym $mod+equal exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ bindsym $mod+equal exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
bindsym $mod+Shift+minus exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 15%- bindsym $mod+Shift+minus exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 15%-
bindsym $mod+Shift+equal exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 15%+ bindsym $mod+Shift+equal exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 15%+
bindsym XF86AudioLowerVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
bindsym XF86AudioRaiseVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
# mute
bindsym $mod+Shift+m exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
bindsym XF86AudioMute exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
bindsym XF86AudioMicMute exec wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
# music controls # music controls
bindsym $mod+p exec mpc toggle bindsym $mod+p exec mpc toggle
@ -330,4 +348,4 @@ bindsym $mod+m exec $term -e ncmpcpp
#bindsym $mod+Shift+i exec mpc seek 0% #bindsym $mod+Shift+i exec mpc seek 0%
include /etc/sway/config.d/* include /etc/sway/config.d/*
include ~/syncthing/default/config.d/sway/ include ~/syncthing/default/config.d/sway/*