From 04eaf5c25193ba74c1613c958015f47e2b896e50 Mon Sep 17 00:00:00 2001 From: Shubham Saini Date: Mon, 20 Apr 2020 12:04:27 +0530 Subject: mass changes --- bin/.local/bin/shut | 6 +-- bin/.local/bin/statusbar | 25 ++++++++++ nvim/.config/nvim/init.vim | 1 - picom/.config/picom.conf | 77 ++++++++++++++++++++++++++++++ spectrwm/.config/spectrwm/keybindings.conf | 2 +- spectrwm/.config/spectrwm/spectrwm.conf | 38 +++++++++++---- x/.Xresources | 2 +- x/.xinitrc | 3 +- 8 files changed, 137 insertions(+), 17 deletions(-) create mode 100755 bin/.local/bin/statusbar create mode 100644 picom/.config/picom.conf diff --git a/bin/.local/bin/shut b/bin/.local/bin/shut index 527dfb1..801d5bf 100755 --- a/bin/.local/bin/shut +++ b/bin/.local/bin/shut @@ -1,11 +1,11 @@ #!/bin/bash -RET=$(echo -e "shutdown\nreboot\nsleep\nlock\ncancel" | dmenu -l 5 -p "Sayonara") +RET=$(echo -e "shutdown\nreboot\nsleep\nlock\ncancel" | dmenu -l 5 -p "Sayonara" -nb "#000000" -nf "#bfbfbf" -sb "#84a0c6" -sf "#000000" -fn "Hermit:size=10") case $RET in shutdown) sudo poweroff ;; reboot) sudo reboot ;; - sleep) /home/fd0e/.local/bin/lock & sudo sh -c "echo -n mem > /sys/power/state" ;; - lock) /home/fd0e/.local/bin/lock ;; + sleep) xset s activate & sudo zzz ;; + lock) xset s activate ;; *) ;; esac diff --git a/bin/.local/bin/statusbar b/bin/.local/bin/statusbar new file mode 100755 index 0000000..020429e --- /dev/null +++ b/bin/.local/bin/statusbar @@ -0,0 +1,25 @@ +#!/bin/bash + +BOLD='\033[1m' +BB='\033[00m' + +vol(){ + vol=$(amixer get Master | awk -F'[][]' 'END{ print $2 }') + echo -e "+@fg=1;vol+@fg=0; $vol " +} + +bat() { + power=$(cat /sys/class/power_supply/BAT0/capacity) + echo -e "+@fg=1;bat+@fg=0; $power% " +} + +dte() { + dte="$(date +"%A, %B %d")" + time="$(date +"%l:%M %p")" + echo -e "+@fg=1;date+@fg=0; $dte +@fg=1;time+@fg=0; $time" +} + +while :; do + echo "$(vol) $(bat) $(dte)" + sleep 2 +done diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim index a9523f9..3b390a3 100644 --- a/nvim/.config/nvim/init.vim +++ b/nvim/.config/nvim/init.vim @@ -37,7 +37,6 @@ set copyindent " copy indent from the previous line " deoplete let g:deoplete#enable_at_startup = 1 -let g:python3_host_prog= "/usr/local/bin/python3.7" " git gutter settings let g:gitgutter_override_sign_column_highlight = 0 diff --git a/picom/.config/picom.conf b/picom/.config/picom.conf new file mode 100644 index 0000000..68c6ee5 --- /dev/null +++ b/picom/.config/picom.conf @@ -0,0 +1,77 @@ +## SHADOWS +shadow = true; +shadow-radius = 0.5; +shadow-offset-x = 3; +shadow-offset-y = 3; +shadow-opacity = 0.65; +log-level = "warn"; +shadow-exclude = [ + "name = 'Notification'", + "class_g = 'conky'", + "class_g ?= 'Notify-osd'", + "class_g = 'Cairo-clock'", + "class_g ?= 'slop'", + "name = 'polybar'", + "name = 'Polybar tray window'", + "class_g ?= 'dmenu'", + "class_g ?= 'dwm'", + "class_g = 'Firefox' && argb", + "_GTK_FRAME_EXTENTS@:c" +]; + +## OPACITY +frame-opacity = 1.0; +inactive-opacity-override = false; +blur-background = true; +blur-strength = 3; +blur-kern = "3x3box"; +blur-background-exclude = [ + "class_g ?= 'slop'", + "name = 'polybar'", + "name = 'Polybar tray window'", + "class_g = 'conky'", + "class_g ?= 'Rofi'", + "class_g ?= 'zoom'", + "window_type = 'dock'", + "window_type = 'desktop'" +]; +opacity-rule = [ + "40:class_g = 'Bspwm' && class_i = 'presel_feedback'", + "100:class_g = 'URxvt' && focused", + "95:class_g = 'URxvt' && !focused" +]; + +## FADING +fading = true; +fade-in-step = 0.03; +fade-out-step = 0.03; +fade-exclude = [ ]; + +## GLX +glx-no-stencil = true; +glx-no-rebind-pixmap = true; +use-damage = true; + +## WINDOW TYPES +wintypes: +{ + tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; }; + dock = { shadow = false; } + dnd = { shadow = false; } + popup_menu = { opacity = 0.8; } + dropdown_menu = { opacity = 0.8; } +}; + +## MISC +backend = "glx"; +mark-wmwin-focused = true; +mark-ovredir-focused = true; +use-ewmh-active-win = true; +detect-rounded-corners = true; +detect-client-opacity = true; +refresh-rate = 0; +vsync = true; +focus-exclude = [ "class_g = 'Cairo-clock'" ]; +detect-transient = true; +detect-client-leader = true; +invert-color-include = [ ]; diff --git a/spectrwm/.config/spectrwm/keybindings.conf b/spectrwm/.config/spectrwm/keybindings.conf index d736a07..8635a11 100644 --- a/spectrwm/.config/spectrwm/keybindings.conf +++ b/spectrwm/.config/spectrwm/keybindings.conf @@ -14,7 +14,7 @@ bind[focus_prev] = MOD+Shift+Tab bind[focus_urgent] = MOD+u bind[height_grow] = MOD+Shift+equal bind[height_shrink] = MOD+Shift+minus -bind[iconify] = MOD+x +#bind[iconify] = MOD+x bind[initscr] = MOD+Shift+i bind[lock] = MOD+Shift+Delete bind[master_add] = MOD+comma diff --git a/spectrwm/.config/spectrwm/spectrwm.conf b/spectrwm/.config/spectrwm/spectrwm.conf index 0046444..8f3a125 100644 --- a/spectrwm/.config/spectrwm/spectrwm.conf +++ b/spectrwm/.config/spectrwm/spectrwm.conf @@ -18,8 +18,8 @@ color_focus = red color_focus_maximized = yellow color_unfocus = rgb:88/88/88 color_unfocus_maximized = rgb:88/88/00 -region_padding = 6 -tile_gap = 6 +region_padding = 10 +tile_gap = 10 # Region containment # Distance window must be dragged/resized beyond the region edge before it is @@ -36,16 +36,18 @@ bar_border[1] = rgb:00/80/80 bar_border_unfocus[1] = rgb:00/40/40 bar_color[1] = black bar_color_selected[1] = rgb:00/80/80 -bar_font_color[1] = rgb:a0/a0/a0 +bar_font_color[1] = rgb:b5/b5/b5, rgb:73/73/73, rgb:5e/5e/5e bar_font_color_selected = black bar_font = Hermit:size=9 -# bar_action = baraction.sh +bar_action = ~/.local/bin/statusbar +bar_action_expand = 1 bar_justify = left -bar_format = +N:+I +S <+D>+4<%a %b %d %R %Z %Y+8<+4<+V +#bar_format = +N:+I +S <+D>+4<%a %b %d %R %Z %Y+8<+4<+V +bar_format = +|L+1<+L +@fg=2;+C+@fg=0; +|R+A workspace_indicator = listcurrent,listactive,markcurrent,printnames bar_at_bottom = 0 -stack_enabled = 1 -clock_enabled = 1 +stack_enabled = 0 +clock_enabled = 0 clock_format = %a %b %d %R %Z %Y iconic_enabled = 0 maximize_hide_bar = 0 @@ -64,8 +66,12 @@ urgent_enabled = 1 # region = screen[1]:1280x1024+1280+0 # Launch applications in a workspace of choice -#autorun = ws[1]:urxvtd +autorun = ws[1]:urxvtd autorun = ws[1]:~/.fehbg +autorun = ws[1]:picom +autorun = ws[2]:firefox +autorun = ws[1]:~/bin/xss +autorun = ws[1]:~/.local/bin/bat_check.sh # Customize workspace layout at start # layout = ws[1]:4:0:0:0:vertical @@ -94,9 +100,15 @@ keyboard_mapping = ~/.config/spectrwm/keybindings.conf # PROGRAMS # Validated default programs: -# program[lock] = xlock +program[lock] = xset s activate program[term] = urxvtc -program[menu] = dmenu_run -nb $bar_color -nf $bar_font_color -sb $bar_border -sf darkgray -fn "Hermit:size=10" +program[menu] = ~/bin/menu +program[bup] = sudo bash -c 'for f in /sys/class/backlight/*; do echo $(($(<$f/brightness)+5*$(<$f/max_brightness)/100)) > $f/brightness; done' +program[bdown] = sudo bash -c 'for f in /sys/class/backlight/*; do echo $(($(<$f/brightness)-5*$(<$f/max_brightness)/100)) > $f/brightness; done' +program[soundinc] = amixer set Master 5%+ +program[sounddec] = amixer set Master 5%- +program[soundmute] = amixer set Master toggle +program[shut] = ~/.local/bin/shut # program[search] = dmenu $dmenu_bottom -i -fn $bar_font -nb $bar_color -nf $bar_font_color -sb $bar_color_selected -sf $bar_font_color_selected # program[name_workspace] = dmenu $dmenu_bottom -p Workspace -fn $bar_font -nb $bar_color -nf $bar_font_color -sb $bar_color_selected -sf $bar_font_color_selected @@ -104,6 +116,12 @@ program[menu] = dmenu_run -nb $bar_color -nf $bar_font_color -sb $bar_border -s # bind[] = MOD+Shift+Delete # disable lock # bind[] = MOD+Shift+Return # disable term # bind[] = MOD+p # disable menu +bind[bup] = XF86MonBrightnessUp +bind[bdown] = XF86MonBrightnessDown +bind[soundinc] = XF86AudioRaiseVolume +bind[sounddec] = XF86AudioLowerVolume +bind[soundmute] = XF86AudioMute +bind[shut] = MOD+x # Optional default programs that will only be validated if you override: # program[screenshot_all] = screenshot.sh full # optional diff --git a/x/.Xresources b/x/.Xresources index d544342..855758d 100644 --- a/x/.Xresources +++ b/x/.Xresources @@ -38,7 +38,7 @@ URxvt*inheritPixmap: False ! special *.foreground: #c6c8d1 -*.background: #0c0c0f +*.background: #000000 *.cursorColor: #c6c8d1 ! black diff --git a/x/.xinitrc b/x/.xinitrc index a685f5f..aad789f 100644 --- a/x/.xinitrc +++ b/x/.xinitrc @@ -1,3 +1,4 @@ +#exec dbus-launch --exit-with-session spectrwm xrdb ~/.Xresources & -urxvtd & +xset s 600 & exec dbus-launch --exit-with-session spectrwm -- cgit v1.2.3