From aa18d3f888d6fb4d598c22fcf825a78e5540c1e7 Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Sun, 1 Sep 2019 22:12:27 +0200 Subject: Update i3 config --- i3/.config/i3/config | 8 ++- i3/.config/i3/workspaces/50:code-filer.json | 84 --------------------------- i3/.config/i3/workspaces/50:code-pdf.json | 88 ----------------------------- i3/.config/i3/workspaces/50:pdf_edit.json | 84 +++++++++++++++++++++++++++ i3/.config/i3/workspaces/51:code.json | 84 +++++++++++++++++++++++++++ i3/scripts/i3/launch.sh | 11 ---- i3/scripts/i3/wallpaper.sh | 23 ++++++-- polybar/.config/polybar/config | 6 +- rofi/workspaces.sh | 5 +- 9 files changed, 198 insertions(+), 195 deletions(-) delete mode 100644 i3/.config/i3/workspaces/50:code-filer.json delete mode 100644 i3/.config/i3/workspaces/50:code-pdf.json create mode 100644 i3/.config/i3/workspaces/50:pdf_edit.json create mode 100644 i3/.config/i3/workspaces/51:code.json delete mode 100755 i3/scripts/i3/launch.sh diff --git a/i3/.config/i3/config b/i3/.config/i3/config index 9611aa0..8b6f4fe 100644 --- a/i3/.config/i3/config +++ b/i3/.config/i3/config @@ -181,9 +181,9 @@ bindsym $modAltkey+F10 workspace $workspace_10 bindsym $modAltkey+F11 workspace $workspace_11 bindsym $modAltkey+F12 workspace $workspace_12 -bindsym XF86Mail exec --no-startup-id "~/scripts/i3/launch.sh $Mail thunderbird" -bindsym XF86Calculator exec --no-startup-id "~/scripts/i3/launch.sh $Musique gmpc" -bindsym XF86HomePage exec --no-startup-id "~/scripts/i3/launch.sh $Web firefox" +bindsym XF86Mail workspace $Mail +bindsym XF86Calculator workspace $Musique +bindsym XF86HomePage workspace $Web # move focused container to workspace bindsym $modAltkey+Shift+F1 move container to workspace $workspace_1 @@ -257,5 +257,7 @@ exec_always --no-startup-id ~/scripts/i3/wallpaper.sh ~/wallpaper/current.jpg exec_always --no-startup-id xrdb .Xdefaults exec_always --no-startup-id compton -i .8 --focus-exclude '_NET_WM_NAME@:s = "rofi"' --blur-background --blur-kern '3,3,0.1,1,1,1,1,1,1,1' exec --no-startup-id "xrdb .Xdefaults; polybar i3" +exec --no-startup-id "/home/sebastien/Projets/ocaml/i3_workspaces/i3_workspaces" +exec --no-startup-id "unclutter" # for_window [class="URxvt"] layout tabbed diff --git a/i3/.config/i3/workspaces/50:code-filer.json b/i3/.config/i3/workspaces/50:code-filer.json deleted file mode 100644 index fcbc5f3..0000000 --- a/i3/.config/i3/workspaces/50:code-filer.json +++ /dev/null @@ -1,84 +0,0 @@ -// vim:ts=4:sw=4:et -{ - // splitv split container with 2 children - "border": "pixel", - "floating": "auto_off", - "layout": "splitv", - "percent": 0.55, - "type": "con", - "nodes": [ - { - // splith split container with 1 children - "border": "pixel", - "floating": "auto_off", - "layout": "splith", - "percent": 0.8, - "type": "con", - "nodes": [ - { - "border": "pixel", - "current_border_width": 2, - "floating": "auto_off", - "geometry": { - "height": 945, - "width": 745, - "x": 10, - "y": 10 - }, - "percent": 1, - "swallows": [ - { - "class": "^(Pcmanfm)$" - //"instance": "^(mupdf)|(zathura)$" - } - ], - "type": "con" - } - ] - }, - { - "border": "pixel", - "current_border_width": 2, - "floating": "auto_off", - "geometry": { - "height": 408, - "width": 720, - "x": 0, - "y": 0 - }, - "percent": 0.202941176470588, - "swallows": [ - { - "class": "^URxvt$", - "instance": "^urxvt$", - // Prevent vim to be here - "title": "^((?!vim).)*$" - } - ], - "type": "con" - } - ] -} - -{ - "border": "pixel", - "current_border_width": 2, - "floating": "auto_off", - "geometry": { - "height": 408, - "width": 720, - "x": 0, - "y": 0 - }, - "name": "vim", - "percent": 0.5, - "swallows": [ - { - "class": "^URxvt$", - "instance": "^urxvt$", - "title": "^vim$" - } - ], - "type": "con" -} - diff --git a/i3/.config/i3/workspaces/50:code-pdf.json b/i3/.config/i3/workspaces/50:code-pdf.json deleted file mode 100644 index 19c9c96..0000000 --- a/i3/.config/i3/workspaces/50:code-pdf.json +++ /dev/null @@ -1,88 +0,0 @@ -// vim:ts=4:sw=4:et -{ - // splitv split container with 2 children - "border": "pixel", - "floating": "auto_off", - "layout": "splitv", - "percent": 0.55, - "type": "con", - "nodes": [ - { - // splith split container with 1 children - "border": "pixel", - "floating": "auto_off", - "layout": "splith", - "percent": 0.8, - "type": "con", - "nodes": [ - { - "border": "pixel", - "current_border_width": 2, - "floating": "auto_off", - "geometry": { - "height": 945, - "width": 745, - "x": 10, - "y": 10 - }, - //"name": "notes_arduino.pdf - 1/27 (90 dpi)", - "percent": 1, - "swallows": [ - { - "class": "^MuPDF$", - "instance": "^mupdf$" - // "title": "^notes_arduino\\.pdf\\ \\-\\ 1\\/27\\ \\(90\\ dpi\\)$" - } - ], - "type": "con" - } - ] - }, - { - "border": "pixel", - "current_border_width": 2, - "floating": "auto_off", - "geometry": { - "height": 408, - "width": 720, - "x": 0, - "y": 0 - }, - // "name": "sebastien@trunk: ~/sync/arduino", - "percent": 0.202941176470588, - "swallows": [ - { - "class": "^URxvt$", - "instance": "^urxvt$", - // Prevent vim to be here - "title": "^((?!vim).)*$" - // "title": "^sebastien\\@trunk\\:\\ \\~\\/sync\\/arduino$" - } - ], - "type": "con" - } - ] -} - -{ - "border": "pixel", - "current_border_width": 2, - "floating": "auto_off", - "geometry": { - "height": 408, - "width": 720, - "x": 0, - "y": 0 - }, - "name": "vim", - "percent": 0.5, - "swallows": [ - { - "class": "^URxvt$", - "instance": "^urxvt$", - "title": "^vim$" - } - ], - "type": "con" -} - diff --git a/i3/.config/i3/workspaces/50:pdf_edit.json b/i3/.config/i3/workspaces/50:pdf_edit.json new file mode 100644 index 0000000..11d654f --- /dev/null +++ b/i3/.config/i3/workspaces/50:pdf_edit.json @@ -0,0 +1,84 @@ +// vim:ts=4:sw=4:et +{ + // splitv split container with 2 children + "border": "pixel", + "floating": "auto_off", + "layout": "splitv", + "percent": 0.55, + "type": "con", + "nodes": [ + { + // splith split container with 1 children + "border": "pixel", + "floating": "auto_off", + "layout": "splith", + "percent": 0.8, + "type": "con", + "nodes": [ + { + "border": "pixel", + "current_border_width": 2, + "floating": "auto_off", + "geometry": { + "height": 945, + "width": 745, + "x": 10, + "y": 10 + }, + "percent": 1, + "swallows": [ + { + "class": "^(MuPDF)|(Zathura)$", + "instance": "^(mupdf)|(zathura)$" + } + ], + "type": "con" + } + ] + }, + { + "border": "pixel", + "current_border_width": 2, + "floating": "auto_off", + "geometry": { + "height": 408, + "width": 720, + "x": 0, + "y": 0 + }, + "percent": 0.202941176470588, + "swallows": [ + { + "class": "^URxvt$", + "instance": "^urxvt$", + // Prevent vim to be here + "title": "^((?!vim).)*$" + } + ], + "type": "con" + } + ] +} + +{ + "border": "pixel", + "current_border_width": 2, + "floating": "auto_off", + "geometry": { + "height": 408, + "width": 720, + "x": 0, + "y": 0 + }, + "name": "vim", + "percent": 0.5, + "swallows": [ + { + "class": "^URxvt$", + "instance": "^urxvt$", + "title": "^vim$" + } + ], + "type": "con" +} + diff --git a/i3/.config/i3/workspaces/51:code.json b/i3/.config/i3/workspaces/51:code.json new file mode 100644 index 0000000..9e42cd5 --- /dev/null +++ b/i3/.config/i3/workspaces/51:code.json @@ -0,0 +1,84 @@ +// vim:ts=4:sw=4:et +{ + // splitv split container with 2 children + "border": "pixel", + "floating": "auto_off", + "layout": "splitv", + "percent": 0.55, + "type": "con", + "nodes": [ + { + // splith split container with 1 children + "border": "pixel", + "floating": "auto_off", + "layout": "splith", + "percent": 0.8, + "type": "con", + "nodes": [ + { + "border": "pixel", + "current_border_width": 2, + "floating": "auto_off", + "geometry": { + "height": 945, + "width": 745, + "x": 10, + "y": 10 + }, + "percent": 1, + "swallows": [ + { + "class": "^(Pcmanfm)$" + //"instance": "^(mupdf)|(zathura)$" + } + ], + "type": "con" + } + ] + }, + { + "border": "pixel", + "current_border_width": 2, + "floating": "auto_off", + "geometry": { + "height": 408, + "width": 720, + "x": 0, + "y": 0 + }, + "percent": 0.202941176470588, + "swallows": [ + { + "class": "^URxvt$", + "instance": "^urxvt$", + // Prevent vim to be here + "title": "^((?!vim).)*$" + } + ], + "type": "con" + } + ] +} + +{ + "border": "pixel", + "current_border_width": 2, + "floating": "auto_off", + "geometry": { + "height": 408, + "width": 720, + "x": 0, + "y": 0 + }, + "name": "vim", + "percent": 0.5, + "swallows": [ + { + "class": "^URxvt$", + "instance": "^urxvt$", + "title": "^(vim)|(nvim)$" + } + ], + "type": "con" +} + diff --git a/i3/scripts/i3/launch.sh b/i3/scripts/i3/launch.sh deleted file mode 100755 index ddfbee6..0000000 --- a/i3/scripts/i3/launch.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -workspace=$1 -shift -pgrep -U $(whoami) -af "$*" | grep -qv $(basename "$0") -ret=$? -if [ $ret = 1 ]; then - i3-msg "exec $*; workspace ${workspace}" -else - i3-msg "workspace ${workspace}" -fi -killall -USR1 i3status diff --git a/i3/scripts/i3/wallpaper.sh b/i3/scripts/i3/wallpaper.sh index 5bc0d2b..20ef0c9 100755 --- a/i3/scripts/i3/wallpaper.sh +++ b/i3/scripts/i3/wallpaper.sh @@ -1,11 +1,26 @@ #!/bin/sh #image=$(find ~/wallpaper/wallpaper/wallpapers -type f \( -name '*.jpg' -o -name '*.png' \) -print0 | shuf -n1 -z | xargs -0) image=$1 + +#height=$(identify -format '%[fx:h/1.11]' ${image}) +#convert -crop %100x10+0+${height} ${image} out.jpg +#color=$(.virtualenvs/pywal/bin/colorz -n 1 --no-preview out.jpg | cut -d' ' -f1) +#rm out.jpg +#echo $color +#neg=$(python ~/scripts/i3/negate_color.py "${color}") + #.virtualenvs/pywal/bin/wal -n -i "${image}" --saturate .8 -a 90 +#hsetroot \ +# -fill "${image}" \ +# -add "#ffffffff" \ +# -addd "#77777700" 5 \ +# -addd "#ffffff00" 10 \ +# -addd "#ffffff00" 90 \ +# -gradient 0 hsetroot \ -fill "${image}" \ - -add "#ffffffff" \ - -addd "#ffffff00" 5 \ - -addd "#ffffff00" 5 \ - -add "#000000ff" \ + -add "#ffffff77" \ + -addd "#ffffff77" 2 \ + -addd "#ffffff00" 0 \ + -addd "#ffffff00" 90 \ -gradient 0 diff --git a/polybar/.config/polybar/config b/polybar/.config/polybar/config index 1546fe4..d8f1572 100644 --- a/polybar/.config/polybar/config +++ b/polybar/.config/polybar/config @@ -150,10 +150,10 @@ ws-icon-12 = 12:; ws-icon-13 = 100:; ws-icon-14 = 101:; ws-icon-15 = 102:; -ws-icon-16 = 50:code-pdf;︹ -ws-icon-17 = 50:code-filer;︹ +ws-icon-16 = 50:;︹ +ws-icon-17 = 51:; ws-icon-18 = 99:; -;ws-icon-default =  +ws-icon-default =  ; Separator in between workspaces #label-separator = " " diff --git a/rofi/workspaces.sh b/rofi/workspaces.sh index 8495f8d..2dc3a6a 100755 --- a/rofi/workspaces.sh +++ b/rofi/workspaces.sh @@ -8,8 +8,9 @@ if [ -z $1 ]; then exit 0 else WINDOWS=$(xdotool search --all --onlyvisible --desktop $(xprop -notype -root _NET_CURRENT_DESKTOP | cut -c 24-) "" 2>/dev/null) + code=$(echo $1 | cut -d: -f1) # Load the workspace - i3-msg "workspace $1; append_layout ${WORKSPACES}/${1}.json; workspace back_and_forth" > /dev/null + i3-msg "workspace ${code}:; append_layout ${WORKSPACES}/${1}.json; workspace back_and_forth" > /dev/null # get the list of windows on the current workspace for window in $WINDOWS; do HAS_PID=$(xdotool getwindowpid $window 2>&1 | grep "pid" | wc -l) @@ -18,6 +19,6 @@ else xdotool windowunmap $window xdotool windowmap $window done - i3-msg "workspace $1" > /dev/null + i3-msg "workspace ${code}:" > /dev/null exit 1 fi -- cgit v1.2.3