From e68555b521102fa0d527b4f86004dc16712c0fe5 Mon Sep 17 00:00:00 2001 From: FollieHiyuki Date: Thu, 4 Mar 2021 23:35:42 +0300 Subject: [PATCH] emacs: adjust config for lua-language-server --- README.md | 6 ++++-- home/.config/anime-downloader/config.json | 4 ++-- home/.config/doom/config.el | 9 ++++++-- home/.config/ytmdl/config | 2 +- home/.local/bin/brightness | 14 +++++++++++-- setup/lua-language-server.sh | 8 +++----- setup/mpvpaper.sh | 25 +++++++++++++++++++++++ 7 files changed, 54 insertions(+), 14 deletions(-) create mode 100755 setup/mpvpaper.sh diff --git a/README.md b/README.md index d48870b..464be1b 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ - Stuff I use: - **Text editor:** [Emacs](http://www.gnu.org/software/emacs/) + [Neovim](https://github.com/neovim/neovim) - **Fonts:** [Sarasa Gothic](https://github.com/be5invis/Sarasa-Gothic), [Iosevka Nerd Font](https://github.com/ryanoasis/nerd-fonts), [Iosevka](https://github.com/be5invis/Iosevka) - - **Backlight control:** [light](https://github.com/haikarainen/light) / [brightnessctl](https://github.com/Hummer12007/brightnessctl) + - **Backlight control:** [light](https://github.com/haikarainen/light) / [brightnessctl](https://github.com/Hummer12007/brightnessctl) / [brillo](https://gitlab.com/cameronnemo/brillo) - **Notification daemon:** [mako](https://github.com/emersion/mako) / [dunst](https://github.com/dunst-project/dunst) - **Clipboard manager:** [greenclip](https://github.com/erebe/greenclip) / [clipman](https://github.com/yory8/clipman) - **Mixer:** [pulsemixer](https://github.com/GeorgeFilipkin/pulsemixer) @@ -33,6 +33,7 @@ - **File manager:** [ranger](https://github.com/ranger/ranger), [vifm](https://github.com/vifm/vifm) - **Web browser:** [qutebrowser](https://github.com/qutebrowser/qutebrowser) - **Image viewer:** [feh](https://github.com/derf/feh), [imv](https://github.com/eXeC64/imv) + - **Wayland wallpaper setter:** [swaybg](https://github.com/swaywm/swaybg) / [oguri](https://github.com/vilhalmer/oguri) / [mpvpaper](https://github.com/GhostNaN/mpvpaper) - **Video player:** [mpv](https://github.com/mpv-player/mpv) - **Book viewer:** [zathura](https://git.pwmt.org/pwmt/zathura.git) - **Screenshot tools:** [grim](https://github.com/emersion/grim) + [slurp](https://github.com/emersion/slurp), [scrot](https://github.com/dreamer/scrot) @@ -40,8 +41,9 @@ - **Shell:** [fish](https://github.com/fish-shell/fish-shell) - **Shell prompt:** [starship](https://starship.rs/) - **Anime/Manga/Wallpaper:** [gallery-dl](https://github.com/mikf/gallery-dl) / [mangadl-bash](https://github.com/Akianonymus/mangadl-bash), [anime-downloader](https://github.com/anime-dl/anime-downloader) + [trackma](https://github.com/z411/trackma) + [adl](https://github.com/RaitaroH/adl) / [anigrab](https://github.com/ngomile/anigrab) - - **CLI/TUI for the Internet:** [translate-shell](https://github.com/soimort/translate-shell), [ddgr](https://github.com/jarun/ddgr), [howdoi](https://github.com/gleitz/howdoi), [amfora](https://github.com/makeworld-the-better-one/amfora), [cointop](https://github.com/miguelmota/cointop), [newsboat](https://github.com/newsboat/newsboat), [youtube-dl](https://github.com/ytdl-org/youtube-dl) + [ytmdl](https://github.com/deepjyoti30/ytmdl), [github-cli](https://github.com/cli/cli), [pup](https://github.com/ericchiang/pup), [weechat](https://github.com/weechat/weechat), [curl](https://curl.haxx.se) / [wget](https://www.gnu.org/software/wget/wget.html) / [aria2](https://github.com/aria2/aria2), [tremc](https://github.com/tremc/tremc) + [transmission](https://github.com/transmission/transmission) / [rtorrent](https://github.com/rakshasa/rtorrent), [goaccess](https://github.com/allinurl/goaccess) + - **CLI/TUI for the Internet:** [translate-shell](https://github.com/soimort/translate-shell) / [argos-translate](https://github.com/argosopentech/argos-translate), [ddgr](https://github.com/jarun/ddgr), [howdoi](https://github.com/gleitz/howdoi), [amfora](https://github.com/makeworld-the-better-one/amfora), [cointop](https://github.com/miguelmota/cointop), [newsboat](https://github.com/newsboat/newsboat), [youtube-dl](https://github.com/ytdl-org/youtube-dl) + [ytmdl](https://github.com/deepjyoti30/ytmdl), [github-cli](https://github.com/cli/cli), [pup](https://github.com/ericchiang/pup), [weechat](https://github.com/weechat/weechat), [curl](https://curl.haxx.se) / [wget](https://www.gnu.org/software/wget/wget.html) / [aria2](https://github.com/aria2/aria2), [tremc](https://github.com/tremc/tremc) + [transmission](https://github.com/transmission/transmission) / [rtorrent](https://github.com/rakshasa/rtorrent), [goaccess](https://github.com/allinurl/goaccess) - **CLI/TUI for other things:** [tt](https://github.com/runrin/tt), [forgit](https://github.com/wfxr/forgit), [borg](https://github.com/borgbackup/borg), [wendy](https://git.z3bra.org/wendy/log.html), [tokei](https://github.com/XAMPPRocky/tokei), [onefetch](https://github.com/o2sh/onefetch), [calcurse](https://github.com/lfos/calcurse), [qalculate](https://github.com/Qalculate/libqalculate), [fzf](https://github.com/junegunn/fzf), [fd](https://github.com/sharkdp/fd), [ripgrep](https://github.com/BurntSushi/ripgrep), [atool](http://www.nongnu.org/atool/), [rsync](https://rsync.samba.org/), [bottom](https://github.com/clementtsang/bottom), [hyperfine](https://github.com/sharkdp/hyperfine), [delta](https://github.com/dandavison/delta), [bat](https://github.com/sharkdp/bat), [glow](https://github.com/charmbracelet/glow) / [mdcat](https://github.com/lunaryorn/mdcat) / [mdr](https://github.com/MichaelMure/mdr), [exa](https://github.com/ogham/exa), [pandoc](https://github.com/jgm/pandoc), [csview](https://github.com/wfxr/csview), [libsixel](https://github.com/saitoha/libsixel), [buku](https://github.com/jarun/buku), [jq](https://github.com/stedolan/jq), sysstat, psmisc, wireless_tools, tree + - **Selfhosted service:** [LibreTranslate](https://github.com/uav4geo/LibreTranslate), [searx](https://github.com/searx/searx), [yacy](https://github.com/yacy/yacy_search_server), [synapse](https://github.com/matrix-org/synapse), [mastodon](https://github.com/tootsuite/mastodon), [gitea](https://gitea.io/) > `Emacs` deserves its own set of dependencies listed, but I'm lazy -> Check my Doom config for details diff --git a/home/.config/anime-downloader/config.json b/home/.config/anime-downloader/config.json index e364ecf..0ea3a2c 100644 --- a/home/.config/anime-downloader/config.json +++ b/home/.config/anime-downloader/config.json @@ -12,7 +12,7 @@ "file_format": "{anime_title}/{anime_title}_{ep_no}", "force_download": false, "player": "mpv", - "provider": "anime8", + "provider": "animefreak", "quality": "1080p", "skip_download": false, "url": false @@ -120,7 +120,7 @@ "360p" ], "log_level": "INFO", - "provider": "anime8", + "provider": "animefreak", "quality": "1080p" } } diff --git a/home/.config/doom/config.el b/home/.config/doom/config.el index e79af9a..58681fe 100644 --- a/home/.config/doom/config.el +++ b/home/.config/doom/config.el @@ -115,8 +115,13 @@ "--header-insertion=iwyu" "--header-insertion-decorators")) (after! lsp-clangd (set-lsp-priority! 'clangd 2)) ;; Prefer clangd instead of default ccls -(setq lua-lsp-dir "~/.config/emacs/.local/etc/lsp/lua-language-server/" - lua-lsp-completion-call-snippet "Replace") +(after! lsp-lua + (setq lua-lsp-dir (expand-file-name "lsp/lua-language-server/" doom-etc-dir) + lsp-clients-lua-language-server-bin (expand-file-name "bin/Linux/lua-language-server" lua-lsp-dir) + lsp-clients-lua-language-server-main-location (expand-file-name "main.lua" lua-lsp-dir) + lsp-lua-completion-call-snippet "Replace" + lsp-lua-telemetry-enable nil + lsp-lua-hint-enable t)) ;; Quicker which-key (after! which-key diff --git a/home/.config/ytmdl/config b/home/.config/ytmdl/config index e43bf60..235b6a4 100644 --- a/home/.config/ytmdl/config +++ b/home/.config/ytmdl/config @@ -15,7 +15,7 @@ # In case the path has spaces in in, include it in a " " # Following is a simple folder path example # -SONG_DIR = "/home/follie/Downloads/Music" +SONG_DIR = "~/Downloads/ytmdl" # #************--------ADVANCED-------********* # If you want to save the song in custom folders than those can be diff --git a/home/.local/bin/brightness b/home/.local/bin/brightness index b615562..e44964a 100755 --- a/home/.local/bin/brightness +++ b/home/.local/bin/brightness @@ -17,10 +17,15 @@ up) light -A 5 >/dev/null brightness="$(light -G | cut -d '.' -f 1)" _notify_brightness "$brightness" - else + elif command -v brightnessctl >/dev/null + then brightnessctl set 5%+ >/dev/null brightness="$(brightnessctl i | grep '%' | awk -F'(' '{print $2}' | awk -F'%' '{print $1}')" _notify_brightness "$brightness" + else + brillo -l -A 5 >/dev/null + brightness="$(brillo -G | cut -d '.' -f 1)" + _notify_brightness "$brightness" fi ;; down) if command -v light >/dev/null @@ -28,10 +33,15 @@ down) light -U 5 >/dev/null brightness="$(light -G | cut -d '.' -f 1)" _notify_brightness "$brightness" - else + elif command -v brightnessctl >/dev/null + then brightnessctl set 5%- >/dev/null brightness="$(brightnessctl i | grep '%' | awk -F'(' '{print $2}' | awk -F'%' '{print $1}')" _notify_brightness "$brightness" + else + brillo -l -U 5 >/dev/null + brightness="$(brillo -G | cut -d '.' -f 1)" + _notify_brightness "$brightness" fi ;; *) ;; diff --git a/setup/lua-language-server.sh b/setup/lua-language-server.sh index 5c8a1e6..90a424f 100755 --- a/setup/lua-language-server.sh +++ b/setup/lua-language-server.sh @@ -1,7 +1,7 @@ #!/bin/sh # clone the repo -git clone https://github.com/sumneko/lua-language-server +git clone https://github.com/sumneko/lua-language-server.git cd lua-language-server || exit git submodule update --init --recursive @@ -12,13 +12,11 @@ ninja -f ninja/linux.ninja cd ../.. ./3rd/luamake/luamake rebuild -# Just for the convenience sake cd ../ -mv -rfv lua-language-server ~/Code/lua-language-server # For coc.nvim mkdir -pv ~/.local/share/nvim/lsp -ln -sv ~/Code/lua-language-server ~/.local/share/nvim/lsp/ +cp -rfv lua-language-server ~/.local/share/nvim/lsp/ # For Doom Emacs mkdir -pv ~/.config/emacs/.local/etc/lsp -ln -sv ~/Code/lua-language-server ~/.config/emacs/.local/etc/lsp/ +mv -rv lua-language-server ~/.config/emacs/.local/etc/lsp/ diff --git a/setup/mpvpaper.sh b/setup/mpvpaper.sh new file mode 100755 index 0000000..f1fb2a9 --- /dev/null +++ b/setup/mpvpaper.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +# You need mpv-devel, meson, ninja, pkg-config + +git clone https://github.com/GhostNaN/mpvpaper + +cd mpvpaper || exit +meson build --prefix=/usr +ninja -C build + +if command -v doas >/dev/null +then + doas -- ninja -C build install +else + sudo ninja -C build install +fi + +cd .. + +# Control the wallpaper with mpv input-ipc-server: +# mpvpaper -f -o "input-ipc-server=/tmp/mpv-socket" DP-1 /path/to/video +# echo 'cycle pause' | socat - /tmp/mpv-socket + +# Simply set the wallpaper +# mpvpaper -f -o "--no-audio --loop-file" DP-1 /path/to/video