From 9a50ab1c1ac7bfe205aea4ea5bcaad65ce1278d3 Mon Sep 17 00:00:00 2001 From: ziro Date: Sat, 11 Apr 2020 18:55:14 +0700 Subject: [PATCH] + Added bspwm, sxhkd, and polybar --- .config/bspwm/bspwmrc | 76 +++ .config/polybar/config | 583 +++++++++++++++++++ .config/polybar/launch.sh | 13 + .config/polybar/scripts/cmus.sh | 15 + .config/polybar/scripts/cnext.sh | 7 + .config/polybar/scripts/cprev.sh | 7 + .config/polybar/scripts/player-cmus.sh | 38 ++ .config/polybar/scripts/player-mpris-tail.py | 527 +++++++++++++++++ .config/polybar/scripts/pulseaudio-tail.sh | 66 +++ .config/polybar/scripts/spotify.sh | 25 + .config/polybar/scripts/spotnext.sh | 11 + .config/polybar/scripts/spotprev.sh | 11 + .config/polybar/scripts/updates.sh | 21 + .config/sxhkd/sxhkdrc | 158 +++++ 14 files changed, 1558 insertions(+) create mode 100755 .config/bspwm/bspwmrc create mode 100755 .config/polybar/config create mode 100755 .config/polybar/launch.sh create mode 100755 .config/polybar/scripts/cmus.sh create mode 100755 .config/polybar/scripts/cnext.sh create mode 100755 .config/polybar/scripts/cprev.sh create mode 100755 .config/polybar/scripts/player-cmus.sh create mode 100755 .config/polybar/scripts/player-mpris-tail.py create mode 100755 .config/polybar/scripts/pulseaudio-tail.sh create mode 100755 .config/polybar/scripts/spotify.sh create mode 100755 .config/polybar/scripts/spotnext.sh create mode 100755 .config/polybar/scripts/spotprev.sh create mode 100755 .config/polybar/scripts/updates.sh create mode 100755 .config/sxhkd/sxhkdrc diff --git a/.config/bspwm/bspwmrc b/.config/bspwm/bspwmrc new file mode 100755 index 0000000..a26d37e --- /dev/null +++ b/.config/bspwm/bspwmrc @@ -0,0 +1,76 @@ +#! /bin/dash + +sxhkd & +xsetroot -cursor_name left_ptr & +nitrogen --restore & +compton & +$HOME/.scripts/launch-conky.sh & +$HOME/.config/polybar/launch.sh & + +bspc monitor -d 1 2 3 4 5 6 7 8 9 10 + +primaryB = "#60C0FF" + +bspc config border_width 2 +bspc config focused_border_color "#60C0FF" +#bspc config normal_border_color $BORDER_NORMAL_COLOR +#bspc config active_border_color $BORDER_NORMAL_COLOR +bspc config active_border_color "#60C0ff" +#bspc config normal_border_color +bspc config window_gap 10 +bspc config top_padding 30 +bspc config bottom_padding 0 +bspc config left_padding 0 +bspc config right_padding 0 +bspc config single_monocle false +bspc config click_to_focus true +bspc config split_ratio 0.50 +bspc config borderless_monocle true +bspc config gapless_monocle true +bspc config focus_by_distance true +bspc config focus_follows_pointer true +bspc config history_aware_focus true +bspc config remove_disabled_monitors true +bspc config merge_overlapping_monitors true +bspc config pointer_modifier mod4 +bspc config pointer_action1 move +bspc config pointer_action2 resize_side +bspc config pointer_action3 resize_corner + +bspc rule -a Gimp desktop='^8' state=floating follow=on +bspc rule -a firefox desktop='^2' +bspc rule -a obs desktop='^3' +bspc rule -a URxvt:cmus desktop='^4' +bspc rule -a spotify desktop='^4' +bspc rule -a Spotify desktop='^4' +bspc rule -a mplayer2 state=floating +bspc rule -a Kupfer.py focus=on +bspc rule -a Screenkey manage=off +bspc rule -a Kodi desktop='^3' +bspc rule -a feh state=floating +bspc rule -a lxappearance state=floating +bspc rule -a Lxappearance state=floating +bspc rule -a Steam desktop='^6' +bspc rule -a steam desktop='^6' +bspc rule -a gravitdesigner desktop='^8' state=floating +bspc rule -a GravitDesigner desktop='^8' state=floating +bspc rule -a electronplayer desktop='^3' +bspc rule -a mcpelauncher-client desktop='^6' state=monocle +bspc rule -a citra-qt desktop='^6' +bspc rule -a Citra desktop='^6' +bspc rule -a Citra:citra-qt desktop='^6' +bspc rule -a org-tlauncher-tlauncher-rmo-TLauncher:sun-awt-X11-XFramePeer desktop='^6' +bspc rule -a org-tlauncher-tlauncher-rmo-TLauncher desktop='^6' +bspc rule -a PCSX2 desktop='^6' +bspc rule -a whatsapp-nativefier-d52542 desktop='^9' +bspc rule -a TelegramDesktop:telegram-desktop desktop='^9' +bspc rule -a Brave-browser:brave-browser desktop='^2' +bspc rule -a Code:code desktop='^5' +bspc rule -a Wine:photoshop.exe desktop='^8' +bspc rule -a File-roller:file-roller state=floating +bspc rule -a PacketTracer7:PacketTracer7 desktop='^7' state=floating +bspc rule -a discord:discord desktop='^9' +bspc rule -a qTox:qtox desktop='^9' +bspc rule -a pr:pr desktop='^10' +bspc rule -a firefox:Toolkit desktop='^3' state=floating +bspc rule -a mpv:gl state=floating diff --git a/.config/polybar/config b/.config/polybar/config new file mode 100755 index 0000000..8ece062 --- /dev/null +++ b/.config/polybar/config @@ -0,0 +1,583 @@ +[global/wm] +;https://github.com/jaagr/polybar/wiki/Configuration#global-wm-settings +margin-top = 0 +margin-bottom = 0 + +[settings] +;https://github.com/jaagr/polybar/wiki/Configuration#application-settings +throttle-output = 5 +throttle-output-for = 10 +throttle-input-for = 30 +screenchange-reload = true +compositing-background = over +compositing-foreground = over +compositing-overline = over +compositing-underline = over +compositing-border = over +enable-ipc = true + +; Define fallback values used by all module formats +format-foreground = #FF0000 +format-background = #00FF00 +format-underline = +format-overline = +format-spacing = +format-padding = +format-margin = +format-offset = + +[colors] +; My Scheme theme ============ +; D = Darker Color +; L = Lighter Color +background = #2f3640 +foreground = #f5f6fa +foregroundD = #2f3640 +primary = #37b0ff +primaryL1 = #60C0FF +primaryL2 = #8DD2FE +primaryD1 = #0EA0FF +primaryD2 = #0299FB +secondary1 = #4466ff +secondary1L1 = #6B85FF +secondary1L2 = #95A8FE +secondary1D1 = #1D45FF +secondary2 = #2affb9 +secondary2D1 = #00FFAB +secondary2D3 = #00C282 +alert = #e84118 +volume-min = #a3be8c +volume-med = #ebcb8b +volume-max = #bf616a +; ======================= + +[bar/bspwm] +;monitor = ${env:MONITOR} +;monitor-fallback = HDMI1 +width = 100% +height = 30 +;offset-x = 1% +;offset-y = 1% +radius = 0.0 +fixed-center = true +bottom = false +separator = + +background = ${colors.background} +foreground = ${colors.foreground} + +line-size = 2 +line-color = #f00 + +wm-restack = bspwm +override-redirect = true + +; Enable support for inter-process messaging +; See the Messaging wiki page for more details. +enable-ipc = true + +border-size = 0 +;border-left-size = 0 +;border-right-size = 25 +;border-top-size = 0 +;border-bottom-size = 25 +border-color = #00000000 + +;padding-left = +;padding-right = + +module-margin-left = 0 +module-margin-right = 0 + +;https://github.com/jaagr/polybar/wiki/Fonts +font-0 = "UbuntuMono Nerd Font:size=10;2" +font-1 = "UbuntuMono Nerd Font:size=16;3" +font-2 = "Sarasa Term J:bold:size=9;2" +font-3 = "Nimbus Sans:bold:size=9;2" +font-4 = "Iosevka Nerd Font:bold:size=9;2" +font-5 = "FontAwesome5Free:bold:style=solid:size=9;2" + +; ---------------------------------------------------------------------------------------- +modules-left = previous player-mpris player-mpris-tail mpd volume +modules-center = bspwm +modules-right = wirednetwork temp battery updates date prompt +; ---------------------------------------------------------------------------------------- + +tray-detached = false +tray-offset-x = 0 +tray-offset-y = 0 +tray-position = left +tray-padding = 2 +tray-maxsize = 13 +tray-scale = 1.0 +tray-background = ${colors.secondary1D1} + +scroll-up = bspwm-desknext +scroll-down = bspwm-deskprev + +# ----- Module ----- +[module/bspwm] +type = internal/bspwm + +enable-click = true +enable-scroll = true +reverse-scroll = true +pin-workspaces = true + +ws-icon-0 = 1; +ws-icon-1 = 2; +ws-icon-2 = 3;喇 +ws-icon-3 = 4;ﱘ +ws-icon-4 = 5; +ws-icon-5 = 6; +ws-icon-6 = 7; +ws-icon-7 = 8; +ws-icon-8 = 9; +ws-icon-9 = 10; +ws-icon-default = " " + +format-font = 5 +format = +format-background = #434758 +format-padding = 2 + +label-focused = %icon% +;label-focused-background = #434758 +;label-focused-underline= +label-focused-padding = 1 +label-focused-foreground = ${colors.primary} + +label-occupied = %icon% +;label-occupied-underline = #00a8ff +label-occupied-padding = 1 +;label-occupied-background = #434758 + +label-urgent = %icon% +label-urgent-padding = 1 + +label-empty = %icon% +label-empty-foreground = #7f8fa6 +label-empty-padding = 1 +;label-empty-underline = #7f8fa6 +;label-empty-background = #434758 + +label-monocle = "ﬕ" +label-monocle-padding = 2 +;label-monocle-background = #0097e6 +label-monocle-foreground = ${colors.foreground} +label-tiled = "﩯" +label-tiled-padding = 2 +;label-tiled-background = #0097e6 +label-tiled-foreground = ${colors.foreground} +label-fullscreen = "" +label-fullscreen-padding = 2 +;label-fullscreen-background = #0097e6 +label-fullscreen-foreground = ${colors.foreground} +label-floating = "" +label-floating-padding = 2 +;label-floating-background = #0097e6 +label-floating-foreground = ${colors.foreground} +label-pseudotiled = "" +label-pseudotiled-padding = 2 +;label-pseudotiled-background = #0097e6 +label-pseudotiled-foreground = ${colors.foreground} +label-locked = "  " +label-locked-foreground = ${colors.foreground} +label-sticky = "  " +label-sticky-foreground = ${colors.foreground} +label-private = "  " +label-private-foreground = ${colors.foreground} + +; Separator in between workspaces +;label-separator = | +;label-separator-padding = 10 +;label-separator-foreground = #ffb52a + +format-foreground = ${colors.foreground} +;format-background = ${colors.background} + +# ----- XWindow ----- +[module/xwindow] +;https://github.com/jaagr/polybar/wiki/Module:-xwindow +type = internal/xwindow + +; Available tokens: +; %title% +; Default: %title% +label-font = 3 +label = %title% +label-maxlen = 50 + +format-prefix = " " +format-foreground = ${colors.foreground} +format-background = ${colors.background} + +# ----- Spotify ----- +[module/spotify] +;https://github.com/NicholasFeldman/dotfiles/blob/master/polybar/.config/polybar/spotify.sh +type = custom/script +#exec = ~/.config/polybar/scripts/spotify.sh +interval = 1 +click-left = "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause" + +;format =