diff --git a/.config/bspwm/alacritty/alacritty.yml b/.config/bspwm/alacritty/alacritty.yml new file mode 100644 index 0000000..9437744 --- /dev/null +++ b/.config/bspwm/alacritty/alacritty.yml @@ -0,0 +1,48 @@ +## Copyright (C) 2020-2021 Aditya Shakya +## Everyone is permitted to copy and distribute copies of this file under GNU-GPL3 + +## Configuration for Alacritty, the GPU enhanced terminal emulator. +## It's a very basic and simple config file, for full configuration... +## See, /usr/share/doc/alacritty/example/alacritty.yml + +## Import files (Colors, Fonts, Etc) +import: + - ~/.config/bspwm/alacritty/colors.yml + - ~/.config/bspwm/alacritty/fonts.yml + +## Set environment variables +env: + TERM: alacritty + WINIT_X11_SCALE_FACTOR: '1.0' + +## Terminal window settings +window: + dimensions: + columns: 82 + lines: 25 + + padding: + x: 10 + y: 10 + + decorations: full + startup_mode: Windowed + dynamic_title: true + +## scrolling + history: 10000 + multiplier: 3 + +## Background opacity + opacity: 1.0 + +## Cursor +cursor: + style: + shape: Block + blinking: On + + unfocused_hollow: false + +## Live config reload +live_config_reload: true diff --git a/.config/bspwm/alacritty/colors.yml b/.config/bspwm/alacritty/colors.yml new file mode 100644 index 0000000..40a1fff --- /dev/null +++ b/.config/bspwm/alacritty/colors.yml @@ -0,0 +1,28 @@ +## Colors configuration +colors: + # Default colors + primary: + background: '#1C1C1C' + foreground: '#DDCCBB' + + # Normal colors + normal: + black: '#3D352A' + red: '#CD5C5C' + green: '#86AF80' + yellow: '#E8AE5B' + blue: '#6495ED' + magenta: '#DEB887' + cyan: '#B0C4DE' + white: '#BBAA99' + + # Bright colors + bright: + black: '#554444' + red: '#CC5533' + green: '#88AA22' + yellow: '#FFA75D' + blue: '#87CEEB' + magenta: '#996600' + cyan: '#B0C4DE' + white: '#DDCCBB' diff --git a/.config/bspwm/alacritty/fonts.yml b/.config/bspwm/alacritty/fonts.yml new file mode 100644 index 0000000..99727f0 --- /dev/null +++ b/.config/bspwm/alacritty/fonts.yml @@ -0,0 +1,37 @@ +## Copyright (C) 2020-2021 Aditya Shakya +## Everyone is permitted to copy and distribute copies of this file under GNU-GPL3 + +# Font configuration +font: + # Normal (roman) font face + normal: + family: "Iosevka Custom" + #style: Regular + + # Bold font face + bold: + family: "Iosevka Custom" + #style: Bold + + # Italic font face + italic: + family: "Iosevka Custom" + #style: Italic + + # Bold italic font face + bold_italic: + family: "Iosevka Custom" + #style: Bold Italic + + # Point size + size: 9 + + # Offset + #offset: + # x: 0 + # y: 0 + + # Glyph offset + #glyph_offset: + # x: 0 + # y: 0 diff --git a/.config/bspwm/background/3d.jpg b/.config/bspwm/background/3d.jpg new file mode 100644 index 0000000..e4c15d5 Binary files /dev/null and b/.config/bspwm/background/3d.jpg differ diff --git a/.config/bspwm/bspwmrc b/.config/bspwm/bspwmrc new file mode 100755 index 0000000..cc066eb --- /dev/null +++ b/.config/bspwm/bspwmrc @@ -0,0 +1,108 @@ +#!/usr/bin/env bash + +export PATH="${PATH}:$HOME/.config/bspwm/bin" + +$HOME/.config/bspwm/polybar/launch.sh + +# Get Colors +xrdb ~/.Xresources +getcolors() { + FOREGROUND=$(xrdb -query | grep 'foreground:'| awk '{print $NF}') + BACKGROUND=$(xrdb -query | grep 'background:'| awk '{print $NF}') + BLACK=$(xrdb -query | grep 'color0:'| awk '{print $NF}') + RED=$(xrdb -query | grep 'color1:'| awk '{print $NF}') + GREEN=$(xrdb -query | grep 'color2:'| awk '{print $NF}') + YELLOW=$(xrdb -query | grep 'color3:'| awk '{print $NF}') + BLUE=$(xrdb -query | grep 'color4:'| awk '{print $NF}') + MAGENTA=$(xrdb -query | grep 'color5:'| awk '{print $NF}') + CYAN=$(xrdb -query | grep 'color6:'| awk '{print $NF}') + WHITE=$(xrdb -query | grep 'color7:'| awk '{print $NF}') +} +getcolors + +# Configurations Tab Workspaces +workspaces() { + name=1 + for monitor in `bspc query -M`; do + bspc monitor ${monitor} -n "$name" -d '' '' '' '' '' '' '' '' + let name++ + done +} +workspaces + +bspc config border_width 1 +bspc config window_gap 10 +bspc config split_ratio 0.50 + +bspc config focused_border_color "$BLUE" +bspc config normal_border_color "$BACKGROUND" +bspc config active_border_color "$MAGENTA" +bspc config presel_feedback_color "$GREEN" + +bspc config borderless_monocle true +bspc config gapless_monocle true +bspc config paddingless_monocle true +bspc config single_monocle false +bspc config focus_follows_pointer true + +# WORKSPACE GEANY [8] +declare -a code=(Geany code-oss) +for i in ${code[@]}; do + bspc rule -a $i desktop='^8' follow=on focus=on; done + +# WORKSPACE FILE MANAGER [7] +declare -a files=(Pcmanfm Thunar qBittorrent) +for i in ${files[@]}; do + bspc rule -a $i desktop='^7' follow=on focus=on; done + +# Window rules +# Remove all rules first +bspc rule -r *:* + +# Special rules +declare -a floating=(alacritty-float Pcmanfm Onboard Yad 'Firefox:Places' \ +Viewnior feh Nm-connection-editor) +for i in ${floating[@]}; do + bspc rule -a $i state=floating follow=on focus=on; done + +bspc rule -a Conky state=floating manage=off +bspc rule -a stalonetray state=floating manage=off + +# Autostart +# Kill if already running +killall -9 xsettingsd sxhkd dunst ksuperkey xfce4-power-manager + +# Lauch xsettingsd daemon +xsettingsd & + +# polkit agent +if [[ ! `pidof xfce-polkit` ]]; then + /usr/lib/xfce-polkit/xfce-polkit & +fi + +# Lauch keybindings daemon +sxhkd & + +# Enable Super Keys For Menu +ksuperkey -e 'Super_L=Alt_L|F1' & +ksuperkey -e 'Super_R=Alt_L|F1' & + +# Enable power management +xfce4-power-manager & + +# Fix cursor +xsetroot -cursor_name left_ptr + +# Restore wallpaper +bash $HOME/.fehbg + +# Start mpd +exec mpd & + +# Start bspwm scripts +bspcolors +bspbar +bspcomp +bspdunst +bspfloat & + diff --git a/.config/bspwm/my-color-scheme/colors.yml b/.config/bspwm/my-color-scheme/colors.yml new file mode 100644 index 0000000..40a1fff --- /dev/null +++ b/.config/bspwm/my-color-scheme/colors.yml @@ -0,0 +1,28 @@ +## Colors configuration +colors: + # Default colors + primary: + background: '#1C1C1C' + foreground: '#DDCCBB' + + # Normal colors + normal: + black: '#3D352A' + red: '#CD5C5C' + green: '#86AF80' + yellow: '#E8AE5B' + blue: '#6495ED' + magenta: '#DEB887' + cyan: '#B0C4DE' + white: '#BBAA99' + + # Bright colors + bright: + black: '#554444' + red: '#CC5533' + green: '#88AA22' + yellow: '#FFA75D' + blue: '#87CEEB' + magenta: '#996600' + cyan: '#B0C4DE' + white: '#DDCCBB' diff --git a/.config/bspwm/picom.conf b/.config/bspwm/picom.conf new file mode 100644 index 0000000..62643ac --- /dev/null +++ b/.config/bspwm/picom.conf @@ -0,0 +1,134 @@ + +# ------------- # +# CORNER +# ------------- # +corner-radius = 1; +rounded-corners-exclude = [ + "window_type = 'normal'", + "class_g ?= 'rofi'", + "class_g ?= 'polybar'", + "class_g ?= 'tint2'" +]; + +round-borders = 1; +round-borders-exclude = [ + "class_g = 'TelegramDesktop'" +]; + +round-borders-rule = [ + "2:class_g ?= 'URxvt'", + "2:class_g ?= 'Alacritty'", + "0:class_g ?= 'firefox'" +]; + +# ------------- # +# SHADOW +# ------------- # +shadow = true; +shadow-radius = 14; +shadow-opacity = 0.30; +shadow-offset-x = -12; +shadow-offset-y = -12; +# shadow-red = 0 +# shadow-green = 0 +# shadow-blue = 0 +# shadow-color = "#000000" + +shadow-exclude = [ + "class_g = 'Cairo-clock'", + "class_g = 'CoverGloobus'", + "class_g = 'Tilda'", + "name ?= 'gnome-pie'", + "class_g ?= 'Plank'", + "name *= 'recordmydesktop'", + "name = 'Notification'", + "name = 'Docky'", + "name = 'Kupfer'", + "name = 'xfce4-notifyd'", + "name *= 'VLC'", + "name *= 'Chromium'", + "name *= 'Chrome'", + "class_g = 'Conky'", + "class_g = 'Kupfer'", + "class_g = 'Synapse'", + "class_g ?= 'Notify-osd'", + "class_g ?= 'Cairo-dock'", + "class_g ?= 'Xfce4-notifyd'", + "class_g ?= 'Xfce4-power-manager'", + "_GTK_FRAME_EXTENTS@:c", + "_NET_WM_STATE@:32a *= '_NET_WM_STATE_HIDDEN'" +]; + +# ------------- # +# FADING +# ------------- # +fading = true; +fade-in-step = 0.03; +fade-out-step = 0.03; +fade-delta = 5; + +fade-exclude = [ + "class_g = 'slop'" +] + +no-fading-openclose = false +no-fading-destroyed-argb = true + +# ------------- # +# OPACITY +# ------------- # +inactive-opacity = 1; +frame-opacity = 1; +inactive-opacity-override = false; +active-opacity = 1; + +focus-exclude = [ + "class_g = 'Cairo-clock'", + "class_g = 'Bar'", + "class_g = 'slop'" +]; + +opacity-rule = [ + "100:class_g = 'Bar'", + "100:class_g = 'slop'", + "100:class_g = 'XTerm'", + "100:class_g = 'URxvt'", + "100:class_g = 'kitty'", + "100:class_g = 'Alacritty'", + "100:class_g = 'Polybar'", + "100:class_g = 'code-oss'", + "100:class_g = 'Meld'", + "100:class_g = 'TelegramDesktop'", + "100:class_g = 'Joplin'", + "100:class_g = 'firefox'", + "100:class_g = 'Thunderbird'" +]; + +# ------------- # +# SETTING +# ------------- # +experimental-backends = true; +backend = "xrender"; +glx-no-stencil = true; + +vsync = true; +refresh-rate = 0; +use-damage = true; +log-level = "info"; + +mark-wmwin-focused = true; +mark-ovredir-focused = true; + +detect-rounded-corners = true; +detect-client-opacity = true; +detect-transient = true; +detect-client-leader = true; + + +wintypes: +{ + tooltip = { fade=true; shadow=true; opacity=0.95; focus=true; full-shadow=false; }; + popup_menu = { opacity=1.0; } + dropdown_menu = { opacity=1.0; } + utility = { shadow=false; opacity=1.0; } +}; diff --git a/.config/bspwm/polybar/.module b/.config/bspwm/polybar/.module new file mode 100644 index 0000000..e69de29 diff --git a/.config/bspwm/polybar/.system b/.config/bspwm/polybar/.system new file mode 100644 index 0000000..e69de29 diff --git a/.config/bspwm/polybar/colors b/.config/bspwm/polybar/colors new file mode 100644 index 0000000..7aded6a --- /dev/null +++ b/.config/bspwm/polybar/colors @@ -0,0 +1,20 @@ +[color] + +FOREGROUND = #D8DEE9 +BACKGROUND = #2E3440 +BLACK = #3B4252 +RED = #BF616A +GREEN = #A3BE8C +YELLOW = #EBCB8B +BLUE = #81A1C1 +MAGENTA = #B48EAD +CYAN = #88C0D0 +WHITE = #E5E9F0 +ALTBLACK = #4C566A +ALTRED = #BF616A +ALTGREEN = #A3BE8C +ALTYELLOW = #EBCB8B +ALTBLUE = #81A1C1 +ALTMAGENTA = #B48EAD +ALTCYAN = #8FBCBB +ALTWHITE = #ECEFF4 diff --git a/.config/bspwm/polybar/config b/.config/bspwm/polybar/config new file mode 100644 index 0000000..f16d393 --- /dev/null +++ b/.config/bspwm/polybar/config @@ -0,0 +1,84 @@ +[global/wm] +margin-bottom = 0 +margin-top = 0 + +include-file = ~/.config/bspwm/polybar/system +include-file = ~/.config/bspwm/polybar/colors +include-file = ~/.config/bspwm/polybar/modules + +[bar/main] +monitor = +monitor-strict = false +override-redirect = false + +bottom = false +fixed-center = true + +width = 100% +height = 24 +offset-x = 0 +offset-y = 0 + +background = #1C1C1C +foreground = #DDCCBB + +radius-top = 0.0 +radius-bottom = 0.0 + +line-size = 2 +line-color = #6495ED + +border-size = 4 +border-color = #1C1C1C + +padding = 1 +module-margin-left = 0 +module-margin-right = 0 + +font-0 = "Iosevka Nerd Font:size=10;3" +font-1 = "Iosevka Nerd Font:size=12;3" +font-2 = "google\-mdi:size=12;3" +font-3 = "Iosevka:style=bold:"size=12;3" + +modules-left = logo sep3 bspwm title +modules-center = +modules-right = battery sep enp sep volume sep time sep powermenu + +separator = +spacing = 0 + +dim-value = 1.0 + +wm-name = bspwm +locale = + +tray-position = right +tray-detached = false +tray-maxsize = 16 +tray-transparent = false +tray-background = #1C1C1C +tray-offset-x = 0 +tray-offset-y = 0 +tray-padding = 0 +tray-scale = 1.0 + +wm-restack = bspwm + +enable-ipc = true + +; bspwm +scroll-up = bspc desktop -f prev.local +scroll-down = bspc desktop -f next.local + +[settings] +throttle-output = 5 +throttle-output-for = 10 +throttle-input-for = 30 + +screenchange-reload = false + +compositing-background = source +compositing-foreground = over +compositing-overline = over +compositing-underline = over +compositing-border = over diff --git a/.config/bspwm/polybar/launch.sh b/.config/bspwm/polybar/launch.sh new file mode 100755 index 0000000..ec37cb7 --- /dev/null +++ b/.config/bspwm/polybar/launch.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# Terminate already running bar instances +killall -q polybar + +# Wait until the processes have been shut down +while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done + +# Launch bar with name example +polybar example -r & diff --git a/.config/bspwm/polybar/modules b/.config/bspwm/polybar/modules new file mode 100644 index 0000000..cc43d17 --- /dev/null +++ b/.config/bspwm/polybar/modules @@ -0,0 +1,244 @@ + +[module/time] +type = internal/date +interval = 60 + +format =