aboutsummaryrefslogtreecommitdiff
path: root/.config/bspwm
diff options
context:
space:
mode:
Diffstat (limited to '.config/bspwm')
-rwxr-xr-x.config/bspwm/bspcmd37
-rwxr-xr-x.config/bspwm/bspwmrc90
-rwxr-xr-x.config/bspwm/menu.sh64
-rw-r--r--.config/bspwm/noswallow2
-rwxr-xr-x.config/bspwm/scripts/external_rules.sh39
-rw-r--r--.config/bspwm/swallow3
-rwxr-xr-x.config/bspwm/sysmenu.sh70
-rw-r--r--.config/bspwm/terminals1
8 files changed, 306 insertions, 0 deletions
diff --git a/.config/bspwm/bspcmd b/.config/bspwm/bspcmd
new file mode 100755
index 0000000..94bed26
--- /dev/null
+++ b/.config/bspwm/bspcmd
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+CMD=${1:-help}; shift
+
+help() {
+ echo "Available commands:"
+ echo " * unhide - select and unhide window"
+}
+
+unhide() {
+ action=${1:-list}
+ case $action in
+ "list")
+ selection=`for id in $(bspc query -N -n .hidden); do
+ title=$(xtitle $id)
+ [[ -z "$title" ]] && title="<unnamed>"
+ echo $id $title
+ done | rofi -dmenu -i -p "Hidden windows" | cut -f1 -d' '`
+
+ [[ -z "$selection" ]] && exit 1
+
+ bspc node $selection -g hidden=off
+ ;;
+ esac
+}
+
+case $CMD in
+ "help")
+ help
+ ;;
+ "unhide")
+ unhide $1
+ ;;
+ *)
+ help
+ ;;
+esac
diff --git a/.config/bspwm/bspwmrc b/.config/bspwm/bspwmrc
new file mode 100755
index 0000000..9b2e393
--- /dev/null
+++ b/.config/bspwm/bspwmrc
@@ -0,0 +1,90 @@
+#! /bin/sh
+
+#░█▀▄░█▀▀░█▀█░█░█░█▄█
+#░█▀▄░▀▀█░█▀▀░█▄█░█░█
+#░▀▀░░▀▀▀░▀░░░▀░▀░▀░▀
+
+bspc monitor LVDS-1 -d 1 2 3 4 5
+bspc monitor HDMI-1 -d 6 7 8 9 0
+
+###---Global Settings---###
+bspc config automatic_scheme alternate
+bspc config initial_polarity second_child
+bspc config pointer_action1 move
+bspc config pointer_action2 resize_side
+bspc config pointer_action2 resize_corner
+bspc config focus_follows_pointer false
+bspc config remove_disabled_monitors true
+bspc config remove_unplugged_monitors true
+bspc config merge_overlapping_monitors true
+bspc config border_width 2
+bspc config window_gap 10
+bspc config split_ratio 0.52
+bspc config borderless_monocle true
+bspc config gapless_monocle true
+bspc config swallow_first_click false
+bspc config pointer_modifier mod1
+#bspc config pointer_action1 resize_side
+#bspc config pointer_action1 resize_corner
+#bspc config pointer_action3 move
+bspc config normal_border_color "#282828"
+bspc config active_border_color "#ebdbb2"
+bspc config focused_border_color "#77dd77"
+bspc config presel_feedback_color "#BF616A"
+#bspc config normal_border_color "#282828"
+#bspc config active_border_color "#ebdbb2"
+#bspc config focused_border_color "#fe8019"
+
+# remove all rules first
+bspc rule -r *:*
+
+bspc rule -a Plank layer=above border=off
+
+
+###---Autostart---####
+pgrep -x sxhkd > /dev/null || sxhkd &
+picom -b --experimental-backends &
+if [[ $(xrandr -q | grep 'HDMI-1 connected') ]]; then
+ xrandr --output LVDS-1 --primary --mode 1366x768 --rotate normal --output HDMI-1 --mode 1920x1080 --rotate normal --right-of LVDS-1
+fi
+xfce4-panel --disable-wm-check &
+"$HOME"/.config/polybar/launch.sh &
+dunst & # notification daemon
+unclutter & # Remove mouse when idle
+nitrogen --force-setter=xinerama --restore &
+bspc rule -a \* rectangle=680x700+340+40
+bspc rule -a '*:*:Picture-in-Picture' state=floating sticky=on layer=above
+bspc rule -a '*:*:Picture in picture' state=floating sticky=on layer=above
+bspc rule -a firefox:Toolkit focus=on state=floating sticky=on layer=above rectangle=320x190+1030+480
+bspc rule -a "https://www.youtube.com - Enhancer for YouTube™ — Mozilla Firefox" state=floating sticky=on layer=above
+bspc rule -a Zathura state=floating
+
+#eww daemon &
+
+# SCRATCHPAD
+bspc rule -a scratch sticky=on state=floating rectangle=575x320+393+370
+
+# Heads Up Display (scratchpad)
+bspc rule -a Heads-Up-Display sticky=on state=floating rectangle=360x160+990+40
+
+[ "$1" = 0 ] && {
+ nm-applet &
+ plank &
+}
+
+pkill xfce4-power-manager; sleep 1 && nice -n 1 xfce4-power-manager &
+pkill volumeicon; sleep 2 && nice -n 2 volumeicon &
+pkill mictray; sleep 2 && nice -n 2 mictray &
+
+bspc subscribe node_state | while read -r _ _ _ _ state flag; do
+ if [[ "$state" != fullscreen ]]; then continue; fi
+ if [[ "$flag" == on ]]; then
+ xdo lower -N Plank
+ else
+ xdo raise -N Plank
+ fi
+done &
+
+xrdb ~/.config/X11/.Xresources &
+
+bspc config external_rules_command ~/.config/bspwm/scripts/external_rules.sh
diff --git a/.config/bspwm/menu.sh b/.config/bspwm/menu.sh
new file mode 100755
index 0000000..f678ae1
--- /dev/null
+++ b/.config/bspwm/menu.sh
@@ -0,0 +1,64 @@
+#!/bin/bash
+
+# Custom Rofi Script
+
+BORDER="#1F1F1F"
+SEPARATOR="#1F1F1F"
+FOREGROUND="#A9ABB0"
+BACKGROUND="#1F1F1F"
+BACKGROUND_ALT="#252525"
+HIGHLIGHT_BACKGROUND="#1A237E"
+HIGHLIGHT_FOREGROUND="#FFFFFF"
+
+BLACK="#000000"
+WHITE="#ffffff"
+RED="#e53935"
+GREEN="#43a047"
+YELLOW="#fdd835"
+BLUE="#1e88e5"
+MAGENTA="#00897b"
+CYAN="#00acc1"
+PINK="#d81b60"
+PURPLE="#8e24aa"
+INDIGO="#3949ab"
+TEAL="#00897b"
+LIME="#c0ca33"
+AMBER="#ffb300"
+ORANGE="#fb8c00"
+BROWN="#6d4c41"
+GREY="#757575"
+BLUE_GREY="#546e7a"
+DEEP_PURPLE="#5e35b1"
+DEEP_ORANGE="#f4511e"
+LIGHT_BLUE="#039be5"
+LIGHT_GREEN="#7cb342"
+
+# Launch Rofi
+rofi -no-lazy-grab -show drun \
+-display-drun "Applications " -drun-display-format "{name}" \
+-hide-scrollbar true \
+-bw 0 \
+-lines 10 \
+-line-padding 10 \
+-padding 20 \
+-width 30 \
+-xoffset 27 -yoffset 60 \
+-location 1 \
+-columns 2 \
+-show-icons -icon-theme "Papirus" \
+-font "Fantasque Sans Mono 10" \
+-color-enabled true \
+-color-window "$BACKGROUND,$BORDER,$SEPARATOR" \
+-color-normal "$BACKGROUND_ALT,$FOREGROUND,$BACKGROUND_ALT,$HIGHLIGHT_BACKGROUND,$HIGHLIGHT_FOREGROUND" \
+-color-active "$BACKGROUND,$MAGENTA,$BACKGROUND_ALT,$HIGHLIGHT_BACKGROUND,$HIGHLIGHT_FOREGROUND" \
+-color-urgent "$BACKGROUND,$YELLOW,$BACKGROUND_ALT,$HIGHLIGHT_BACKGROUND,$HIGHLIGHT_FOREGROUND"
+
+# More Options
+# -fullscreen \
+
+# Theming help
+# color window = background, border, separator
+# color normal = background, foreground, background-alt, highlight-background, highlight-foreground
+# color active = background, foreground, background-alt, highlight-background, highlight-foreground
+# color urgent = background, foreground, background-alt, highlight-background, highlight-foreground
+
diff --git a/.config/bspwm/noswallow b/.config/bspwm/noswallow
new file mode 100644
index 0000000..139597f
--- /dev/null
+++ b/.config/bspwm/noswallow
@@ -0,0 +1,2 @@
+
+
diff --git a/.config/bspwm/scripts/external_rules.sh b/.config/bspwm/scripts/external_rules.sh
new file mode 100755
index 0000000..74fdaa0
--- /dev/null
+++ b/.config/bspwm/scripts/external_rules.sh
@@ -0,0 +1,39 @@
+#!/bin/env bash
+
+#instance=$3
+#[!-z"$3"] && xdo raise -a polybar-bottom_LVDS-1
+#[!-z"$3"] && xdo below -a polybar-bottom_LVDS-1 -t $(xdo id -N Bspwm -n root)
+
+
+#bspc subscribe node_state | while read -r _ _ _ _ state flag; do
+# if [[ "$state" != fullscreen ]]; then continue; fi
+# if [[ "$flag" == on ]]; then
+# xdo lower -N Plank
+# else
+# xdo raise -N Plank
+# fi
+#done &
+#
+#eval $4
+#bspc query -N -d ${desktop:-focused} -n .fullscreen >/dev/null &&
+# echo layer=above
+
+
+#bspc subscribe node_state | while read -r _ _ _ _ state flag; do
+# if [[ "$state" != fullscreen ]]; then continue; fi
+# if [[ "$flag" == on ]]; then
+# xdo lower -a polybar-bottom_LVDS-1
+# else
+# xdo raise -a polybar-bottom_LVDS-1
+# fi
+#done &
+
+# Allow any type of window to ignore fullscreen windows (allow fullscreen to
+# stay)
+wid="$1"
+class="$2"
+instance="$3"
+eval "$4"
+
+[[ "$state" = floating ]] \
+ && echo 'layer=above'
diff --git a/.config/bspwm/swallow b/.config/bspwm/swallow
new file mode 100644
index 0000000..21b7f00
--- /dev/null
+++ b/.config/bspwm/swallow
@@ -0,0 +1,3 @@
+sxiv
+Sxiv
+zathura
diff --git a/.config/bspwm/sysmenu.sh b/.config/bspwm/sysmenu.sh
new file mode 100755
index 0000000..1bdc35e
--- /dev/null
+++ b/.config/bspwm/sysmenu.sh
@@ -0,0 +1,70 @@
+#!/bin/bash
+
+# Custom Rofi Script
+
+BORDER="#1F1F1F"
+SEPARATOR="#1F1F1F"
+FOREGROUND="#A9ABB0"
+BACKGROUND="#1F1F1F"
+BACKGROUND_ALT="#252525"
+HIGHLIGHT_BACKGROUND="#1A237E"
+HIGHLIGHT_FOREGROUND="#FFFFFF"
+
+BLACK="#000000"
+WHITE="#ffffff"
+RED="#e53935"
+GREEN="#43a047"
+YELLOW="#fdd835"
+BLUE="#1e88e5"
+MAGENTA="#00897b"
+CYAN="#00acc1"
+PINK="#d81b60"
+PURPLE="#8e24aa"
+INDIGO="#3949ab"
+TEAL="#00897b"
+LIME="#c0ca33"
+AMBER="#ffb300"
+ORANGE="#fb8c00"
+BROWN="#6d4c41"
+GREY="#757575"
+BLUE_GREY="#546e7a"
+DEEP_PURPLE="#5e35b1"
+DEEP_ORANGE="#f4511e"
+LIGHT_BLUE="#039be5"
+LIGHT_GREEN="#7cb342"
+
+# Launch Rofi
+MENU="$(rofi -no-lazy-grab -sep "|" -dmenu -i -p 'System :' \
+-hide-scrollbar true \
+-bw 0 \
+-lines 4 \
+-line-padding 10 \
+-padding 20 \
+-width 15 \
+-xoffset -27 -yoffset 60 \
+-location 3 \
+-columns 1 \
+-show-icons -icon-theme "Papirus" \
+-font "Fantasque Sans Mono 10" \
+-color-enabled true \
+-color-window "$BACKGROUND,$BORDER,$SEPARATOR" \
+-color-normal "$BACKGROUND_ALT,$FOREGROUND,$BACKGROUND_ALT,$HIGHLIGHT_BACKGROUND,$HIGHLIGHT_FOREGROUND" \
+-color-active "$BACKGROUND,$MAGENTA,$BACKGROUND_ALT,$HIGHLIGHT_BACKGROUND,$HIGHLIGHT_FOREGROUND" \
+-color-urgent "$BACKGROUND,$YELLOW,$BACKGROUND_ALT,$HIGHLIGHT_BACKGROUND,$HIGHLIGHT_FOREGROUND" \
+<<< " Lock| Logout| Reboot| Shutdown")"
+case "$MENU" in
+ *Lock) i3lock -c 282a36 -n ;;
+ *Logout) openbox --exit;;
+ *Reboot) sudo reboot ;;
+ *Shutdown) sudo shutdown -r now
+esac
+
+# More Options
+# -fullscreen \
+
+# Theming help
+# color window = background, border, separator
+# color normal = background, foreground, background-alt, highlight-background, highlight-foreground
+# color active = background, foreground, background-alt, highlight-background, highlight-foreground
+# color urgent = background, foreground, background-alt, highlight-background, highlight-foreground
+
diff --git a/.config/bspwm/terminals b/.config/bspwm/terminals
new file mode 100644
index 0000000..414337e
--- /dev/null
+++ b/.config/bspwm/terminals
@@ -0,0 +1 @@
+Alacritty