From 4e3bbbc43654f4c4d4e992d9c09bc270572f6032 Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Mon, 22 Apr 2019 11:45:44 +0200 Subject: Update conf --- i3/.config/i3/config | 10 ++-- i3/.config/i3/workspaces/0:code-pdf.json | 88 ------------------------------- i3/.config/i3/workspaces/50:code-pdf.json | 88 +++++++++++++++++++++++++++++++ i3/scripts/i3/wallpaper.sh | 10 ++++ polybar/.config/polybar/config | 43 +++++++-------- rofi/workspaces.sh | 15 +++--- 6 files changed, 133 insertions(+), 121 deletions(-) delete mode 100644 i3/.config/i3/workspaces/0:code-pdf.json create mode 100644 i3/.config/i3/workspaces/50:code-pdf.json create mode 100755 i3/scripts/i3/wallpaper.sh diff --git a/i3/.config/i3/config b/i3/.config/i3/config index e8f6d73..cbed167 100644 --- a/i3/.config/i3/config +++ b/i3/.config/i3/config @@ -35,9 +35,10 @@ set_from_resource $color8 i3wm.COLOR8 #0a0a0a set_from_resource $color7 i3wm.COLOR7 #e6e6e6 set_from_resource $color15 i3wm.COLOR15 #eeeeee -set $Mail 100:Mail -set $Web 101:Web -set $Musique 102:Musique +set $Inkscape 99:Inkscape +set $Mail 100:Mail +set $Web 101:Web +set $Musique 102:Musique set_from_resource $black i3wm.COLOR0 #444444 @@ -224,6 +225,7 @@ bindsym $mod+o mode $mode_resize bindsym $modAltkey+Escape workspace back_and_forth bindsym shift+XF86HomePage exec pcmanfm +assign [class="Inkscape"] $Inkscape assign [class="Firefox"] $Web assign [class="Chromium"] $Web assign [class="Thunderbird"] $Mail @@ -236,7 +238,7 @@ for_window [class="crimson"] floating enable #exec_always --no-startup-id /home/sebastien/scripts/i3/wallpaper_root.py # Add background, with a gradient on top -exec_always --no-startup-id hsetroot -fill ~/wallpaper/current.jpg -add "#ffffffff" -add "#ffffff00" -add "#00000000" -gradient 0 +exec_always --no-startup-id ~/scripts/i3/wallpaper.sh 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" diff --git a/i3/.config/i3/workspaces/0:code-pdf.json b/i3/.config/i3/workspaces/0:code-pdf.json deleted file mode 100644 index 19c9c96..0000000 --- a/i3/.config/i3/workspaces/0: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:code-pdf.json b/i3/.config/i3/workspaces/50:code-pdf.json new file mode 100644 index 0000000..19c9c96 --- /dev/null +++ b/i3/.config/i3/workspaces/50:code-pdf.json @@ -0,0 +1,88 @@ +// 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/scripts/i3/wallpaper.sh b/i3/scripts/i3/wallpaper.sh new file mode 100755 index 0000000..cb76cef --- /dev/null +++ b/i3/scripts/i3/wallpaper.sh @@ -0,0 +1,10 @@ +#!/bin/sh +#image=$(find ~/wallpaper/wallpaper/wallpapers -type f \( -name '*.jpg' -o -name '*.png' \) -print0 | shuf -n1 -z | xargs -0) +image=~/wallpaper/current.jpg +hsetroot \ + -fill "${image}" \ + -add "#ffffffff" \ + -addd "#ffffff00" 5 \ + -addd "#ffffff00" 5 \ + -add "#ffffffff" \ + -gradient 0 diff --git a/polybar/.config/polybar/config b/polybar/.config/polybar/config index 2d2c26b..3dc0d7d 100644 --- a/polybar/.config/polybar/config +++ b/polybar/.config/polybar/config @@ -96,7 +96,7 @@ label-empty-padding = 2 [module/i3] label-active-font = 0 type = internal/i3 -format = +format = [] index-sort = true wrapping-scroll = false @@ -132,29 +132,30 @@ label-visible-padding = ${self.label-focused-padding} strip-wsnumbers = true -ws-icon-0 = 101:Web; -ws-icon-1 = 100:Mail; - # All the characters comes from materialdesignicons. -ws-icon-2 = 102:Musique; -ws-icon-3 = 1; -ws-icon-4 = 2; -ws-icon-5 = 3; -ws-icon-6 = 4; -ws-icon-7 = 5; -ws-icon-8 = 6; -ws-icon-9 = 7; -ws-icon-10 = 8; -ws-icon-11 = 9; -ws-icon-12 = 10; -ws-icon-13 = 11; -ws-icon-14 = 12; -ws-icon-15 = 0:code-pdf;︹ -ws-icon-default = ○ +ws-icon-0 = 0;0 +ws-icon-1 = 1; +ws-icon-2 = 2; +ws-icon-3 = 3; +ws-icon-4 = 4; +ws-icon-5 = 5; +ws-icon-6 = 6; +ws-icon-7 = 7; +ws-icon-8 = 8; +ws-icon-9 = 9; +ws-icon-10 = 10; +ws-icon-11 = 11; +ws-icon-12 = 12; +ws-icon-13 = 100:Mail; +ws-icon-14 = 101:Web; +ws-icon-15 = 102:Musique; +ws-icon-16 = 50:code-pdf;︹ +ws-icon-17 = 99:Inkscape; +ws-icon-default =  ; Separator in between workspaces -label-separator = " " -label-separator-padding = 0 +#label-separator = " " +#label-separator-padding = 0 #label-separator-foreground = #ffb52a [module/date] diff --git a/rofi/workspaces.sh b/rofi/workspaces.sh index 4bff293..8495f8d 100755 --- a/rofi/workspaces.sh +++ b/rofi/workspaces.sh @@ -7,18 +7,17 @@ if [ -z $1 ]; then done exit 0 else + WINDOWS=$(xdotool search --all --onlyvisible --desktop $(xprop -notype -root _NET_CURRENT_DESKTOP | cut -c 24-) "" 2>/dev/null) + # Load the workspace i3-msg "workspace $1; append_layout ${WORKSPACES}/${1}.json; workspace back_and_forth" > /dev/null # get the list of windows on the current workspace - WINDOWS=$(xdotool search --all --onlyvisible --desktop $(xprop -notype -root _NET_CURRENT_DESKTOP | cut -c 24-) "" 2>/dev/null) for window in $WINDOWS; do - HAS_PID=$(xdotool getwindowpid $window 2>&1 | grep "pid" | wc -l) - - #if [ ! $HAS_PID -eq 0 ]; then - # echo "$window does not have a process" - #else + HAS_PID=$(xdotool getwindowpid $window 2>&1 | grep "pid" | wc -l) + + # Unmap the window to make it disapear, then map it again for i3 trigger the swallow xdotool windowunmap $window xdotool windowmap $window - #fi -done + done + i3-msg "workspace $1" > /dev/null exit 1 fi -- cgit v1.2.3