diff --git a/install.sh b/install.sh index 4a2bf38..74cb82f 100755 --- a/install.sh +++ b/install.sh @@ -3,8 +3,7 @@ DIR="$(realpath "$(dirname "$0")")" if ! grep 'Pop!_OS' /etc/os-release > /dev/null 2>&1; then - echo "This is not Pop!_OS, exiting..." - exit + echo "This is not Pop!_OS..." fi # script must start at home directory @@ -125,7 +124,7 @@ neovim_fonts() { wm() { sudo add-apt-repository -y ppa:papirus/papirus - sudo apt update && sudo apt install -y i3 polybar nitrogen feh picom rofi stow papirus-icon-theme conky + sudo apt update && sudo apt install -y i3 polybar nitrogen feh picom rofi stow papirus-icon-theme conky dmenu scrot # installing siji mkdir -p "$HOME/repos/siji" cd "$HOME/repos/siji" || exit 1 diff --git a/polybar/.config/polybar/config.ini b/polybar/.config/polybar/config.ini index 8b9b3fc..c0f3f61 100644 --- a/polybar/.config/polybar/config.ini +++ b/polybar/.config/polybar/config.ini @@ -55,19 +55,24 @@ cursor-click = pointer cursor-scroll = ns-resize enable-ipc = true -[bar/workspaces] +[bar/workspaces-roleless] width = 370 inherit = bar/base modules-center = xworkspaces-roleless -[bar/top] +[bar/workspaces-role] +width = 370 +inherit = bar/base +modules-center = xworkspaces-role + +[bar/bottom] width = 500 offset-x = 100%:-500 inherit = bar/base modules-left = date modules-right = eth wlan -[bar/bottom] +[bar/top] inherit = bar/base bottom = true width = 100% @@ -127,9 +132,13 @@ label-empty =  type = internal/xworkspaces inherit = module/workspaces +format = + label-active = %icon% +label-active-foreground = ${colors.background} label-active-underline = ${colors.primary-underline} label-occupied = %icon% +label-occupied-foreground = ${colors.background} label-urgent = %icon% label-empty-foreground = ${colors.disabled} label-empty = %icon% @@ -186,8 +195,11 @@ format-muted-background = ${colors.primary} format-volume-foreground = ${colors.background} format-muted-foreground = ${colors.background} format-volume-alignment = center +format-volume-spacing = 1 -format-volume = +format-volume = " " +label-volume-foreground = ${colors.background} +label-volume = %percentage:2%% bar-volume-width = 12 bar-volume-padding = 1 diff --git a/polybar/.config/polybar/launch.role.sh b/polybar/.config/polybar/launch.role.sh new file mode 100755 index 0000000..4d78688 --- /dev/null +++ b/polybar/.config/polybar/launch.role.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +if test "$1" = "-r"; then + RELOAD=1 + echo "Hot reload..." +else + RELOAD= +fi + +pkill polybar + +bar() { + if test -z "$RELOAD"; then + polybar -c "$HOME/.config/polybar/config.ini" "$@" & + else + polybar -r -c "$HOME/.config/polybar/config.ini" -l warning "$@" & + fi +} + +bar top +bar workspaces-role +bar bottom diff --git a/polybar/.config/polybar/launch.sh b/polybar/.config/polybar/launch.sh index fc6aa2c..4ce120b 100755 --- a/polybar/.config/polybar/launch.sh +++ b/polybar/.config/polybar/launch.sh @@ -18,5 +18,5 @@ bar() { } bar top -bar workspaces +bar workspaces-roleless bar bottom diff --git a/wm/.config/berry/kill.sh b/wm/.config/berry/kill.sh new file mode 100755 index 0000000..fb537e8 --- /dev/null +++ b/wm/.config/berry/kill.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +QUIT=$(printf "No\nYes" | dmenu -i -p "Are you sure u want to kill bspwm?") + +if test "$QUIT" == "Yes" ; then + pkill berry +fi diff --git a/wm/.config/berry/sxhkdrc b/wm/.config/berry/sxhkdrc index 51fad6e..a2caedf 100755 --- a/wm/.config/berry/sxhkdrc +++ b/wm/.config/berry/sxhkdrc @@ -58,7 +58,7 @@ super + {Tab,r} berryc cycle_focus super + shift + e - killall berry + ~/.config/berry/kill.sh super + shift + q berryc window_close diff --git a/wm/.config/bspwm/bspwmrc b/wm/.config/bspwm/bspwmrc new file mode 100755 index 0000000..fe82994 --- /dev/null +++ b/wm/.config/bspwm/bspwmrc @@ -0,0 +1,47 @@ +#!/bin/sh + +xrandr -s 1920x1080 + +pgrep -x sxhkd > /dev/null || sxhkd -c ~/.config/bspwm/sxhkdrc & +pkill conky; conky -d +feh --bg-fill /usr/share/backgrounds/pop/jared-evans-119758.jpg +pkill picom; picom --corner-radius 15 & +~/.config/polybar/launch.role.sh & + + +bspc monitor -d 0 1 2 3 4 5 6 7 8 + +bspc config border_width 2 +bspc config window_gap 12 + +bspc config top_padding 25 +bspc config split_ratio 0.50 +bspc config borderless_monocle true +bspc config gapless_monocle true + +bspc rule -a Alacritty desktop='^1' +bspc rule -a Kitty desktop='^1' + +bspc rule -a "Brave-browser" desktop='^2' +bspc rule -a "Tor Browser" desktop='^2' +bspc rule -a "torbrowser" desktop='^2' +bspc rule -a "firefox" desktop='^2' + +bspc rule -a "discord" desktop='^4' +bspc rule -a "Skype" desktop='^4' +bspc rule -a "zoom" desktop='^4' state=floating +bspc rule -a "Signal" desktop='^4' +bspc rule -a "GStreamer" desktop='^4' + +bspc rule -a "Code" desktop='^3' +bspc rule -a "jetbrains" desktop='^3' +bspc rule -a "sublime" desktop='^3' +bspc rule -a "Pulsar" desktop='^3' + +bspc rule -a "Virt-manager" desktop='^5' + +bspc rule -a "cantata" desktop='^6' +bspc rule -a "youtube-music" desktop='^6' + +bspc rule -a "Blueberry.py" desktop='^7' +bspc rule -a "control-center" desktop='^7' diff --git a/wm/.config/bspwm/kill.sh b/wm/.config/bspwm/kill.sh new file mode 100755 index 0000000..afc7890 --- /dev/null +++ b/wm/.config/bspwm/kill.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +QUIT=$(printf "No\nYes" | dmenu -i -p "Are you sure u want to kill bspwm?") + +if test "$QUIT" == "Yes" ; then + pkill bspwm +fi diff --git a/wm/.config/bspwm/sxhkdrc b/wm/.config/bspwm/sxhkdrc new file mode 100644 index 0000000..e658405 --- /dev/null +++ b/wm/.config/bspwm/sxhkdrc @@ -0,0 +1,171 @@ +# +# wm independent hotkeys +# vim:ft=conf +# + +# terminal emulator +super + shift + Return + alacritty -e tmux + +super + shift + a + alacritty +# browser +super + shift + w + brave-browser + +# program launcher +super + space + rofi -show drun + +super + w + rofi -show window + +# make sxhkd reload its configuration files: +super + Escape + pkill -USR1 -x sxhkd + +super + e + mt + +# +# bspwm hotkeys +# + +# quit/restart bspwm +super + shift + r + bspc wm -r + +super + shift + e + ~/.config/bspwm/kill.sh + +# close and kill + +super + shift + q + bspc node -c + +# alternate between the tiled and monocle layout +super + m + bspc desktop -l next + +# send the newest marked node to the newest preselected node +super + y + bspc node newest.marked.local -n newest.!automatic.local + +# swap the current node and the biggest window +super + g + bspc node -s biggest.window + +# +# state/flags +# + +# set the window state +super + {t,shift + t,s,f} + bspc node -t {tiled,pseudo_tiled,floating,fullscreen} + +# set the node flags +super + ctrl + {m,x,y,z} + bspc node -g {marked,locked,sticky,private} + +# +# focus/swap +# + +# focus the node in the given direction +super + {_,shift + }{h,j,k,l} + bspc node -{f,s} {west,south,north,east} + +# focus the node for the given path jump +#super + {p,b,comma,period} +# bspc node -f @{parent,brother,first,second} + +# focus the next/previous window in the current desktop +super + {_,shift + }c + bspc node -f {next,prev}.local.!hidden.window + +# focus the next/previous desktop in the current monitor +super + bracket{left,right} + bspc desktop -f {prev,next}.local + +# focus the last node/desktop +super + {grave,Tab} + bspc {node,desktop} -f last + +# focus the older or newer node in the focus history +super + {o,i} + bspc wm -h off; \ + bspc node {older,newer} -f; \ + bspc wm -h on + +# focus or send to the given desktop +super + {_,shift + }{1-9,0} + bspc {desktop -f,node -d} '^{1-9,10}' + +# +# preselect +# + +# preselect the direction +super + ctrl + {h,j,k,l} + bspc node -p {west,south,north,east} + +# preselect the ratio +super + ctrl + {1-9} + bspc node -o 0.{1-9} + +# cancel the preselection for the focused node +super + ctrl + space + bspc node -p cancel + +# cancel the preselection for the focused desktop +super + ctrl + shift + space + bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel + +# +# move/resize +# + +# expand a window by moving one of its side outward +super + alt + {h,j,k,l} + bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0} + +# contract a window by moving one of its side inward +super + alt + shift + {h,j,k,l} + bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0} + +# move a floating window +super + {Left,Down,Up,Right} + bspc node -v {-20 0,0 20,0 -20,20 0} + +#fn + {F8,F9} +# brightnessctl set {10%-,10%+} + + +# old alt keybindings +# +alt + {Left,Right} + brightnessctl set {10%-,10%+} + +alt + {Up,Down} + pamixer set-sink-volume 0 {+,-}5% + +# audio stuff +XF86AudioRaiseVolume + pamixer set-sink-volume 0 +5% + +XF86AudioLowerVolume + pamixer set-sink-volume 0 -5% + +XF86AudioMute + pactl set-sink-mute 0 toggle + +# brightness stuff +{XF86MonBrightnessUp,XF86MonBrightnessDown} + brightnessctl set {10%+,10%-} + +# screenshot capability +super + shift + s + mkdir -p ~/screenshots && scrot ~/screenshots/%Y-%m-%d-%T-screenshot.png + +Print + mkdir -p ~/screenshots && scrot ~/screenshots/%Y-%m-%d-%T-screenshot.png