From 334842d234cab551e015d9a8a085ab5fb6f8e072 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Mon, 21 Jun 2021 11:14:28 -0500 Subject: [PATCH] SWAY --- common/neovim/coc-settings.json | 6 +++++- common/neovim/init.vim | 10 ++++++---- host/laptop/third/sway/config | 1 + os/linux/kanshi/config | 10 ++++++++++ os/linux/sway/config | 18 +++++++++--------- os/linux/waybar/config | 4 ++-- 6 files changed, 33 insertions(+), 16 deletions(-) diff --git a/common/neovim/coc-settings.json b/common/neovim/coc-settings.json index 5f10bc3..a80b71d 100644 --- a/common/neovim/coc-settings.json +++ b/common/neovim/coc-settings.json @@ -2,7 +2,11 @@ "coc.preferences.formatOnSaveFiletypes": ["ex", "exs", "elixir"], "diagnostic-languageserver.filetypes": { "elixir": ["mix_credo", "mix_credo_compile"], - "eelixir": ["mix_credo", "mix_credo_compile"] + "eelixir": ["mix_credo", "mix_credo_compile"], + "sh": "shellcheck" + }, + "diagnostic-languageserver.formatFiletypes": { + "sh": "shfmt" }, "elixir.pathToElixirLS": "~/.elixir-ls/release/language_server.sh", "codeLens.enable": true diff --git a/common/neovim/init.vim b/common/neovim/init.vim index b42b4ed..480f5bf 100644 --- a/common/neovim/init.vim +++ b/common/neovim/init.vim @@ -142,6 +142,10 @@ xnoremap < >gv nnoremap gd :call CocAction('jumpDefinition') +nmap gd (coc-definition) +nmap gy :call CocActionAsync('doHover') +nmap gi (coc-implementation) +nmap gr (coc-references) " TODO: learn about the wildmenu `q:` @@ -238,10 +242,8 @@ function! StatusLine() " endtry endfunction -augroup slime - au! - autocmd BufNewFile,BufRead *.slimleex set syntax=slim -augroup END +augroup slime | au! BufNewFile,BufRead *.slimleex set syntax=slim | augroup END +augroup ctmpl | au! BufNewFile,BufRead *.ctmpl set syntax=gohtmltmpl | augroup END " set laststatus=0 showtabline tabline=%!StatusLine() set statusline=%!StatusLine() diff --git a/host/laptop/third/sway/config b/host/laptop/third/sway/config index 4f2bccd..335c3a2 100644 --- a/host/laptop/third/sway/config +++ b/host/laptop/third/sway/config @@ -1,4 +1,5 @@ exec libinput-gestures -c $DOTFILES_PATH/os/linux/libinput/sway-gestures.conf +exec swayidle -w timeout 300 'swaylock -f -c 000000' timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' before-sleep 'swaylock -f -c 000000' bindswitch lid:toggle exec swaylock diff --git a/os/linux/kanshi/config b/os/linux/kanshi/config index 6a21bae..e6093d2 100644 --- a/os/linux/kanshi/config +++ b/os/linux/kanshi/config @@ -5,6 +5,16 @@ profile desktop-H-2x4kside2 { exec "$DOTFILES_PATH/os/linux/kanshi/desktop-H-workspaces.sh" } +profile desktop-H-2x4kside2 { + output "Samsung Electric Company CF791 HTRJ500315" enable mode 3440x1440@100Hz position 0,1200 scale 1 transform normal + output "Dell Inc. DELL U2720Q CWTM623" enable mode 3840x2160@60Hz position 3440,0 scale 1 transform 90 + exec "$DOTFILES_PATH/os/linux/kanshi/desktop-H-workspaces.sh" +} + +profile desktop-H-2x4kside2 { + output "Dell Inc. DELL U2720Q D3TM623" enable mode 3840x2160@60Hz position 0,0 scale 1.5 transform normal +} + # profile desktop-H-2x4kside2 { # output "Dell Inc. DELL U2720Q D3TM623" enable mode 3840x2160@60Hz position 0,0 scale 1.5 transform 270 # output "Samsung Electric Company CF791 HTRJ500315" enable mode 3440x1440@100Hz position 1440,800 scale 1 transform normal diff --git a/os/linux/sway/config b/os/linux/sway/config index d99d6be..8b6bf94 100644 --- a/os/linux/sway/config +++ b/os/linux/sway/config @@ -160,26 +160,26 @@ mode "resize" { for_window [app_id="floating_terminal"] floating enable for_window [class="floating_terminal"] floating enable -# for_window [class=".*"] layout splitv +for_window [class=".*"] layout floating enable +for_window [class=".*"] layout splith client.focused #66d9ef #66d9ef #66d9ef #66d9ef #66d9ef client.focused_inactive #111111 #111111 #ffffff #111111 #111111 client.unfocused #111111 #111111 #ffffff #111111 #111111 -exec_always 'killall kanshi; kanshi' -exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway -exec mako -exec pipewire -exec_always notify-send -a "Sway" -i ~/.wallpaper "Sway configuration loaded." - bar { swaybar_command waybar } -# TODO: exec_always? +exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway +exec mako +exec pipewire exec gammastep -t 6500:3500 -l 39.0:-94.5 -exec swayidle -w timeout 300 'swaylock -f -c 000000' timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' before-sleep 'swaylock -f -c 000000' +exec_always 'killall kanshi; kanshi' +exec_always notify-send -a "Sway" -i ~/.wallpaper "Sway configuration loaded." + +no_focus [class=".*"] output * bg $HOME/.wallpaper fill include $XDG_CONFIG_HOME/lytedev-env/*/sway/config diff --git a/os/linux/waybar/config b/os/linux/waybar/config index e667b11..5967425 100644 --- a/os/linux/waybar/config +++ b/os/linux/waybar/config @@ -3,8 +3,8 @@ "position": "bottom", "output": ["eDP-1", "DP-1"], "height": 32, - "modules-left": ["sway/workspaces"], - "modules-center": ["clock"], + "modules-left": ["clock"], + "modules-center": ["sway/workspaces"], "modules-right": [ "idle_inhibitor", "pulseaudio",