From 501b0dbbb78dc9301c8be1e2f86942b8063dd645 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesper=20Fussing=20M=C3=B8rk?= Date: Fri, 15 Feb 2019 14:23:02 +0100 Subject: [PATCH] Switched to using spotify and other minor fixes --- bash/.bashrc | 4 +- dunst/.config/dunst/dunstrc | 2 +- i3/.config/i3/config | 23 ++-- i3/.config/i3/layouts/workspace4-work.json | 4 +- i3/.config/i3/layouts/ws-work-wide.json | 2 +- i3/.config/i3/workspaces/ws04.sh | 4 +- neovim/.config/nvim/init.vim | 33 +++++- polybar/.config/polybar/config | 14 +-- .../.config/polybar/scripts/spotify_status.py | 106 ++++++++++++++++++ 9 files changed, 164 insertions(+), 28 deletions(-) create mode 100644 polybar/.config/polybar/scripts/spotify_status.py diff --git a/bash/.bashrc b/bash/.bashrc index e4b019f..3116460 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -181,8 +181,10 @@ alias tdc="cd /home/jfm/Customers/TDC" alias prod="ssh -fN sochi" alias top="htop" alias ssh="TERM=xterm-256color ssh" -alias vim="nvr -s --remote" +alias rvim="nvr -s --remote" +alias vim="nvim" alias vi="nvim" +alias k9s="/home/jfm/Tools/k9s/k9s" alias buildtool="/home/jfm/.buildtool/bin/buildtool" alias vpnup="nmcli con up id \"YouSee VPN\"" alias vpndown="nmcli con down id \"YouSee VPN\"" diff --git a/dunst/.config/dunst/dunstrc b/dunst/.config/dunst/dunstrc index ca7464b..71b7e0c 100644 --- a/dunst/.config/dunst/dunstrc +++ b/dunst/.config/dunst/dunstrc @@ -125,7 +125,7 @@ # %n progress value if set without any extra characters # %% Literal % # Markup is allowed - format = "%a\n%b" + format = "%a\n%b\n%s" # Alignment of message text. # Possible values are "left", "center" and "right". diff --git a/i3/.config/i3/config b/i3/.config/i3/config index 7a73b0c..c4eba9a 100644 --- a/i3/.config/i3/config +++ b/i3/.config/i3/config @@ -51,6 +51,11 @@ bindsym Print exec --no-startup-id scrot '%Y-%m-%d_$wx$h_scrot.png' -e 'mv $f ~/ bindsym $mod+Print --release exec --no-startup-id scrot -u '%Y-%m-%d_$wx$h_scrot.png' -e 'mv $f ~/Pictures/screenshots/' bindsym $mod+Shift+Print --release exec --no-startup-id scrot -s '%Y-%m-%d_$wx$h_scrot.png' -e 'mv $f ~/Pictures/screenshots/' +# Music Control +bindsym $mod+Ctrl+Mod1+9 exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause" +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" + # focus_follows_mouse no # alternatively, you can use the cursor keys: @@ -158,11 +163,12 @@ bindsym $mod+Ctrl+9 exec --no-startup-id ~/.config/i3/workspaces/ws09.sh bindsym $mod+Ctrl+0 exec --no-startup-id ~/.config/i3/workspaces/ws00.sh # Open specific applications in floating mode -for_window [class="^.*"] border pixel 0 +for_window [class="^.*"] border pixel 2 for_window [class="Nitrogen"] floating enable sticky enable border none for_window [class="feh"] floating enable sticky enable border none for_window [class="mpv"] floating enable sticky enable border none for_window [class="Arandr"] floating enable sticky enable border none +for_window [class="Sms.py"] floating enable sticky enable border none #for_window [class="^jetbrains-.+"][window_type=dialog] focus #for_window [instance="sun-awt-X11-XWindowPeer"] border pixel 0 @@ -176,10 +182,11 @@ bindsym $mod+Shift+r restart bindsym $mod+l exec --no-startup-id light-locker-command -l # Autostart applications -exec --no-startup-id compton --config /home/jfm/.config/compton/compton.conf +#exec --no-startup-id compton --config /home/jfm/.config/compton/compton.conf exec --no-startup-id nm-applet exec --no-startup-id pasystray exec --no-startup-id light-locker +exec --no-startup-id indicator-kdeconnect # Color palette used for the terminal ( ~/.Xresources file ) # Colors are gathered based on the documentation: @@ -214,13 +221,13 @@ set_from_resource $term_color15 color15 # Theme colors # class border backgr. text indic. child_border -client.focused #556064 #556064 #80FFF9 #b58900 #b58900 -client.focused_inactive #2F3D44 #2F3D44 #1ABC9C #454948 -client.unfocused #2F3D44 #2F3D44 #1ABC9C #454948 -client.urgent #CB4B16 #FDF6E3 #1ABC9C #268BD2 -client.placeholder #000000 #0c0c0c #ffffff #000000 +client.focused #5E81AC #556064 #80FFF9 #b58900 #5E81AC +client.focused_inactive #2E3440 #2E3440 #1ABC9C #454948 +client.unfocused #2E3440 #2E3440 #1ABC9C #454948 +client.urgent #2E3440 #FDF6E3 #1ABC9C #268BD2 +client.placeholder #000000 #0c0c0c #ffffff #000000 -client.background #2B2C2B +client.background #2B2C2B ############################# ### settings for i3-gaps: ### diff --git a/i3/.config/i3/layouts/workspace4-work.json b/i3/.config/i3/layouts/workspace4-work.json index 9f44512..5d4ec5e 100644 --- a/i3/.config/i3/layouts/workspace4-work.json +++ b/i3/.config/i3/layouts/workspace4-work.json @@ -37,7 +37,7 @@ "y": 0 }, "name": "shell1", - "percent": 0.7, + "percent": 0.5, "swallows": [ { "class": "^Termite$", @@ -57,7 +57,7 @@ "y": 0 }, "name": "shell2", - "percent": 0.3, + "percent": 0.5, "swallows": [ { "class": "^Termite$", diff --git a/i3/.config/i3/layouts/ws-work-wide.json b/i3/.config/i3/layouts/ws-work-wide.json index 6427fd2..8eb0fe5 100644 --- a/i3/.config/i3/layouts/ws-work-wide.json +++ b/i3/.config/i3/layouts/ws-work-wide.json @@ -90,7 +90,7 @@ "swallows": [ { "class": "^Termite$", - "title": "^ranger$" + "title": "^shell2$" } ], "type": "con" diff --git a/i3/.config/i3/workspaces/ws04.sh b/i3/.config/i3/workspaces/ws04.sh index 19d934f..8749369 100755 --- a/i3/.config/i3/workspaces/ws04.sh +++ b/i3/.config/i3/workspaces/ws04.sh @@ -7,14 +7,14 @@ then i3-msg "workspace 4:; exec google-chrome-stable --proxy-pac-url=file:///home/jfm/Customers/TDC/Scripts/tdcproxy.js --no-default-browser-check --new-window" i3-msg "workspace 4:; exec termite -t vim -e 'nvr -s --remote' --hold" i3-msg "workspace 4:; exec termite -t shell" - i3-msg "workspace 4:; exec termite -t ranger -e ~/.config/ranger/ranger.sh --hold" + i3-msg "workspace 4:; exec termite -t shell2" # i3-msg "workspace 4:; exec google-chrome-stable --app=http://netflix.com" i3-msg "workspace 4:; exec termite -t weechat -e weechat" i3-msg "workspace 4:; move workspace to output $PRIMARY" else i3-msg "workspace 4:; append_layout ~/.config/i3/layouts/workspace4-work.json" i3-msg "workspace 4:; exec termite -t shell1" - i3-msg "workspace 4:; exec termite -t shell2 -e ~/.config/ranger/ranger.sh --hold" + i3-msg "workspace 4:; exec termite -t shell2" i3-msg "workspace 4:; exec termite -t vim -e 'nvr -s --remote' --hold" i3-msg "workspace 4:; move workspace to output $PRIMARY" fi diff --git a/neovim/.config/nvim/init.vim b/neovim/.config/nvim/init.vim index 7b8791e..3ee03f4 100644 --- a/neovim/.config/nvim/init.vim +++ b/neovim/.config/nvim/init.vim @@ -18,6 +18,8 @@ set rtp^=/usr/share/vim/vimfiles/ call plug#begin('~/.local/share/nvim/plugged') Plug 'vim-airline/vim-airline' Plug 'vim-airline/vim-airline-themes' +Plug 'scrooloose/nerdtree' +Plug 'scrooloose/nerdcommenter' Plug 'Valloric/YouCompleteMe' Plug 'vim-syntastic/syntastic' Plug 'luochen1990/rainbow' @@ -28,6 +30,10 @@ Plug 'SirVer/ultisnips' Plug 'honza/vim-snippets' Plug 'jonsmithers/vim-html-template-literals' Plug 'pangloss/vim-javascript' +Plug 'alvan/vim-closetag' +Plug 'shime/vim-livedown' +Plug 'w0rp/ale' +Plug 'ambv/black' call plug#end() colorscheme nord @@ -39,7 +45,7 @@ let g:Powerline_symbols='unicode' let g:airline_theme='nord' "YCM -let mapleader = "," +let mapleader = "½" let g:ycm_server_python_interpreter = 'python3' let g:ycm_autoclose_preview_window_after_completion=1 let g:ycm_min_num_of_chars_for_completion=3 @@ -53,13 +59,27 @@ let g:syntastic_python_checkers = ['python'] let g:rainbow_active = 1 " Ultisnips -let g:UltiSnipsExpandTrigger="" +let g:UltiSnipsExpandTrigger="" let g:UltiSnipsJumpForwardTrigger="" let g:UltiSnipsJumpBackwardTrigger="" +" NerdTree +map :NERDTreeToggle +let g:NERDTreeWinSize=40 +let NERDTreeShowBookmarks=1 +let NERDTreeMinimalUI=1 + " HTML +let g:closetag_filenames = '*.html,*.js' let g:html_indent_style1 = "inc" +" LiveDown +let g:livedown_browser = '"google-chrome-stable --new-window --app=http://localhost:1337"' +nmap gm :LivedownToggle + +" Black +autocmd BufWritePre *.py execute ':Black' + "Mappings :nmap :w :imap :wa @@ -70,10 +90,11 @@ nnoremap nnoremap :bp nnoremap :bn nnoremap :%!jq '.' -noremap -noremap -noremap -noremap +"noremap +"noremap +"noremap +"noremap + "AutoCommands au BufWinEnter * set number au FileType xml setlocal equalprg=xmllint\ --format\ --recover\ -\ 2>/dev/null diff --git a/polybar/.config/polybar/config b/polybar/.config/polybar/config index 79f3089..3da2946 100644 --- a/polybar/.config/polybar/config +++ b/polybar/.config/polybar/config @@ -103,7 +103,7 @@ font-1 = FontAwesome:pixelsize=12;1 modules-left = i3 modules-center = -modules-right = mpd gpmdp +modules-right = gpmdp spotify [bar/laptop] monitor = ${env:LAPTOP} @@ -309,18 +309,18 @@ type = custom/script exec = ~/.config/polybar/scripts/gpmdp.sh interval = 5 -[module/mpd] -type = internal/mpd -host = 127.0.0.1 -port = 6600 -interval = 2 - icon-play = ⏵ icon-pause = ⏸ icon-stop = ⏹ icon-prev = ⏮ icon-next = ⏭ +[module/spotify] +type = custom/script +interval = 1 +format =