summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfig/bspwm/bspwmrc2
-rw-r--r--config/picom/picom.conf19
-rw-r--r--config/picom/shaders/bg.glsl138
-rw-r--r--config/picom/shaders/glitch.glsl9
-rw-r--r--config/picom/shaders/glitch_animation.glsl19
-rw-r--r--config/sxhkd/sxhkdrc20
-rw-r--r--config/vim/vimrc114
-rwxr-xr-xdeploy.sh2
8 files changed, 232 insertions, 91 deletions
diff --git a/config/bspwm/bspwmrc b/config/bspwm/bspwmrc
index 2e30cd2..bc49ff3 100755
--- a/config/bspwm/bspwmrc
+++ b/config/bspwm/bspwmrc
@@ -11,7 +11,7 @@ xsetroot -cursor_name left_ptr &
xrdb ~/.config/Xdefaults
pgrep -x sxhkd > /dev/null || sxhkd &
-pgrep -x picom > /dev/null || picom &
+pgrep -x picom > /dev/null || picom --root-pixmap-shader "/home/x/.config/picom/shaders/glitch.glsl" &
pgrep -x xss-lock > /dev/null || xss-lock slock &
pgrep -x bg.sh > /dev/null || $HOME/.scripts/bg.sh > /dev/null &
diff --git a/config/picom/picom.conf b/config/picom/picom.conf
index d30d4eb..fbe89c1 100644
--- a/config/picom/picom.conf
+++ b/config/picom/picom.conf
@@ -55,10 +55,10 @@ shadow-offset-y = -7;
fading = true;
# Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028)
-fade-in-step = 0.01;
+fade-in-step = 0.012;
# Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03)
-fade-out-step = 0.01;
+fade-out-step = 0.012;
# The time between steps in fade step, in milliseconds. (> 0, defaults to 10)
fade-delta = 2
@@ -94,7 +94,7 @@ frame-opacity = 0.7;
# `transparent-clipping`.
#
# Default: 0 (disabled)
-corner-radius = 0
+corner-radius = 5
#################################
# Blur #
@@ -229,7 +229,7 @@ use-damage = false;
#
# Can be set per-window using rules.
#
-window-shader-fg = "~/.config/picom/shaders/glitch_animation.glsl"
+#window-shader-fg = "~/.config/picom/shaders/glitch_animation.glsl"
# Force all windows to be painted with blending. Useful if you
# have a `window-shader-fg` that could turn opaque pixels transparent.
@@ -295,7 +295,6 @@ rules: ({
blur-background = false;
}, {
match = "window_type != 'dock'";
- # shader = "my_shader.frag";
}, {
match = "window_type = 'dock' || "
"window_type = 'desktop'";
@@ -307,7 +306,15 @@ rules: ({
"class_g = 'Cairo-clock' || "
"_GTK_FRAME_EXTENTS@";
shadow = false;
-})
+},
+{
+ match = "window_type = 'desktop'";
+ shader = "/home/x/.config/picom/shaders/glitch.glsl";
+},
+{
+ match = "window_type != 'desktop'";
+ shader = "/home/x/.config/picom/shaders/glitch_animation.glsl";
+});
# `@include` directive can be used to include additional configuration files.
# Relative paths are search either in the parent of this configuration file
diff --git a/config/picom/shaders/bg.glsl b/config/picom/shaders/bg.glsl
new file mode 100644
index 0000000..e15c18d
--- /dev/null
+++ b/config/picom/shaders/bg.glsl
@@ -0,0 +1,138 @@
+#version 330
+
+int delta = 20;
+float barh = 0.05;
+float barw = 0.6;
+int nbar = 8;
+
+float maxoff = 32;
+float minoff = 2;
+float hue = 0.3;
+
+// blinds
+int blinds_spacing = 4;
+int blinds_width = 1;
+float blinds_intensity = 1.2;
+
+in vec2 texcoord; // texture coordinate of the fragment
+
+uniform sampler2D tex; // texture of the window
+ivec2 window_size = textureSize(tex, 0);
+ivec2 window_center = ivec2(window_size.x/2, window_size.y/2);
+
+// Default window post-processing:
+// 1) invert color
+// 2) opacity / transparency
+// 3) max-brightness clamping
+// 4) rounded corners
+vec4 default_post_processing(vec4 c);
+
+uniform float time; // Time in miliseconds.
+
+float alpha = round(time/delta); // Like time, but in seconds and resets to
+
+vec4 blinds(vec4 c, vec2 coords) {
+ if (mod(coords.y, blinds_spacing) < blinds_width) {
+ return c * blinds_intensity;
+ }
+
+ return c;
+}
+
+vec3 hueShift( vec3 color, float hueAdjust ){
+
+ const vec3 kRGBToYPrime = vec3 (0.299, 0.587, 0.114);
+ const vec3 kRGBToI = vec3 (0.596, -0.275, -0.321);
+ const vec3 kRGBToQ = vec3 (0.212, -0.523, 0.311);
+
+ const vec3 kYIQToR = vec3 (1.0, 0.956, 0.621);
+ const vec3 kYIQToG = vec3 (1.0, -0.272, -0.647);
+ const vec3 kYIQToB = vec3 (1.0, -1.107, 1.704);
+
+ float YPrime = dot (color, kRGBToYPrime);
+ float I = dot (color, kRGBToI);
+ float Q = dot (color, kRGBToQ);
+ float hue = atan (Q, I);
+ float chroma = sqrt (I * I + Q * Q);
+
+ hue += hueAdjust;
+
+ Q = chroma * sin (hue);
+ I = chroma * cos (hue);
+
+ vec3 yIQ = vec3 (YPrime, I, Q);
+
+ return vec3( dot (yIQ, kYIQToR), dot (yIQ, kYIQToG), dot (yIQ, kYIQToB) );
+
+}
+
+// Pseudo-random function (from original shader)
+float random(float n) {
+ return fract(sin(n) * 43758.5453f);
+}
+
+float get_box() {
+ float n = random(alpha)*(nbar);
+
+ for(int i=0;i<n;i++){
+ float y = random(mod(alpha, 2048)+i) * window_size.y;
+ float x = random(mod(alpha+128, 2048)+i) * window_size.x;
+ float w = random(mod(alpha+64, 2048)+i) * barw*window_size.x;
+ float h = random(mod(alpha+32, 2048)+i) * barh*window_size.y;
+ if (texcoord.y > y && texcoord.y < y + h
+ && texcoord.x > x && texcoord.x < x + w) {
+ return i*w*h*y*x*n;
+ }
+ }
+ return -1.0f;
+}
+
+float rand_offset(float b) {
+ return (random(b*64) - 0.5) * (maxoff*2);
+}
+
+vec4 window_color(vec2 uv) {
+ return blinds(texelFetch(tex, ivec2(uv), 0), uv);
+}
+
+vec4 window_shader() {
+ float b = get_box();
+
+ if (b == -1.0) {
+ vec4 c = window_color(ivec2(texcoord));
+ return default_post_processing(c);
+ }
+ //b = random(mod(alpha, 2000));
+
+ // Offsets in pixels for each color
+ vec2 uvr = vec2(rand_offset(b*1), rand_offset(b*6));
+ vec2 uvg = vec2(rand_offset(b*2),rand_offset(b*7));
+ vec2 uvb = vec2(rand_offset(b*3),rand_offset(b*8));
+
+
+ // Calculate offset coords
+ uvr += texcoord;
+ uvg += texcoord;
+ uvb += texcoord;
+
+ // Fetch colors using offset coords
+ vec3 offset_color;
+ offset_color.x = window_color(uvr).x;
+ offset_color.y = window_color(uvg).y;
+ offset_color.z = window_color(uvb).z;
+
+ offset_color.x = hueShift(window_color(uvr).xyz, hue).x;
+ offset_color.y = hueShift(window_color(uvg).xyz, hue).y;
+ offset_color.z = hueShift(window_color(uvb).xyz, hue).z;
+
+ offset_color.xyz = hueShift(offset_color.xyz, -hue);
+ // Set the new color
+ vec4 c;
+ c.w = texelFetch(tex, ivec2(uvr), 0).w;
+ c.xyz = offset_color;
+
+ c.xyz = hueShift(c.xyz, random(mod(b, 2000)));
+
+ return default_post_processing(c);
+}
+
diff --git a/config/picom/shaders/glitch.glsl b/config/picom/shaders/glitch.glsl
index be28f78..aa27fe6 100644
--- a/config/picom/shaders/glitch.glsl
+++ b/config/picom/shaders/glitch.glsl
@@ -1,12 +1,11 @@
#version 330
-
int delta = 20;
-float barh = 0.02;
-float barw = 0.4;
-int nbar = 16;
+float barh = 0.05;
+float barw = 0.6;
+int nbar = 8;
-float maxoff = 5;
+float maxoff = 32;
float minoff = 2;
in vec2 texcoord; // texture coordinate of the fragment
diff --git a/config/picom/shaders/glitch_animation.glsl b/config/picom/shaders/glitch_animation.glsl
index be1e16c..ee2ae8f 100644
--- a/config/picom/shaders/glitch_animation.glsl
+++ b/config/picom/shaders/glitch_animation.glsl
@@ -1,7 +1,7 @@
#version 330
float maxoff = 10;
-float minoff = 2;
+float minoff = 0;
float hue = 0.3;
float block_max = 500;
@@ -18,12 +18,9 @@ float max_opacity = 0.9;
float opacity_threshold(float opacity)
{
// if statement jic?
- if (opacity >= max_opacity)
- {
+ if (opacity >= max_opacity) {
return 1.0;
- }
- else
- {
+ } else {
return min(1, opacity/max_opacity);
}
@@ -96,24 +93,20 @@ vec4 anim(float alpha) {
offset_color.z = hueShift(texelFetch(tex, ivec2(uvb), 0).xyz, hue).z;
offset_color.xyz = hueShift(offset_color.xyz, -hue);
-
+
// Set the new color
vec4 c;
c.w = texelFetch(tex, ivec2(uvr), 0).w;
c.xyz = offset_color;
- return default_post_processing(c);
+ return c;
}
vec4 window_shader() {
vec4 c = texelFetch(tex, ivec2(texcoord), 0);
c = default_post_processing(c);
float opacity = opacity_threshold(c.w);
- if (opacity != 1.0)
- {
- c = anim(opacity);
- }
- //c = anim(opacity);
+ c = anim(opacity);
return default_post_processing(c);
}
diff --git a/config/sxhkd/sxhkdrc b/config/sxhkd/sxhkdrc
index 3853a32..6c41e61 100644
--- a/config/sxhkd/sxhkdrc
+++ b/config/sxhkd/sxhkdrc
@@ -11,11 +11,14 @@ super + ctrl + alt + f
#Volume Control
{XF86AudioLowerVolume,super + Next}
- amixer -D pulse sset Master 5%-
+ pactl set-sink-volume @DEFAULT_SINK@ -5%
{XF86AudioRaiseVolume,super + Prior}
- amixer -D pulse sset Master 5%+
+ pactl set-sink-volume @DEFAULT_SINK@ +5%
{XF86AudioMute}
- amixer -D pulse set Master 1+ toggle
+ pactl set-sink-mute @DEFAULT_SINK@ toggle
+
+super + alt + ctrl + button{4,5}
+ pactl set-sink-volume @DEFAULT_SINK@ {+,-}1%
{_, super} + XF86MonBrightnessDown
light -U {10,1}
@@ -30,7 +33,7 @@ super + r
super + shift + r
rofi -show ssh -show-icons
-super + ctrl + Tab
+super + alt + Tab
rofi -show window
super + g
@@ -113,15 +116,16 @@ super + ctrl + c
# stuff
super + ctrl + m
- dmenu -p "i am stuff" | xargs /usr/bin/stuff
+ dmenu -p "i am stuff" | xargs /usr/local/bin/stuff
super + ctrl + n
- dmenu -p "i am big chungus" | xargs /usr/bin/chungus
+ dmenu -p "i am big chungus" | xargs /usr/local/bin/chungus
+
+super + ctrl + b
+ dmenu -p "eminem says" | xargs /usr/bin/local/eminem
super + ctrl + t
dmenu -p "toilet" | toilet --font mono12 | sed 's/ /_ _ /g' | xclip -selection clipboard
-super + ctrl + b
- dmenu -p "eminem says" | xargs /usr/bin/eminem
# iocane
super + shift + Return
diff --git a/config/vim/vimrc b/config/vim/vimrc
index 74515ba..f8258d1 100644
--- a/config/vim/vimrc
+++ b/config/vim/vimrc
@@ -53,63 +53,63 @@ Plug 'preservim/vim-markdown'
"let g:vim_markdown_json_frontmatter = 1
-"Plug 'neoclide/coc.nvim'
-"hi CocInlayHint ctermbg=Black ctermfg=Gray
-"
-"set updatetime=300
-"set signcolumn=yes
-"
-"nmap <silent> [g <Plug>(coc-diagnostic-prev)
-"nmap <silent> ]g <Plug>(coc-diagnostic-next)
-"
-"nmap <silent> gd <Plug>(coc-definition)
-"nmap <silent> gy <Plug>(coc-type-definition)
-"nmap <silent> gi <Plug>(coc-implementation)
-"nmap <silent> gr <Plug>(coc-references)
-"
-"xmap <leader>f <Plug>(coc-format-selected)
-"nmap <leader>f <Plug>(coc-format-selected)
-"
-"nmap <leader>rn <Plug>(coc-rename)
-"nmap <silent> <leader>re <Plug>(coc-codeaction-refactor)
-"xmap <silent> <leader>r <Plug>(coc-codeaction-refactor-selected)
-"" nmap <silent> <leader>r <Plug>(coc-codeaction-refactor-selected)
-"
-"inoremap <silent><expr> <TAB>
-" \ coc#pum#visible() ? coc#pum#next(1) :
-" \ CheckBackspace() ? "\<Tab>" :
-" \ coc#refresh()
-"inoremap <expr><S-TAB> coc#pum#visible() ? coc#pum#prev(1) : "\<C-h>"
-"
-"inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm()
-" \: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
-"
-"function! CheckBackspace() abort
-" let col = col('.') - 1
-" return !col || getline('.')[col - 1] =~# '\s'
-"endfunction
-"
-"
-"if has('nvim')
-" inoremap <silent><expr> <c-space> coc#refresh()
-"else
-" inoremap <silent><expr> <c-@> coc#refresh()
-"endif
-"
-"xmap <leader>a <Plug>(coc-codeaction-selected)
-"nmap <leader>a <Plug>(coc-codeaction-selected)
-"
-"" autocmd CursorHold * silent call CocActionAsync('highlight')
-"
-"function! ShowDocumentation()
-" if CocAction('hasProvider', 'hover')
-" call CocActionAsync('doHover')
-" else
-" call feedkeys('K', 'in')
-" endif
-"endfunction
-"
-"autocmd FileType python let b:coc_root_patterns = ['.git', '.env', '.']
+Plug 'neoclide/coc.nvim'
+hi CocInlayHint ctermbg=Black ctermfg=Gray
+
+set updatetime=300
+set signcolumn=yes
+
+nmap <silent> [g <Plug>(coc-diagnostic-prev)
+nmap <silent> ]g <Plug>(coc-diagnostic-next)
+
+nmap <silent> gd <Plug>(coc-definition)
+nmap <silent> gy <Plug>(coc-type-definition)
+nmap <silent> gi <Plug>(coc-implementation)
+nmap <silent> gr <Plug>(coc-references)
+
+xmap <leader>f <Plug>(coc-format-selected)
+nmap <leader>f <Plug>(coc-format-selected)
+
+nmap <leader>rn <Plug>(coc-rename)
+nmap <silent> <leader>re <Plug>(coc-codeaction-refactor)
+xmap <silent> <leader>r <Plug>(coc-codeaction-refactor-selected)
+" nmap <silent> <leader>r <Plug>(coc-codeaction-refactor-selected)
+
+inoremap <silent><expr> <TAB>
+ \ coc#pum#visible() ? coc#pum#next(1) :
+ \ CheckBackspace() ? "\<Tab>" :
+ \ coc#refresh()
+inoremap <expr><S-TAB> coc#pum#visible() ? coc#pum#prev(1) : "\<C-h>"
+
+inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm()
+ \: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
+
+function! CheckBackspace() abort
+ let col = col('.') - 1
+ return !col || getline('.')[col - 1] =~# '\s'
+endfunction
+
+
+if has('nvim')
+ inoremap <silent><expr> <c-space> coc#refresh()
+else
+ inoremap <silent><expr> <c-@> coc#refresh()
+endif
+
+xmap <leader>a <Plug>(coc-codeaction-selected)
+nmap <leader>a <Plug>(coc-codeaction-selected)
+
+" autocmd CursorHold * silent call CocActionAsync('highlight')
+
+function! ShowDocumentation()
+ if CocAction('hasProvider', 'hover')
+ call CocActionAsync('doHover')
+ else
+ call feedkeys('K', 'in')
+ endif
+endfunction
+
+autocmd FileType python let b:coc_root_patterns = ['.git', '.env', '.']
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
diff --git a/deploy.sh b/deploy.sh
index 49cb4c3..1476192 100755
--- a/deploy.sh
+++ b/deploy.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-configurations="iocane bg bg.gif bspwm cava neofetch mpd mpv ncmpcpp vim sxhkd polybar compfy rofi user-dirs.dirs gtk-3.0 zathura sx mimeapps.list"
+configurations="iocane bg bg.gif bspwm cava neofetch mpd mpv ncmpcpp vim sxhkd polybar compfy rofi user-dirs.dirs gtk-3.0 zathura sx mimeapps.list picom"
save () {