More Vim and Sway polishing

This commit is contained in:
Jesper Fussing Mørk 2019-04-12 10:32:48 +02:00
parent 0d2b91871b
commit 6721b130b8
10 changed files with 46 additions and 19 deletions

View File

@ -141,7 +141,7 @@ stty -echoctl
export _JAVA_AWT_WM_NONREPARENTING=1 export _JAVA_AWT_WM_NONREPARENTING=1
#export FZF_DEFAULT_COMMAND='ag --hidden --ignore .git -g ""' #export FZF_DEFAULT_COMMAND='ag --hidden --ignore .git -g ""'
export M2_HOME=/home/jfm/Tools/apache-maven export M2_HOME=/home/jfm/Tools/apache-maven
export PATH=$PATH:$M2_HOME/bin:/home/jfm/Tools/openshift-origin-client/:/home/jfm/Tools/aws/ export PATH=$PATH:$M2_HOME/bin:/home/jfm/Tools/openshift-origin-client/:/home/jfm/Tools/aws/:/home/jfm/Tools/spin/
export GIT_EDITOR=nvim export GIT_EDITOR=nvim
export EDITOR="nvim" export EDITOR="nvim"
export VISUAL="nvim" export VISUAL="nvim"
@ -157,6 +157,7 @@ alias ssh="TERM=xterm-256color ssh"
alias vim="nvim" alias vim="nvim"
alias vi="nvim" alias vi="nvim"
alias rtv="rtv --enable-media" alias rtv="rtv --enable-media"
alias spin="spin -k"
alias k9s="/home/jfm/Tools/k9s/k9s" alias k9s="/home/jfm/Tools/k9s/k9s"
alias buildtool="/home/jfm/.buildtool/bin/buildtool" alias buildtool="/home/jfm/.buildtool/bin/buildtool"
alias vpnup="nmcli con up id \"YouSee VPN\"" alias vpnup="nmcli con up id \"YouSee VPN\""

View File

@ -43,6 +43,7 @@ Plug 'w0rp/ale'
Plug 'ambv/black' Plug 'ambv/black'
" HTML " HTML
Plug 'jonsmithers/vim-html-template-literals' Plug 'jonsmithers/vim-html-template-literals'
Plug 'mxw/vim-jsx'
Plug 'pangloss/vim-javascript' Plug 'pangloss/vim-javascript'
Plug 'alvan/vim-closetag' Plug 'alvan/vim-closetag'
call plug#end() call plug#end()

View File

@ -52,7 +52,7 @@ bindsym $mod+Ctrl+Mod1+9 exec "dbus-send --print-reply --dest=org.mpris.MediaPla
bindsym $mod+Ctrl+Mod1+0 exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next" bindsym $mod+Ctrl+Mod1+0 exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next"
bindsym $mod+Ctrl+Mod1+8 exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous" bindsym $mod+Ctrl+Mod1+8 exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous"
# focus_follows_mouse no focus_follows_mouse always
# alternatively, you can use the cursor keys: # alternatively, you can use the cursor keys:
bindsym $mod+Left focus left bindsym $mod+Left focus left
@ -180,7 +180,13 @@ mode $exitmenu {
} }
bindsym $mod+backspace mode $exitmenu bindsym $mod+backspace mode $exitmenu
set $gnome-schema org.gnome.desktop.interface
exec_always {
gsettings set $gnome-schema gtk-theme 'Papirus-Dark'
gsettings set $gnome-schema icon-theme 'Materia-dark'
}
#### Custom Config #### Custom Config
exec swayidle timeout 300 'swaylock -i ~/.config/sway/wallpapers/stars_3840x2160.jpg -s stretch' timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' before-sleep 'swaylock -i ~/.config/sway/wallpapers/stars_3840x2160.jpg -s stretch' exec swayidle timeout 300 'swaylock -i ~/.config/sway/wallpapers/stars_3840x2160.jpg -s stretch' timeout 1800 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' before-sleep 'swaylock -i ~/.config/sway/wallpapers/stars_3840x2160.jpg -s stretch'
exec /home/jfm/.config/sway/scripts/start_layout.sh exec /home/jfm/.config/sway/scripts/start_layout.sh
exec mako exec mako

View File

@ -1,14 +1,12 @@
#!/bin/bash #!/bin/bash
source ~/.config/sway/scripts/location-helper.sh
CONNECTED_CMD="swaymsg -t get_outputs | jq -c '. | length'" if [ $LOCATION = "work" ];
monitors=`eval $CONNECTED_CMD`
echo $monitors
if [[ $monitors = 3 ]];
then then
echo "WORK" echo "WORK"
~/.config/sway/scripts/work-sway.sh & ~/.config/sway/scripts/work-sway.sh &
fi fi
if [[ $monitors = 2 ]]; if [ $LOCATION = "home" ];
then then
echo "HOME" echo "HOME"
~/.config/sway/scripts/home-sway.sh & ~/.config/sway/scripts/home-sway.sh &

View File

@ -1,8 +1,12 @@
#!/bin/bash #!/bin/bash
swaymsg output DP-5 enable swaymsg output DP-5 enable
swaymsg output DP-4 enable
swaymsg output eDP-1 disable swaymsg output eDP-1 disable
swaymsg output DP-5 pos 0 0 res 3440 1440 swaymsg output DP-5 pos 0 0 res 3440 1440
swaymsg output DP-4 pos 3440 0 res 1920 1200
swaymsg output DP-4 transform 270
swaymsg output DP-4 background ~/.config/sway/wallpapers/planet-surface-horizon-stars-galaxy_1200x1920.jpg fill
swaymsg output DP-5 background ~/.config/sway/wallpapers/space_ultrawide.jpg fill swaymsg output DP-5 background ~/.config/sway/wallpapers/space_ultrawide.jpg fill
killall waybar killall waybar

View File

@ -1,14 +1,17 @@
#!/bin/bash #!/bin/bash
CONNECTED_CMD="swaymsg -t get_outputs | jq -c '. | length'" CONNECTED_CMD="swaymsg -t get_outputs | jq -c '. | length'"
monitors=`eval $CONNECTED_CMD` monitors=`eval $CONNECTED_CMD`
HOME_CMD="swaymsg -t get_outputs | grep SyncMaster | wc -l"
is_home=`eval $HOME_CMD`
total=$(($monitors + $is_home))
echo $total
if [[ $monitors = 1 ]]; if [[ $monitors = 1 ]];
then then
export LOCATION="laptop" export LOCATION="laptop"
elif [[ $monitors = 2 ]]; elif [[ $total = 4 ]];
then then
export LOCATION="home" export LOCATION="home"
elif [[ $monitors = 3 ]]; elif [[ $total = 3 ]];
then then
export LOCATION="work" export LOCATION="work"
fi fi

View File

@ -3,9 +3,10 @@
swaymsg output eDP-1 enable swaymsg output eDP-1 enable
swaymsg output DP-4 enable swaymsg output DP-4 enable
swaymsg output DB-5 enable swaymsg output DB-5 enable
swaymsg output eDP-1 scale 1.5
swaymsg output eDP-1 pos 0 0 res 2560 1440 swaymsg output eDP-1 pos 0 0 res 2560 1440
swaymsg output DP-5 pos 2560 0 res 1920 1080 swaymsg output DP-5 pos 1706 0 res 1920 1080
swaymsg output DP-4 pos 4480 0 res 1680 1050 swaymsg output DP-4 pos 3626 0 res 1680 1050
swaymsg output eDP-1 background ~/.config/sway/wallpapers/space_2560x1440.jpg fill swaymsg output eDP-1 background ~/.config/sway/wallpapers/space_2560x1440.jpg fill
swaymsg output DP-4 background ~/.config/sway/wallpapers/planet_rings_1680x1050.jpg fill swaymsg output DP-4 background ~/.config/sway/wallpapers/planet_rings_1680x1050.jpg fill
swaymsg output DP-5 background ~/.config/sway/wallpapers/solar_eclipse_1920x1080.jpg fill swaymsg output DP-5 background ~/.config/sway/wallpapers/solar_eclipse_1920x1080.jpg fill

Binary file not shown.

After

Width:  |  Height:  |  Size: 495 KiB

View File

@ -5,9 +5,8 @@ if [ $LOCATION = "home" ];
then then
swaymsg exec "google-chrome-stable --app=https://mail.google.com" swaymsg exec "google-chrome-stable --app=https://mail.google.com"
swaymsg exec "google-chrome-stable --app=https://calendar.google.com" swaymsg exec "google-chrome-stable --app=https://calendar.google.com"
swaymsg exec "google-chrome-stable --app=https://hangouts.google.com" swaymsg exec "google-chrome-stable --app=https://web.whatsapp.com"
swaymsg exec "google-chrome-stable --app=https://messages.android.com" swaymsg exec "google-chrome-stable --app=https://messages.google.com/web/"
swaymsg exec slack
else else
swaymsg "exec google-chrome-stable --proxy-pac-url=file:///home/jfm/Customers/TDC/Scripts/tdcproxy.js --no-default-browser-check --new-window https://www.toggl.com/app/timer https://mail.google.com/mail/u/0/#inbox https://calendar.google.com/calendar/r?tab=mc https://hangouts.google.com https://messages.android.com" swaymsg "exec google-chrome-stable --no-default-browser-check --new-window https://www.toggl.com/app/timer https://mail.google.com/mail/u/0/#inbox https://calendar.google.com/calendar/r?tab=mc https://web.whatsapp.com https://messages.google.com/web/"
fi fi

View File

@ -1,4 +1,4 @@
{ [{
"layer": "top", // Waybar at top layer "layer": "top", // Waybar at top layer
"output": "DP-5", "output": "DP-5",
"position": "bottom", // Waybar at the bottom of your screen "position": "bottom", // Waybar at the bottom of your screen
@ -11,7 +11,7 @@
// Modules configuration // Modules configuration
"sway/workspaces": { "sway/workspaces": {
"disable-scroll": true, "disable-scroll": true,
"all-outputs": true, "all-outputs": false,
"format": "{name}" "format": "{name}"
}, },
"sway/mode": { "sway/mode": {
@ -76,4 +76,18 @@
"interval": 300, "interval": 300,
"exec": "$HOME/.config/waybar/scripts/updates-arch-combined.sh 2> /dev/null" // Script in resources folder "exec": "$HOME/.config/waybar/scripts/updates-arch-combined.sh 2> /dev/null" // Script in resources folder
} }
},
{
"layer": "top", // Waybar at top layer
"output": "DP-4",
"position": "bottom", // Waybar at the bottom of your screen
"modules-left": ["sway/workspaces"],
"modules-center": [],
"modules-right": [],
"sway/workspaces": {
"disable-scroll": true,
"all-outputs": false,
"format": "{name}"
}
} }
]