diff options
Diffstat (limited to 'i3')
-rw-r--r-- | i3/.config/i3/config | 8 | ||||
-rw-r--r-- | i3/.config/i3/workspaces/50:pdf_edit.json | 37 | ||||
-rw-r--r-- | i3/.config/i3/workspaces/51:code.json | 12 | ||||
-rw-r--r-- | i3/scripts/i3/negate_color.py | 25 | ||||
-rwxr-xr-x | i3/scripts/i3/wallpaper.sh | 7 |
5 files changed, 52 insertions, 37 deletions
diff --git a/i3/.config/i3/config b/i3/.config/i3/config index de2bd89..97d82f2 100644 --- a/i3/.config/i3/config +++ b/i3/.config/i3/config @@ -72,8 +72,9 @@ default_border pixel 2 # i3 gaps #smart_gaps on #smart_borders on -gaps inner 15 -gaps outer 0 + +#gaps inner 15 +#gaps outer 0 #hide_edge_borders smart @@ -105,6 +106,7 @@ bindsym $mod+Return exec urxvtcd bindsym $mod+q kill # start dmenu (a program launcher) +#bindsym $mod+i exec rofi -show drun -show-icons bindsym $mod+i exec rofi -show run -show-icons # bindsym $mod+i exec synapse @@ -246,7 +248,7 @@ for_window [class="crimson"] floating enable # Add background, with a gradient on top exec --no-startup-id ~/scripts/i3/wallpaper.sh ~/wallpaper/current.jpg exec --no-startup-id xrdb .Xdefaults -exec --no-startup-id compton +#exec --no-startup-id compton exec --no-startup-id "xrdb .Xdefaults; polybar i3" #exec --no-startup-id "unclutter" exec_always --no-startup-id /home/sebastien/Projets/ocaml/i3_workspaces/i3_workspaces diff --git a/i3/.config/i3/workspaces/50:pdf_edit.json b/i3/.config/i3/workspaces/50:pdf_edit.json index 11d654f..0ec87b2 100644 --- a/i3/.config/i3/workspaces/50:pdf_edit.json +++ b/i3/.config/i3/workspaces/50:pdf_edit.json @@ -4,7 +4,7 @@ "border": "pixel", "floating": "auto_off", "layout": "splitv", - "percent": 0.55, + "percent": 0.5, "type": "con", "nodes": [ { @@ -19,17 +19,15 @@ "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)$" + "class": "^MuPDF$", + "instance": "^mupdf$" + }, + { + "class": "^Zathura$", + "instance": "^zathura$" } ], "type": "con" @@ -40,17 +38,11 @@ "border": "pixel", "current_border_width": 2, "floating": "auto_off", - "geometry": { - "height": 408, - "width": 720, - "x": 0, - "y": 0 - }, - "percent": 0.202941176470588, + "percent": 0.20, "swallows": [ { "class": "^URxvt$", - "instance": "^urxvt$", + "instance": "rxvt$", // Prevent vim to be here "title": "^((?!vim).)*$" } @@ -64,19 +56,12 @@ "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$" + "instance": "rxvt$", + "title": "^(vim)|(nvim)$" } ], "type": "con" diff --git a/i3/.config/i3/workspaces/51:code.json b/i3/.config/i3/workspaces/51:code.json index 9e42cd5..bea0ccb 100644 --- a/i3/.config/i3/workspaces/51:code.json +++ b/i3/.config/i3/workspaces/51:code.json @@ -27,10 +27,9 @@ }, "percent": 1, "swallows": [ - { - "class": "^(Pcmanfm)$" - //"instance": "^(mupdf)|(zathura)$" - } + {"class": "^(Pcmanfm)$"}, + {"class": "^(pcmanfm-qt)$"}, + {"class": "^(Thunar)$"} ], "type": "con" } @@ -75,10 +74,9 @@ "swallows": [ { "class": "^URxvt$", - "instance": "^urxvt$", - "title": "^(vim)|(nvim)$" + "instance": "rxvt$", + "title": "^(nvim)|(vim)$" } ], "type": "con" } - diff --git a/i3/scripts/i3/negate_color.py b/i3/scripts/i3/negate_color.py new file mode 100644 index 0000000..a7f985c --- /dev/null +++ b/i3/scripts/i3/negate_color.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import sys + +def RGBToHTMLColor(rgb_tuple): + """ convert an (R, G, B) tuple to #RRGGBB """ + hexcolor = '#%02x%02x%02x' % rgb_tuple + # that's it! '%02x' means zero-padded, 2-digit hex values + return hexcolor + +def HTMLColorToRGB(colorstring): + """ convert #RRGGBB to an (R, G, B) tuple """ + colorstring = colorstring.strip() + if colorstring[0] == '#': colorstring = colorstring[1:] + if len(colorstring) != 6: + raise ValueError, "input #%s is not in #RRGGBB format" % colorstring + r, g, b = colorstring[:2], colorstring[2:4], colorstring[4:] + r, g, b = [int(n, 16) for n in (r, g, b)] + return (r, g, b) + + +if __name__ == "__main__": + r, g, b = HTMLColorToRGB(sys.argv[1]) + print RGBToHTMLColor((255 -r, 255-g, 255-b)) diff --git a/i3/scripts/i3/wallpaper.sh b/i3/scripts/i3/wallpaper.sh index 20ef0c9..adff385 100755 --- a/i3/scripts/i3/wallpaper.sh +++ b/i3/scripts/i3/wallpaper.sh @@ -17,10 +17,15 @@ image=$1 # -addd "#ffffff00" 10 \ # -addd "#ffffff00" 90 \ # -gradient 0 -hsetroot \ + +if [ -z ${VNCDESKTOP} ]; then + hsetroot \ -fill "${image}" \ -add "#ffffff77" \ -addd "#ffffff77" 2 \ -addd "#ffffff00" 0 \ -addd "#ffffff00" 90 \ -gradient 0 +else + xsetroot -solid grey +end |