diff --git a/bash/.bashrc b/bash/.bashrc index 3116460..e3bcec7 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -158,7 +158,7 @@ eval "$(pipenv --completion)" PS1='\[\e[1;32m\u@\h \e[1;34m\w\]\n\[\e[1;33m\]$(__git_ps1 "(%s) ")\[\e[m\]⇨ ' #Disable CapsLock -setxkbmap -option ctrl:nocaps +#setxkbmap -option ctrl:nocaps #Disable some CTRL for VIM commands bind -r '\C-s' @@ -166,6 +166,7 @@ stty -ixon stty -echoctl #Paths +export _JAVA_AWT_WM_NONREPARENTING=1 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 GIT_EDITOR=nvim diff --git a/i3/.config/i3/config b/i3/.config/i3/config index c4eba9a..87c307b 100644 --- a/i3/.config/i3/config +++ b/i3/.config/i3/config @@ -121,7 +121,7 @@ set $ws3 3: set $ws4 4: set $ws5 5: set $ws6 6: -set $ws7 7: +set $ws7 7: set $ws8 8: set $ws9 9: set $ws10 10: diff --git a/i3/.config/i3/layouts/ws-news-wide.json b/i3/.config/i3/layouts/ws-news-wide.json index 0317ff7..87611b7 100644 --- a/i3/.config/i3/layouts/ws-news-wide.json +++ b/i3/.config/i3/layouts/ws-news-wide.json @@ -91,8 +91,8 @@ "percent": 0.35, "swallows": [ { - "class": "^Google Play Music Desktop Player$", - "instance": "^google play music desktop player$" + "class": "^Spotify$", + "instance": "^spotify$" } ], "type": "con" diff --git a/i3/.config/i3/scripts/dock.sh b/i3/.config/i3/scripts/dock.sh index 2b1fb46..b9f81ae 100755 --- a/i3/.config/i3/scripts/dock.sh +++ b/i3/.config/i3/scripts/dock.sh @@ -1,15 +1,19 @@ #!/bin/bash -if [[ $(iwgetid -r) = *adazio* ]]; +connected_displays=$(xrandr | grep -v disconnected | grep connected | wc -l) +#echo $connected_displays + +if [[ $connected_displays = 3 ]]; then + echo "WORK" ~/.config/i3/scripts/work-monitors.sh & ~/.config/i3/scripts/work-layout.sh & fi -if [[ $(iwgetid -r) = *moerks.dk* ]]; +if [[ $connected_displays = 2 ]]; then ~/.config/i3/scripts/home-monitors.sh & - sleep 5 ~/.config/i3/scripts/home-layout.sh & + echo "HOME" fi sleep 1 @@ -30,4 +34,4 @@ i3-msg "workspace 8:; move workspace to output $SECONDARY" i3-msg "workspace 9:; move workspace to output $SECONDARY" i3-msg "workspace 10:; move workspace to output $SECONDARY" -exit +exit 0 diff --git a/i3/.config/i3/workspaces/ws09.sh b/i3/.config/i3/workspaces/ws09.sh index e539122..efa1948 100755 --- a/i3/.config/i3/workspaces/ws09.sh +++ b/i3/.config/i3/workspaces/ws09.sh @@ -7,7 +7,7 @@ then i3-msg "workspace 9:; exec termite -t newsboat -e newsboat --hold" i3-msg "workspace 9:; exec termite -t bark -d '/home/jfm/Repositories/bark' -e 'pipenv run python Bark.py' --hold" i3-msg "workspace 9:; exec termite -t rtv -e 'rtv --enable-media --theme default' --hold" - i3-msg "workspace 9:; exec gpmdp" + i3-msg "workspace 9:; exec spotify" i3-msg "workspace 9:; move workspace to output $PRIMARY" else i3-msg "workspace 9:; append_layout ~/.config/i3/layouts/workspace9-news.json" diff --git a/mako/.config/mako/config b/mako/.config/mako/config new file mode 100644 index 0000000..55da572 --- /dev/null +++ b/mako/.config/mako/config @@ -0,0 +1,7 @@ +default-timeout=3000 +anchor=bottom-right + +format=%a\n%b\n%s +border-size=0 +background-color=#5E81ACFF +text-color=#D8DEE9FF diff --git a/neomutt/.config/neomutt/neomuttrc b/neomutt/.config/neomutt/neomuttrc new file mode 100644 index 0000000..a839508 --- /dev/null +++ b/neomutt/.config/neomutt/neomuttrc @@ -0,0 +1,17 @@ +set mail_check=30 +set timeout=15 + +set imap_user=jfm@doel.dk +set imap_pass=s89YA7vAkTXakps +set folder=imaps://mail.unoeuro.com/ +set spoolfile=+INBOX + +set realname = 'Jesper Fussing Mørk' +set from = jfm@doel.dk +set use_from = yes + +set smtp_url=smtps://$imap_user:$imap_pass@asmtp.unoeuro.com +set ssl_force_tls = yes + +alternative_order text/plain text/html +auto_view text/html diff --git a/neovim/.config/nvim/init.vim b/neovim/.config/nvim/init.vim index 3ee03f4..79a4140 100644 --- a/neovim/.config/nvim/init.vim +++ b/neovim/.config/nvim/init.vim @@ -13,6 +13,8 @@ set autoread set hidden set background=dark set rtp^=/usr/share/vim/vimfiles/ +set undodir=~/.local/share/nvim/undodir +set undofile "Plugins call plug#begin('~/.local/share/nvim/plugged') @@ -20,7 +22,9 @@ Plug 'vim-airline/vim-airline' Plug 'vim-airline/vim-airline-themes' Plug 'scrooloose/nerdtree' Plug 'scrooloose/nerdcommenter' -Plug 'Valloric/YouCompleteMe' +Plug 'Shougo/deoplete.nvim' +Plug 'zchee/deoplete-jedi' +"Plug 'Valloric/YouCompleteMe' Plug 'vim-syntastic/syntastic' Plug 'luochen1990/rainbow' Plug 'numirias/semshi' @@ -45,14 +49,17 @@ let g:Powerline_symbols='unicode' let g:airline_theme='nord' "YCM -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 -let g:ycm_add_preview_to_completeopt = 1 -map g :YcmCompleter GoToDefinitionElseDeclaration +"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 +"let g:ycm_add_preview_to_completeopt = 1 +"map g :YcmCompleter GoToDefinitionElseDeclaration -" +" Deoplete +let g:deoplete#enable_at_startup = 1 + +" Syntastic let g:syntastic_python_checkers = ['python'] "Rainbow Parentheses @@ -65,6 +72,7 @@ let g:UltiSnipsJumpBackwardTrigger="" " NerdTree map :NERDTreeToggle +map :NERDTreeFocus let g:NERDTreeWinSize=40 let NERDTreeShowBookmarks=1 let NERDTreeMinimalUI=1 diff --git a/polybar/.config/polybar/config b/polybar/.config/polybar/config index 3da2946..013cce0 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 = gpmdp spotify +modules-right = spotify [bar/laptop] monitor = ${env:LAPTOP} @@ -144,7 +144,7 @@ ws-icon-3 = 3:; ws-icon-4 = 4:; ws-icon-5 = 5:; ws-icon-6 = 6:; -ws-icon-7 = 7:; +ws-icon-7 = 7:; ws-icon-8 = 8:; ws-icon-9 = 9:; ws-icon-10 = 10:; diff --git a/rofi/.config/rofi/config b/rofi/.config/rofi/config index 7c75b83..e6ea801 100644 --- a/rofi/.config/rofi/config +++ b/rofi/.config/rofi/config @@ -1,22 +1,15 @@ -! rofi.eh: 1 -! rofi.line-margin: 15 -!rofi.location: 4 -!rofi.font: SanFranciscoDisplay-Regular 20 -! rofi.levenshtein-sort: true -! rofi.sidebar-mode: true -! rofi.auto-select: true rofi.fullscreen: false rofi.separator-style: dash rofi.hide-scrollbar: true -rofi.padding: 50 +rofi.padding: 20 rofi.bw: 0 rofi.lines: 10 -rofi.line-padding: 10 -rofi.font: Source Code Pro for Powerline 15 +rofi.line-padding: 5 +rofi.font: Source Code Pro for Powerline 12 rofi.show-icons: true ! Window 'background''border' 'separator' -rofi.color-window: #A65E81AC, #00000000, #268bd2 +rofi.color-window: #FF5E81AC, #00000000, #268bd2 ! State 'bg', 'fg', 'altbg', 'hlbg', 'hlfg' rofi.color-normal: #00000000, #D8DEE9, #00000000, #00000000, #8FBCBB diff --git a/rofi/.config/rofi/mpv-shot0001.jpg b/rofi/.config/rofi/mpv-shot0001.jpg new file mode 100644 index 0000000..aebdbc5 Binary files /dev/null and b/rofi/.config/rofi/mpv-shot0001.jpg differ diff --git a/rofi/.config/rofi/wifi b/rofi/.config/rofi/wifi new file mode 100644 index 0000000..6b342e6 --- /dev/null +++ b/rofi/.config/rofi/wifi @@ -0,0 +1,19 @@ +# Config for rofi-wifi-menu + +# position values: +# 1 2 3 +# 8 0 4 +# 7 6 5 +POSITION=0 + +#y-offset +YOFF=17 + +#x-offset +XOFF=0 + +#fields to be displayed +FIELDS=SSID,SECURITY,BARS + +#font +FONT="Source Code Pro for Powerline 15" diff --git a/rtv/.mailcap b/rtv/.mailcap index a01d8f1..2ce3e01 100644 --- a/rtv/.mailcap +++ b/rtv/.mailcap @@ -25,9 +25,9 @@ # Feh is a simple and effective image viewer # Note that rtv returns a list of urls for imgur albums, so we don't put quotes # around the `%s` -image/x-imgur-album; feh --scale-down --auto-zoom %s; test=test -n "$DISPLAY" +image/x-imgur-album; curl %s | imv -; test=test -n "$DISPLAY" image/gif; mpv '%s' --autofit-larger 1024x768 --loop=inf; test=test -n "$DISPLAY" -image/*; feh --scale-down --auto-zoom '%s'; test=test -n "$DISPLAY" +image/*; curl '%s' | imv -; test=test -n "$DISPLAY" # Youtube videos are assigned a custom mime-type, which can be streamed with # vlc or youtube-dl. @@ -68,3 +68,6 @@ video/*; mpv '%s' --autofit-larger 1024x768 --loop=inf; test=test -n "$DISPLAY" # Ascii videos # video/x-youtube; youtube-dl -q -o - '%s' | mplayer -cache 8192 -vo caca -quiet -; needsterminal # video/*; wget '%s' -O - | mplayer -cache 8192 -vo caca -quiet -; needsterminal +# +text/html; /usr/bin/google-chrome-stable '--app=file://%s' &> /dev/null & sleep 1; test=test -n "$DISPLAY"; nametemplate=%s.html; needsterminal +text/html; w3m %s; nametemplate=%s.html; copiousoutput diff --git a/sway/.config/sway/config b/sway/.config/sway/config new file mode 100644 index 0000000..5a2fc55 --- /dev/null +++ b/sway/.config/sway/config @@ -0,0 +1,185 @@ +# Input Config +input * xkb_layout "dk" +input * xkb_variant "nodeadkeys" +input * xkb_options "grp:menu_toggle,caps:none" + +# Set mod key (Mod1=, Mod4=) +set $mod Mod4 + +# Configure border style +new_window none +default_border pixel 2 +#new_window pixel 0 +#new_float normal +new_float none + +# Hide borders +hide_edge_borders none + +# change borders +bindsym $mod+u border none +bindsym $mod+y border pixel 2 + +# Font for window titles. Will also be used by the bar unless a different font +# is used in the bar {} block below. +#font xft:DejaVu Sans Mono for Powerline 14 +font xft:Source Code Pro for Powerline 14 + +# Use Mouse+$mod to drag floating windows +floating_modifier $mod + +# start a terminal +#bindsym $mod+Return exec termite +bindsym $mod+Return exec termite + +# kill focused window +bindsym $mod+Shift+q kill + +# Start rofi program launcher +bindsym $mod+d exec --no-startup-id rofi -show drun -config ~/.config/rofi/config + +# Start Rofi Wifi Menu +bindsym $mod+n exec rofi-wifi-menu + +# Start Applications +bindsym $mod+Shift+d --release exec "killall mako; exec notify-send 'restart mako'" +bindsym Print exec --no-startup-id scrot '%Y-%m-%d_$wx$h_scrot.png' -e 'mv $f ~/Pictures/screenshots/' +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: +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +# alternatively, you can use the cursor keys: +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right + +# Resize help +bindsym $mod+Ctrl+Shift+Right resize shrink width 1 px or 1 ppt +bindsym $mod+Ctrl+Shift+Up resize grow height 1 px or 1 ppt +bindsym $mod+Ctrl+Shift+Down resize shrink height 1 px or 1 ppt +bindsym $mod+Ctrl+Shift+Left resize grow width 1 px or 1 ppt + +# workspace back and forth (with/without active container) +workspace_auto_back_and_forth no +bindsym $mod+b workspace back_and_forth +bindsym $mod+Shift+b move container to workspace back_and_forth; workspace back_and_forth + +# split orientation +bindsym $mod+h split h;exec notify-send -u low -a "Sway" "Tile Horizontally" +bindsym $mod+v split v;exec notify-send -u low -a "Sway" "Tile Vertically" +bindsym $mod+q split toggle + +# toggle fullscreen mode for the focused container +bindsym $mod+f fullscreen toggle + +# change container layout (stacked, tabbed, toggle split) +bindsym $mod+s layout stacking +bindsym $mod+w layout tabbed +bindsym $mod+e layout toggle split + +# toggle tiling / floating +bindsym $mod+Shift+space floating toggle + +# Scratchpad +bindsym $mod+Shift+minus move scratchpad +bindsym $mod+minus scratchpad show + +#navigate workspaces next / previous +bindsym $mod+Ctrl+Right workspace next +bindsym $mod+Ctrl+Left workspace prev + +# Workspace names +set $ws1 1: +set $ws2 2: +set $ws3 3: +set $ws4 4: +set $ws5 5: +set $ws6 6: +set $ws7 7: +set $ws8 8: +set $ws9 9: +set $ws10 10: + +# switch to workspace +bindsym $mod+1 workspace $ws1 +bindsym $mod+2 workspace $ws2 +bindsym $mod+3 workspace $ws3 +bindsym $mod+4 workspace $ws4 +bindsym $mod+5 workspace $ws5 +bindsym $mod+6 workspace $ws6 +bindsym $mod+7 workspace $ws7 +bindsym $mod+8 workspace $ws8 +bindsym $mod+9 workspace $ws9 +bindsym $mod+0 workspace $ws10 + +# Move to workspace with focused container +bindsym $mod+Shift+1 move container to workspace $ws1; workspace $ws1 +bindsym $mod+Shift+2 move container to workspace $ws2; workspace $ws2 +bindsym $mod+Shift+3 move container to workspace $ws3; workspace $ws3 +bindsym $mod+Shift+4 move container to workspace $ws4; workspace $ws4 +bindsym $mod+Shift+5 move container to workspace $ws5; workspace $ws5 +bindsym $mod+Shift+6 move container to workspace $ws6; workspace $ws6 +bindsym $mod+Shift+7 move container to workspace $ws7; workspace $ws7 +bindsym $mod+Shift+8 move container to workspace $ws8; workspace $ws8 +bindsym $mod+Shift+9 move container to workspace $ws9; workspace $ws9 +bindsym $mod+Shift+0 move container to workspace $ws10; workspace $ws10 + +# Open specific applications in floating mode +for_window [class="^.*"] border pixel 2 +for_window [class="mpv"] floating enable sticky enable border none +for_window [class="Google-chrome" instance="tmp_neomutt.html"] floating enable, sticky enable, border pixel 2, resize set 1024px 768px + +# reload the configuration file +bindsym $mod+Shift+c reload + +# Lock screen +bindsym $mod+l exec swaylock -i ~/.config/sway/wallpapers/stars_3840x2160.jpg -s stretch --indicator-radius 100 --indicator-thickness 20 + +# Theme colors +# class border backgr. text indic #childborder +client.focused #5E81AC #556064 #80FFF9 #b58900 #5E81AC +client.focused_inactive #2E3440 #2E3440 #1ABC9C #454948 #2E3440 +client.unfocused #2E3440 #2E3440 #1ABC9C #454948 #2E3440 +client.urgent #2E3440 #FDF6E3 #1ABC9C #268BD2 #2E3440 +client.placeholder #000000 #0c0c0c #ffffff #000000 #2E3440 +client.background #2B2C2B #0c0c0c #ffffff #000000 #2E3440 + +############################# +### settings for i3-gaps: ### +############################# + +# Set inner/outer gaps +gaps inner 10 +gaps outer -4 + +# Smart gaps (gaps used if only more than one container on the workspace) +smart_gaps on +smart_borders on + +#### Exit Menu +set $exitmenu "system: [r]eboot [s]hutdown" +mode $exitmenu { + bindsym r exec shutdown -r now + bindsym s exec shutdown -P now + + bindsym Return mode "default" + bindsym Escape mode "default" +} +bindsym $mod+backspace mode $exitmenu + +#### Custom Config +exec /home/jfm/.config/sway/scripts/start_layout.sh +exec mako diff --git a/sway/.config/sway/scripts/dock.sh b/sway/.config/sway/scripts/dock.sh new file mode 100755 index 0000000..cb935a1 --- /dev/null +++ b/sway/.config/sway/scripts/dock.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +CONNECTED_CMD="swaymsg -t get_outputs | jq -c '. | length'" +monitors=`eval $CONNECTED_CMD` +echo $monitors +if [[ $monitors = 3 ]]; +then + echo "WORK" + ~/.config/sway/scripts/work-sway.sh & +fi +if [[ $monitors = 2 ]]; +then + echo "HOME" + ~/.config/sway/scripts/home-sway.sh & +fi + +exit 0 diff --git a/sway/.config/sway/scripts/home-sway.sh b/sway/.config/sway/scripts/home-sway.sh new file mode 100755 index 0000000..ad132d1 --- /dev/null +++ b/sway/.config/sway/scripts/home-sway.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +swaymsg output DP-5 enable +swaymsg output eDP-1 disable +swaymsg output DP-5 pos 0 0 res 3440 1440 +swaymsg output DP-5 background ~/.config/sway/wallpapers/space_ultrawide.jpg fill + +killall waybar +waybar -c ~/.config/waybar/home-config & + +exit 0 diff --git a/sway/.config/sway/scripts/laptop-sway.sh b/sway/.config/sway/scripts/laptop-sway.sh new file mode 100755 index 0000000..a31bd9a --- /dev/null +++ b/sway/.config/sway/scripts/laptop-sway.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +swaymsg output DP-5 disable +swaymsg output eDP-1 enable +swaymsg output eDP-1 pos 0 0 res 2560 1440 +swaymsg output eDP-1 background ~/.config/sway/wallpapers/space_2560x1440.jpg fill + +killall waybar +waybar -c ~/.config/waybar/laptop-config & + +exit 0 diff --git a/sway/.config/sway/scripts/location-helper.sh b/sway/.config/sway/scripts/location-helper.sh new file mode 100755 index 0000000..67bdcdb --- /dev/null +++ b/sway/.config/sway/scripts/location-helper.sh @@ -0,0 +1,16 @@ +#!/bin/bash +CONNECTED_CMD="swaymsg -t get_outputs | jq -c '. | length'" +monitors=`eval $CONNECTED_CMD` + +if [[ $monitors = 1 ]]; +then + export LOCATION="laptop" +elif [[ $monitors = 2 ]]; +then + export LOCATION="home" +elif [[ $monitors = 3 ]]; +then + export LOCATION="work" +fi + + diff --git a/sway/.config/sway/scripts/start_layout.sh b/sway/.config/sway/scripts/start_layout.sh new file mode 100755 index 0000000..fb2d94a --- /dev/null +++ b/sway/.config/sway/scripts/start_layout.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +CONNECTED_CMD="swaymsg -t get_outputs | jq -c '. | length'" +monitors=`eval $CONNECTED_CMD` + +if [ $monitors -gt 1 ] +then + echo "DOCKED" + ~/.config/sway/scripts/dock.sh & +else + echo "UNDOCKED" + ~/.config/sway/scripts/undock.sh & +fi + +exit 0 diff --git a/sway/.config/sway/scripts/undock.sh b/sway/.config/sway/scripts/undock.sh new file mode 100755 index 0000000..ccfae23 --- /dev/null +++ b/sway/.config/sway/scripts/undock.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +~/.config/sway/scripts/laptop-sway.sh & + +exit 0 diff --git a/sway/.config/sway/scripts/work-sway.sh b/sway/.config/sway/scripts/work-sway.sh new file mode 100755 index 0000000..c781924 --- /dev/null +++ b/sway/.config/sway/scripts/work-sway.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +swaymsg output eDP-1 enable +swaymsg output DP-4 enable +swaymsg output DB-5 enable +swaymsg output eDP-1 pos 0 0 res 2560 1440 +swaymsg output DP-5 pos 2560 0 res 1920 1080 +swaymsg output DP-4 pos 4480 0 res 1680 1050 +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-5 background ~/.config/sway/wallpapers/solar_eclipse_1920x1080.jpg fill + +killall waybar +waybar -c ~/.config/waybar/work-config & + +exit 0 diff --git a/sway/.config/sway/wallpapers/planet_rings_1680x1050.jpg b/sway/.config/sway/wallpapers/planet_rings_1680x1050.jpg new file mode 100644 index 0000000..0443360 Binary files /dev/null and b/sway/.config/sway/wallpapers/planet_rings_1680x1050.jpg differ diff --git a/sway/.config/sway/wallpapers/solar_eclipse_1920x1080.jpg b/sway/.config/sway/wallpapers/solar_eclipse_1920x1080.jpg new file mode 100644 index 0000000..f2a6c9b Binary files /dev/null and b/sway/.config/sway/wallpapers/solar_eclipse_1920x1080.jpg differ diff --git a/sway/.config/sway/wallpapers/space_2560x1440.jpg b/sway/.config/sway/wallpapers/space_2560x1440.jpg new file mode 100644 index 0000000..4b06901 Binary files /dev/null and b/sway/.config/sway/wallpapers/space_2560x1440.jpg differ diff --git a/sway/.config/sway/wallpapers/space_ultrawide.jpg b/sway/.config/sway/wallpapers/space_ultrawide.jpg new file mode 100644 index 0000000..b40b7e0 Binary files /dev/null and b/sway/.config/sway/wallpapers/space_ultrawide.jpg differ diff --git a/sway/.config/sway/wallpapers/stars_3840x2160.jpg b/sway/.config/sway/wallpapers/stars_3840x2160.jpg new file mode 100644 index 0000000..4229eee Binary files /dev/null and b/sway/.config/sway/wallpapers/stars_3840x2160.jpg differ diff --git a/sway/.config/sway/workspaces/ws00.sh b/sway/.config/sway/workspaces/ws00.sh new file mode 100755 index 0000000..e034343 --- /dev/null +++ b/sway/.config/sway/workspaces/ws00.sh @@ -0,0 +1,4 @@ +#!/bin/bash +swaymsg splith +swaymsg exec "termite -t weechat -e weechat" +swaymsg exec slack diff --git a/sway/.config/sway/workspaces/ws01.sh b/sway/.config/sway/workspaces/ws01.sh new file mode 100755 index 0000000..55375a5 --- /dev/null +++ b/sway/.config/sway/workspaces/ws01.sh @@ -0,0 +1,13 @@ +#!/bin/bash +source ~/.config/sway/scripts/location-helper.sh + +if [ $LOCATION = "home" ]; +then + 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://hangouts.google.com" + swaymsg exec "google-chrome-stable --app=https://messages.android.com" + swaymsg exec slack +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" +fi diff --git a/sway/.config/sway/workspaces/ws03.sh b/sway/.config/sway/workspaces/ws03.sh new file mode 100755 index 0000000..6b5a454 --- /dev/null +++ b/sway/.config/sway/workspaces/ws03.sh @@ -0,0 +1,8 @@ +#!/bin/bash +source ~/.config/sway/scripts/location-helper.sh + +if [ $LOCATION = "home" ]; +then + swaymsg "exec google-chrome-stable --no-default-browser-check --new-window" + swaymsg "exec /home/jfm/Tools/idea-2018.3/bin/idea.sh" +fi diff --git a/sway/.config/sway/workspaces/ws04.sh b/sway/.config/sway/workspaces/ws04.sh new file mode 100755 index 0000000..7e58eb3 --- /dev/null +++ b/sway/.config/sway/workspaces/ws04.sh @@ -0,0 +1,15 @@ +#!/bin/bash +source ~/.config/sway/scripts/location-helper.sh + +if [ $LOCATION = "home" ]; +then + swaymsg layout splith + swaymsg exec google-chrome-stable + swaymsg exec "termite -t vim -e nvim" + swaymsg exec "termite -t shell1" + swaymsg exec "termite -t shell2" +else + swaymsg exec "termite -t vim -e nvim" + swaymsg exec "termite -t shell1" + swaymsg exec "termite -t shell2" +fi diff --git a/sway/.config/sway/workspaces/ws09.sh b/sway/.config/sway/workspaces/ws09.sh new file mode 100755 index 0000000..5d1b977 --- /dev/null +++ b/sway/.config/sway/workspaces/ws09.sh @@ -0,0 +1,14 @@ +#!/bin/bash +source ~/.config/sway/scripts/location-helper.sh + +if [ $LOCATION = "home" ]; +then + swaymsg "exec termite -t newsboat -e newsboat" + swaymsg "exec termite -t bark -d '/home/jfm/Repositories/bark' -e 'pipenv run python Bark.py'" + swaymsg "exec termite -t rtv -e 'rtv --enable-media --theme default'" + swaymsg "exec spotify" +else + swaymsg "exec termite -t newsboat -e newsboat" + swaymsg "exec termite -t twitter -d '/home/jfm/Repositories/bark' -e 'pipenv run python Bark.py'" + swaymsg "exec termite -t rtv -e 'rtv --enable-media --theme default'" +fi diff --git a/waybar/.config/waybar/home-config b/waybar/.config/waybar/home-config new file mode 100644 index 0000000..27831e7 --- /dev/null +++ b/waybar/.config/waybar/home-config @@ -0,0 +1,79 @@ +{ + "layer": "top", // Waybar at top layer + "output": "DP-5", + "position": "bottom", // Waybar at the bottom of your screen + // "height": 30, // Waybar height + // "width": 1280, // Waybar width + // Choose the order of the modules + "modules-left": ["sway/workspaces", "sway/mode"], + "modules-center": ["tray"], + "modules-right": ["custom/arch", "custom/spotify", "pulseaudio", "network", "cpu", "memory", "battery", "clock"], + // Modules configuration + "sway/workspaces": { + "disable-scroll": true, + "all-outputs": true, + "format": "{name}" + }, + "sway/mode": { + "format": "{}" + }, + "tray": { + // "icon-size": 21, + "spacing": 10 + }, + "clock": { + "format": "{:%Y-%m-%d | %H:%M}", + "tooltip-format": "{:%Y-%m-%d | %H:%M}", + "format-alt": "{:%Y-%m-%d}" + }, + "cpu": { + "format": " {usage}%" + }, + "memory": { + "format": " {}%" + }, + "battery": { + "states": { + "good": 95, + "warning": 30, + "critical": 15 + }, + "format": "{icon} {capacity}%", + // "format-good": "", // An empty format will hide the module + // "format-full": "", + "format-icons": ["", "", "", "", ""] + }, + "network": { + "format-wifi": " {essid} ({signalStrength}%)", + "format-ethernet": " {ifname}: {ipaddr}", + "format-disconnected": "⚠ Disconnected" + }, + "pulseaudio": { + //"scroll-step": 1, + "format": "{icon} {volume}%", + "format-bluetooth": "{icon} {volume}% ", + "format-muted": "", + "format-icons": { + "headphones": "", + "handsfree": "", + "headset": "", + "phone": "", + "portable": "", + "car": "", + "default": ["", ""] + }, + "on-click": "pavucontrol" + }, + "custom/spotify": { + "format": " {}", + "max-length": 40, + "interval": 3, + "exec": "python $HOME/.config/waybar/scripts/spotify_status.py 2> /dev/null" // Script in resources folder + }, + "custom/arch": { + "format": " {}", + "max-length": 40, + "interval": 300, + "exec": "$HOME/.config/waybar/scripts/updates-arch-combined.sh 2> /dev/null" // Script in resources folder + } +} diff --git a/waybar/.config/waybar/laptop-config b/waybar/.config/waybar/laptop-config new file mode 100644 index 0000000..c062786 --- /dev/null +++ b/waybar/.config/waybar/laptop-config @@ -0,0 +1,79 @@ +{ + "layer": "top", // Waybar at top layer + "output": "eDP-1", + "position": "bottom", // Waybar at the bottom of your screen + // "height": 30, // Waybar height + // "width": 1280, // Waybar width + // Choose the order of the modules + "modules-left": ["sway/workspaces", "sway/mode"], + "modules-center": ["tray"], + "modules-right": ["custom/arch", "custom/spotify", "pulseaudio", "network", "cpu", "memory", "battery", "clock"], + // Modules configuration + "sway/workspaces": { + "disable-scroll": true, + "all-outputs": true, + "format": "{name}" + }, + "sway/mode": { + "format": "{}" + }, + "tray": { + // "icon-size": 21, + "spacing": 10 + }, + "clock": { + "format": "{:%Y-%m-%d | %H:%M}", + "tooltip-format": "{:%Y-%m-%d | %H:%M}", + "format-alt": "{:%Y-%m-%d}" + }, + "cpu": { + "format": " {usage}%" + }, + "memory": { + "format": " {}%" + }, + "battery": { + "states": { + "good": 95, + "warning": 30, + "critical": 15 + }, + "format": "{icon} {capacity}%", + // "format-good": "", // An empty format will hide the module + // "format-full": "", + "format-icons": ["", "", "", "", ""] + }, + "network": { + "format-wifi": " {essid} ({signalStrength}%)", + "format-ethernet": " {ifname}: {ipaddr}", + "format-disconnected": "⚠ Disconnected" + }, + "pulseaudio": { + //"scroll-step": 1, + "format": "{icon} {volume}%", + "format-bluetooth": "{icon} {volume}% ", + "format-muted": "", + "format-icons": { + "headphones": "", + "handsfree": "", + "headset": "", + "phone": "", + "portable": "", + "car": "", + "default": ["", ""] + }, + "on-click": "pavucontrol" + }, + "custom/spotify": { + "format": " {}", + "max-length": 40, + "interval": 3, + "exec": "python $HOME/.config/waybar/scripts/spotify_status.py 2> /dev/null" // Script in resources folder + }, + "custom/arch": { + "format": " {}", + "max-length": 40, + "interval": 300, + "exec": "$HOME/.config/waybar/scripts/updates-arch-combined.sh 2> /dev/null" // Script in resources folder + } +} diff --git a/waybar/.config/waybar/scripts/spotify_status.py b/waybar/.config/waybar/scripts/spotify_status.py new file mode 100644 index 0000000..3050be4 --- /dev/null +++ b/waybar/.config/waybar/scripts/spotify_status.py @@ -0,0 +1,111 @@ +#!/bin/python + +import sys +import dbus +import argparse + + +parser = argparse.ArgumentParser() +parser.add_argument("-t", "--trunclen", type=int, metavar="trunclen") +parser.add_argument( + "-f", "--format", type=str, metavar="custom format", dest="custom_format" +) +parser.add_argument( + "-p", "--playpause", type=str, metavar="play-pause indicator", dest="play_pause" +) +parser.add_argument( + "--font", + type=str, + metavar="the index of the font to use for the main label", + dest="font", +) +parser.add_argument( + "--playpause-font", + type=str, + metavar="the index of the font to use to display the playpause indicator", + dest="play_pause_font", +) + + +args = parser.parse_args() + + +def fix_string(string): + # corrects encoding for the python version used + if sys.version_info.major == 3: + return string + else: + return string.encode("utf-8") + + +def clean_string(string): + return string.replace("&", "&") + + +# Default parameters +# output = fix_string(u"{play_pause} {artist}: {song}") +output = fix_string(u" {artist}: {song}") +trunclen = 25 +play_pause = fix_string(u"\u25B6,\u23F8") # first character is play, second is paused + +label_with_font = "%{{T{font}}}{label}%{{T-}}" +font = args.font +play_pause_font = args.play_pause_font + +# parameters can be overwritten by args +if args.trunclen is not None: + trunclen = args.trunclen +if args.custom_format is not None: + output = args.custom_format +if args.play_pause is not None: + play_pause = args.play_pause + +try: + session_bus = dbus.SessionBus() + spotify_bus = session_bus.get_object( + "org.mpris.MediaPlayer2.spotify", "/org/mpris/MediaPlayer2" + ) + + spotify_properties = dbus.Interface(spotify_bus, "org.freedesktop.DBus.Properties") + + metadata = spotify_properties.Get("org.mpris.MediaPlayer2.Player", "Metadata") + status = spotify_properties.Get("org.mpris.MediaPlayer2.Player", "PlaybackStatus") + # Handle play/pause label + + play_pause = play_pause.split(",") + + if status == "Playing": + play_pause = play_pause[0] + elif status == "Paused": + play_pause = play_pause[1] + else: + play_pause = str() + + if play_pause_font: + play_pause = label_with_font.format(font=play_pause_font, label=play_pause) + + # Handle main label + + artist = fix_string(metadata["xesam:artist"][0]) if metadata["xesam:artist"] else "" + song = fix_string(metadata["xesam:title"]) if metadata["xesam:title"] else "" + + if not artist and not song: + print("") + else: + if len(song) > trunclen: + song = song[0:trunclen] + song += "..." + if ("(" in song) and (")" not in song): + song += ")" + + if font: + artist = label_with_font.format(font=font, label=artist) + song = label_with_font.format(font=font, label=song) + + print(output.format(artist=artist, song=song, play_pause=play_pause)) + +except Exception as e: + if isinstance(e, dbus.exceptions.DBusException): + print("") + else: + print(e) diff --git a/waybar/.config/waybar/scripts/updates-arch-combined.sh b/waybar/.config/waybar/scripts/updates-arch-combined.sh new file mode 100755 index 0000000..f07bf08 --- /dev/null +++ b/waybar/.config/waybar/scripts/updates-arch-combined.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +if ! updates_arch=$(checkupdates 2> /dev/null | wc -l ); then + updates_arch=0 +fi + +if ! updates_aur=$(yay -Qum | wc -l); then + updates_aur=0 +fi + +updates=$(("$updates_arch" + "$updates_aur")) + +if [ "$updates" -gt 0 ]; then + echo "$updates" +else + echo "" +fi diff --git a/waybar/.config/waybar/style.css b/waybar/.config/waybar/style.css new file mode 100644 index 0000000..6fe6614 --- /dev/null +++ b/waybar/.config/waybar/style.css @@ -0,0 +1,118 @@ +@define-color nord00 #2E3440; +@define-color nord01 #3B4252; +@define-color nord02 #434C5E; +@define-color nord03 #4C566A; +@define-color nord04 #D8DEE9; +@define-color nord05 #E5E9F0; +@define-color nord06 #ECEFF4; +@define-color nord07 #8FBCBB; +@define-color nord08 #88C0D0; +@define-color nord09 #81A1C1; +@define-color nord10 #5E81AC; +@define-color nord11 #BF616A; +@define-color nord12 #D08770; +@define-color nord13 #EBCB8B; +@define-color nord14 #A3BE8C; +@define-color nord15 #B48EAD; + +* { + border: none; + border-radius: 0; + font-family: 'Source Code Pro', Roboto, Helvetica, Arial, sans-serif; + font-size: 13px; + min-height: 0; +} + +window#waybar { + background: @nord00; + border-bottom: 3px solid @nord03; + color: white; +} + +#workspaces button { + padding: 0 5px; + background: transparent; + color: @nord04; + border-bottom: 3px solid transparent; +} + +#workspaces button.focused { + background: @nord03; + border-bottom: 3px solid @nord14; +} + +#clock, #battery { + padding: 0 10px; + margin: 0 5px; +} + +#cpu, #memory, #pulseaudio { + padding: 0 5px; + margin: 0 5px; +} + +#clock { + border-bottom: 3px solid @nord14; + color: @nord04; +} + +#cpu { + border-bottom: 3px solid @nord14; + color: @nord04; +} + +#memory { + border-bottom: 3px solid @nord14; + color: @nord04; +} + +#network { + border-bottom: 3px solid @nord14; + color: @nord04; +} + +#pulseaudio { + border-bottom: 3px solid @nord14; + color: @nord04; +} + +#battery { + border-bottom: 3px solid @nord14; + color: @nord04; +} + +#battery.charging { + color: @nord04; + border-bottom: 3px solid @nord07; +} +#battery.discharging { + color: @nord04; + border-bottom: 3px solid @nord11; +} + +@keyframes blink { + to { + background-color: #ffffff; + color: black; + } +} + +#battery.warning:not(.charging) { + background: #f53c3c; + color: white; + animation-name: blink; + animation-duration: 0.5s; + animation-timing-function: linear; + animation-iteration-count: infinite; + animation-direction: alternate; +} + +#custom-spotify { + border-bottom: 3px solid @nord14; + color: @nord04; +} + +#custom-arch { + border-bottom: 3px solid @nord11; + color: @nord04; +} diff --git a/waybar/.config/waybar/work-config b/waybar/.config/waybar/work-config new file mode 100644 index 0000000..0bd1082 --- /dev/null +++ b/waybar/.config/waybar/work-config @@ -0,0 +1,102 @@ +[{ + "layer": "top", // Waybar at top layer + "output": "DP-5", + "position": "bottom", // Waybar at the bottom of your screen + "modules-left": ["sway/workspaces", "sway/mode"], + "modules-center": ["tray"], + "modules-right": ["custom/arch", "pulseaudio", "network", "cpu", "memory", "battery", "clock"], + "sway/workspaces": { + "disable-scroll": true, + "all-outputs": false, + "format": "{name}" + }, + "sway/mode": { + "format": "{}" + }, + "tray": { + // "icon-size": 21, + "spacing": 10 + }, + "clock": { + "format": "{:%Y-%m-%d | %H:%M}", + "tooltip-format": "{:%Y-%m-%d | %H:%M}", + "format-alt": "{:%Y-%m-%d}" + }, + "cpu": { + "format": " {usage}%" + }, + "memory": { + "format": " {}%" + }, + "battery": { + "states": { + "good": 95, + "warning": 30, + "critical": 15 + }, + "format": "{icon} {capacity}%", + // "format-good": "", // An empty format will hide the module + // "format-full": "", + "format-icons": ["", "", "", "", ""] + }, + "network": { + "format-wifi": " {essid} ({signalStrength}%)", + "format-ethernet": " {ifname}: {ipaddr}", + "format-disconnected": "⚠ Disconnected" + }, + "pulseaudio": { + //"scroll-step": 1, + "format": "{icon} {volume}%", + "format-bluetooth": "{icon} {volume}% ", + "format-muted": "", + "format-icons": { + "headphones": "", + "handsfree": "", + "headset": "", + "phone": "", + "portable": "", + "car": "", + "default": ["", ""] + }, + "on-click": "pavucontrol" + }, + "custom/arch": { + "format": " {}", + "max-length": 40, + "interval": 300, + "exec": "$HOME/.config/waybar/scripts/updates-arch-combined.sh 2> /dev/null" + } +}, +{ + "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": ["custom/spotify"], + "sway/workspaces": { + "disable-scroll": true, + "all-outputs": false, + "format": "{name}" + }, + "custom/spotify": { + "format": " {}", + "max-length": 40, + "interval": 3, + "exec": "python $HOME/.config/waybar/scripts/spotify_status.py 2> /dev/null" + } +}, +{ + "layer": "top", // Waybar at top layer + "output": "eDP-1", + "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}" + } +} +]