From 65058f3f2a3dee3579e4734c6a595b152f54f866 Mon Sep 17 00:00:00 2001 From: cho Date: Wed, 3 May 2023 21:36:47 +0700 Subject: [PATCH] update sway config --- home/default/.config/sway/config | 88 +++++++++++++++++++------------- 1 file changed, 53 insertions(+), 35 deletions(-) diff --git a/home/default/.config/sway/config b/home/default/.config/sway/config index ebf7086..e2f8bff 100644 --- a/home/default/.config/sway/config +++ b/home/default/.config/sway/config @@ -12,7 +12,7 @@ set $right l set $term $TERMINAL set $browser $BROWSER set $editor $EDITOR -set $menu dmenu-wl_path | dmenu-wl | xargs swaymsg exec -- +set $menu dmenu_path | dmenu | xargs swaymsg exec -- # wallpaper output "*" background ~/.local/share/bg fill @@ -21,7 +21,7 @@ output "*" background ~/.local/share/bg fill ### daemons -# autotype +# autotype exec ydotoold # display orientation @@ -45,6 +45,9 @@ exec syncthing --no-browser # polkit exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 +# emacs daemon +exec /usr/bin/emacs --daemon + exec_always autotiling exec systemctl --user import-environment 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 # looks -default_border pixel 2 -default_floating_border pixel 2 -gaps inner 5 -gaps outer 5 -#bindsym $mod+Shift+y border toggle +gaps inner 25 +bindsym $mod+Control+y border toggle -set $cl_high #F5C2E7 -set $cl_indi #888888 +#set $cl_high #F5C2E7 +set $cl_high #1C242D +set $cl_indi #1C242D set $cl_back #1E1D2F set $cl_fore #d9d8d8 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.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 # timeout @@ -107,6 +104,9 @@ floating_modifier $mod normal # reload the configuration file bindsym $mod+Shift+r reload +# toggle waybar +bindsym $mod+Shift+x exec killall -SIGUSR1 waybar + # 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" @@ -125,10 +125,14 @@ bindsym $mod+Shift+$down move down bindsym $mod+Shift+$up move up bindsym $mod+Shift+$right move right -# screenshot -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+Shift+Print exec grimshot save window $HOME/pictures/Screenshots/$(date +'%Y-%m-%d_%H.%M.%S_%Z').png +# screenshot +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+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 @@ -139,14 +143,15 @@ bindsym $mod+F1 exec $term -e $editor ~/.config/sway/config # browser bindsym $mod+w exec $browser -# schedule -bindsym $mod+c exec $term -e sc-im $HOME/vimwiki/schedule.sc +# agenda +bindsym $mod+c exec emacsclient -c --eval '(org-agenda-list)' # 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) -bindsym $mod+n exec $term -e nvim -c VimwikiIndex +# notebook +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) bindsym $mod+Shift+n exec $term -e newsboat @@ -157,16 +162,19 @@ bindsym $mod+Shift+t exec $term -e swaync-client -t # file manager bindsym $mod+r exec $term -e lf +# emacs +bindsym $mod+e exec emacsclient --create-frame --alternate-editor=emacs + # mail -bindsym $mod+e exec $term -e neomutt +#bindsym $mod+e exec $term -e neomutt # start tasks in dmenu bindsym $mod+x exec start-tasks # 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+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? #bindsym $mod+z exec dmenukaomoji @@ -176,9 +184,9 @@ bindsym $mod+shift+Insert exec keepmenu # download script 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) -bindsym --no-repeat $mod+t exec todo-wp + +# youtube client +bindsym $mod+y exec io.freetubeapp.FreeTube $(wl-paste) # workspace names set $wp1 1 @@ -242,6 +250,9 @@ bindsym $mod+Alt+down move workspace to output down # bindsym $mod+b splith # bindsym $mod+v splitv +# sticky +bindsym $mod+s sticky toggle + # switch the current container between different layout styles # bindsym $mod+s layout stacking # bindsym $mod+w layout tabbed @@ -291,23 +302,30 @@ mode "resize" { # status bar -include $HOME/.config/sway/bar -#exec_always killall waybar -#exec_always sleep 2 && waybar +#include $HOME/.config/sway/bar +exec_always killall waybar +exec_always sleep 2 && waybar ### special keys -# mute -# TODO mic mute and audio mute w/ wpctl -bindsym $mod+Shift+m exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle +# keyboard brightness +bindsym XF86MonBrightnessDown exec brightnessctl set 10%- +bindsym XF86MonBrightnessUp exec brightnessctl set +10% # volume bindsym $mod+minus 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+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 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% include /etc/sway/config.d/* -include ~/syncthing/default/config.d/sway/ +include ~/syncthing/default/config.d/sway/*