1
0
mirror of https://github.com/alrayyes/dotfiles/ synced 2023-11-14 15:56:30 +00:00

Compare commits

...

5 Commits

Author SHA1 Message Date
Ryan Kes
35a57197c3 install xprop, shfmmt & shellcheck 2020-06-19 11:57:52 +02:00
Ryan Kes
32b3d18cae updated readme 2020-06-19 11:57:29 +02:00
Ryan Kes
5a145d9ffd Added swallower for bspwm 2020-06-19 11:57:13 +02:00
Ryan Kes
7715c83525 Added config file for ideavim 2020-06-19 11:56:48 +02:00
Ryan Kes
e501dff7ed format prettier & shell scripts in nvim 2020-06-19 11:56:33 +02:00
9 changed files with 80 additions and 3 deletions

View File

@ -14,6 +14,7 @@
- [[#configured-applications-also-installed-by-script][Configured Applications (also installed by script)]]
- [[#configured-locales][Configured Locales]]
- [[#golang][Golang]]
- [[#shell][Shell]]
- [[#fish][Fish]]
- [[#theme][Theme]]
- [[#package-manager][Package Manager]]
@ -77,7 +78,9 @@ A repository of my personal configuration files.
- [[https://github.com/tldr-pages/tldr][tldr]]
- [[https://github.com/sargon/trayer-srg][trayer-srg]]
- [[https://www.freedesktop.org/wiki/Software/udisks/][udisks]]
- [[https://www.x.org/releases/X11R7.5/doc/man/man1/xprop.1.html][xprop]]
- [[https://github.com/stoeckmann/xwallpaper][xwallpaper]]
- [[https://yarnpkg.com/][yarn]]
- [[https://pwmt.org/projects/zathura/][zathura]]
** Fonts
- [[https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/FiraCode][Fira Code Nerd Patched]]
@ -125,6 +128,10 @@ A repository of my personal configuration files.
- [[https://golang.org/][golang]]
- [[https://github.com/golangci/golangci-lint][golangci-lint]]
* Shell
- [[https://github.com/mvdan/sh][shfmt]]
- [[https://www.shellcheck.net/][shellcheck]]
* Fish
*** Theme
- [[https://github.com/matchai/spacefish][spacefish]]

View File

@ -99,3 +99,6 @@ xautolock -time 10 -locker ~/.local/bin/lock &
###---Misc---###
# Needed for Jetbrains products to work
wmname LG3D &
# Enable bspswallow
pidof bspswallow || bash bspswallow &

View File

View File

@ -0,0 +1,2 @@
St
Alacritty

47
bspwm/.local/bin/bspswallow Executable file
View File

@ -0,0 +1,47 @@
#!/bin/sh
# Get class of a wid
get_class() {
id=$1
if [ -z $id ]; then
echo ""
else
xprop -id $id | sed -n '/WM_CLASS\|WM_COMMAND/s/.*"\(.*\)".*/\1/p'
fi
}
swallow() {
addedtodesktop=$2
echo $addedtodesktop
lasttermdesktop=$(bspc query -D -n prev)
echo $lasttermdesktop
swallowerid=$1
swallowingid=$(bspc query -n prev -N)
if [ $addedtodesktop = $lasttermdesktop ]; then
cat ~/.config/bspwm/noswallow ~/.config/bspwm/terminals | grep "^$(get_class $swallowerid)$" && return
grep "^$(get_class $swallowingid)$" ~/.config/bspwm/terminals || return
echo $swallowerid $swallowingid >>/tmp/swallowids
bspc node $swallowingid --flag hidden=on
fi
}
spit() {
spitterid=$1
grep "^$spitterid" /tmp/swallowids || return
spittingid=$(grep "^$spitterid" /tmp/swallowids | head -n1 | awk '{print $2}')
bspc node $spittingid --flag hidden=off
bspc node $spittingid -f
sed -i "/^$spitterid/d" /tmp/swallowids
}
bspc subscribe node_add node_remove | while read -r event; do
case "$(echo $event | awk '{ print $1 }')" in
node_add)
swallow $(echo $event | awk '{print $5 " " $3}')
;;
node_remove)
spit $(echo $event | awk '{print $4}')
;;
esac
done

View File

@ -0,0 +1,12 @@
" Enable plugins
set easymotion
set commentary
set surround
" Ignore case on search
set ic
" Line numbers are relative
set rnu
source ~/.config/nvim/init.vim

View File

@ -1,12 +1,13 @@
#!/usr/bin/env fish
# Prerequisite & inistalled apps
set prerequisiteApps bat broot brave caffeine-ng exa fslint fzf graphviz isync imagemagick lightdm-gtk-greeter mailcap deadd-notification-center-bin npm pamixer pfetch playerctl pulseaudio pulsemixer python pywal stow sxiv tldr trayer udisks2 xwallpaper yarn zathura
set prerequisiteApps bat broot brave caffeine-ng exa fslint fzf graphviz isync imagemagick lightdm-gtk-greeter mailcap deadd-notification-center-bin npm pamixer pfetch playerctl pulseaudio pulsemixer python pywal stow sxiv tldr trayer udisks2 xwallpaper yarn xprop zathura
set prerequisiteFonts otf-nerd-fonts-fira-code noto-fonts ttf-unifont
set prerequisiteLsp bash-language-server ccls php-language-server python-language-server typescript-language-server-bin vscode-css-languageserver-bin vscode-html-languageserver-bin nodejs-intelephense
set configuredApps alacritty bspwm castero emacs firejail git gnupg gtk lf deadd-notification-center-bin mpd mpv mpv-mpris ncmpcpp neomutt neovim picom redshift spotifyd-dbus-mpris sxhkd tmux tuir weechat
set locales aspell-en hunspell-en_GB hunspell-en_US hunspell-nl
set golang go golangci-lint-bin
set shell shfmt shellcheck
function mkdir_if_not_exist
if [ ! -d "$argv" ]
@ -60,6 +61,11 @@ for go in $golang
install_app_if_not_exist "$go"
end
for sh in $shell
install_app_if_not_exist "$sh"
end
# Create directories that need to exist
mkdir_if_not_exist ~/.cache/mpd
mkdir_if_not_exist ~/.config/alacritty

View File

@ -10,4 +10,4 @@
"coc-tsserver": ">=1.5.1",
"coc-yaml": ">=1.0.4"
}
}
}

View File

@ -190,7 +190,7 @@
let g:ale_sign_warning = '⚠️'
" Fix files
let g:ale_fixers = {'javascript': ['prettier', 'eslint']}
let g:ale_fixers = {'javascript': ['prettier', 'eslint'], 'sh': ['shfmt'], 'json': ['prettier']}
" Fix files automatically on save
let g:ale_fix_on_save = 1