From e6f148cb3398c5bd3a760f8eb13184b84230ca62 Mon Sep 17 00:00:00 2001 From: clint Date: Sun, 10 Apr 2022 19:31:15 -0500 Subject: [PATCH] polybar and other stuff --- cava/.config/cava/config | 2 +- i3/.config/i3/config | 113 +++++++++++---- i3blocks/.config/i3blocks/config | 38 ++++-- polybar/.config/polybar/config.ini | 212 +++++++++++++++++++++++++++++ polybar/.config/polybar/launch.sh | 21 +++ zsh/.zshrc | 13 +- 6 files changed, 358 insertions(+), 41 deletions(-) create mode 100644 polybar/.config/polybar/config.ini create mode 100755 polybar/.config/polybar/launch.sh diff --git a/cava/.config/cava/config b/cava/.config/cava/config index f57b883..54a3360 100644 --- a/cava/.config/cava/config +++ b/cava/.config/cava/config @@ -137,7 +137,7 @@ # background must also be defined in hex or remain commented out. 1 = on, 0 = off. # You can define as many as 8 different colors. They range from bottom to top of screen gradient = 1 -; gradient_count = 8 + gradient_count = 8 ; gradient_color_1 = '#59cc33' ; gradient_color_2 = '#80cc33' ; gradient_color_3 = '#a6cc33' diff --git a/i3/.config/i3/config b/i3/.config/i3/config index 91425db..1c1ef92 100644 --- a/i3/.config/i3/config +++ b/i3/.config/i3/config @@ -52,8 +52,8 @@ bindsym $mod+Shift+q kill bindsym $mod+q kill # start dmenu (a program launcher) -# bindsym $mod+d exec --no-startup-id dmenu_run -bindsym $mod+d exec "rofi -show run" +bindsym $mod+d exec --no-startup-id dmenu_run +# bindsym $mod+d exec "rofi -show run" # A more modern dmenu replacement is rofi: # bindcode $mod+40 exec "rofi -modi drun,run -show drun" @@ -95,9 +95,9 @@ bindsym $mod+v split v bindsym $mod+f fullscreen toggle # change container layout (stacked, tabbed, toggle split) -bindsym $mod+s layout stacking -bindsym $mod+w layout tabbed -bindsym $mod+e layout toggle split +# bindsym $mod+s layout stacking +# bindsym $mod+w layout tabbed +# bindsym $mod+e layout toggle split # toggle tiling / floating bindsym $mod+Shift+space floating toggle @@ -113,16 +113,28 @@ bindsym $mod+a focus parent # Define names for default workspaces for which we configure key bindings later on. # We use variables to avoid repeating the names in multiple places. -set $ws1 "いち" -set $ws2 "に" -set $ws3 "さん" + +#set $ws1 "1:一" +#set $ws2 "2:二" +#set $ws3 "3:三" +#set $ws4 "4:四" +#set $ws5 "5:五" +#set $ws6 "6:六" +#set $ws7 "7:七" +#set $ws8 "8:八" +#set $ws9 "9:九" +#set $ws10 "10:十" + +set $ws1 "1" +set $ws2 "2" +set $ws3 "3" set $ws4 "4" set $ws5 "5" set $ws6 "6" set $ws7 "7" set $ws8 "8" set $ws9 "9" -set $ws10 "10" +set $ws10 "0" # switch to workspace bindsym $mod+1 workspace number $ws1 @@ -149,9 +161,19 @@ bindsym $mod+Shift+9 move container to workspace number $ws9 bindsym $mod+Shift+0 move container to workspace number $ws10 # tryin some stuff, not sure if this is what i want -#workspace $ws1 output HDMI-0 -#workspace $ws2 output HDMI-1 -#workspace $ws3 output HDMI-1 +workspace $ws1 output HDMI-0 +workspace $ws2 output HDMI-1 +workspace $ws3 output HDMI-1 +workspace $ws4 output HDMI-1 + +# set which programs open in which workspaces +# to find the class, run xprop in a terminal and click on a program +#assign [class="Alacritty"] $ws1 +assign [class="firefox"] $ws2 +assign [class="Gimp"] $ws3 + +# these programs will float +for_window [class="kcalc"] floating enable # reload the configuration file bindsym $mod+Shift+c reload @@ -189,16 +211,40 @@ bindsym $mod+r mode "resize" # Start i3bar to display a workspace bar (plus the system information i3status # finds out, if available) -bar { - position top - status_command i3blocks - output HDMI-0 - output HDMI-1 - font pango:DejaVu Sans Mono 10 -} + +# bar color definitions +set $bar-text #ADF1D2 +set $bar-background #231c1c +set $bar-statusline #eeeeee +set $bar-separator #eeeeee +set $bar-focused_workspace #553555 +set $bar-inactive_workspace #755B69 + +#bar { +# position top +# strip_workspace_numbers yes +# status_command i3blocks +# output HDMI-0 +# output HDMI-1 +# font pango:Hack 10 +# +# colors { +# background $bar-background +# statusline $bar-statusline +# separator $bar-separator +# +# # class border background text +# focused_workspace $bar-focused_workspace $bar-focused_workspace $bar-text +# active_workspace $bar-inactive_workspace $bar-inactive_workspace $bar-text +# inactive_workspace #333333 #222222 #888888 +# urgent_workspace #2f343a #900000 #ffffff +# binding_mode #2f343a #900000 #ffffff +# } +#} # set background on startup -exec --no-startup-id feh --bg-fill ~/Pictures/trees_mountain.jpg +set $wallpaper ~/Pictures/wallpapers/trees_mountain.jpg +exec --no-startup-id feh --bg-fill $wallpaper # turn picom on on start up exec_always --no-startup-id picom & @@ -207,16 +253,31 @@ exec_always --no-startup-id picom & for_window [class=".*"] border pixel 1 # gaps -gaps inner 15 +gaps inner 10 # messin with colors # set $bd-color #ff004b set $bd-color #1de071 +set $bd-indicator #d42069 -# colorclass border bg text indicator child_border -client.focused $bd-color #111111 #ffffff $bd-color $bd-color -client.focused_inactive $bd-color #111111 #ffffff $bd-color #333333 -client.unfocused $bd-color #111111 #ffffff $bd-color #333333 +# colorclass border bg text indicator child_border +client.focused $bd-color #111111 #ffffff $bd-indicator $bd-color +client.focused_inactive $bd-color #111111 #ffffff #333333 #333333 +client.unfocused $bd-color #111111 #ffffff #333333 #333333 # lock screen -bindsym $mod+l exec ~/lock.sh +bindsym $mod+l exec ~/.scripts/lock.sh + +# dmenu stuff +bindsym $mod+c exec ~/.scripts/dmenu_configs.sh +bindsym $mod+p exec ~/.scripts/dmenu_wallpaper.sh +bindsym $mod+x exec ~/.scripts/dmenu_shutdown.sh + +# common programs +bindsym $mod+Shift+w exec firefox +bindsym $mod+g exec gimp +bindsym $mod+m workspace $ws4; exec spotifyd; exec alacritty -e spt +bindsym $mod+Shift+m exec killall spt; exec killall spotifyd + +# polybar +exec_always --no-startup-id $HOME/.config/polybar/launch.sh diff --git a/i3blocks/.config/i3blocks/config b/i3blocks/.config/i3blocks/config index 0608bba..844d591 100644 --- a/i3blocks/.config/i3blocks/config +++ b/i3blocks/.config/i3blocks/config @@ -1,22 +1,40 @@ -[packages] -command=~/.scripts/i3blocks/pacman.sh +[pacman] +command=~/.scripts/i3_pacman.sh interval=3600 -[weather] -command=~/.scripts/i3blocks/weather.sh +[spotifyd] +command=ps aux | grep spotifyd | wc -l +interval=5 + +[finance] +command=~/.scripts/i3_finance.sh +interval=3000 +color=#00b7ff + +[cpu] +command=~/.scripts/i3_cpu.sh +interval=3600 +color=#A4C2F4 + +[mem] +command=~/.scripts/i3_mem.sh interval=3600 color=#A4C2F4 [ip] -command=~/.scripts/i3blocks/ip.sh +command=~/.scripts/i3_ip.sh interval=once -color=#91E78Bcolor=#A4C2F4 +color=#91E78B [wifi] -command=~/.scripts/i3blocks/wifi.sh +command=~/.scripts/i3_wifi.sh interval=3600 -[time] -command=date | awk '{ print "📅 " $0 }' -interval=5 +[weather] +command=~/.scripts/i3_weather.sh +interval=3600 +color=#C9E42E +[time] +command=~/.scripts/i3_cal.sh +interval=5 diff --git a/polybar/.config/polybar/config.ini b/polybar/.config/polybar/config.ini new file mode 100644 index 0000000..14bde3a --- /dev/null +++ b/polybar/.config/polybar/config.ini @@ -0,0 +1,212 @@ +;========================================================== +; +; +; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗ +; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗ +; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝ +; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗ +; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║ +; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ +; +; +; To learn more about how to configure Polybar +; go to https://github.com/polybar/polybar +; +; The README contains a lot of information +; +;========================================================== + +[colors2] +background = #806DAEDB +background-alt = #173753 +background-inactive = #806DAEDB +foreground = #000000 +foreground-alt = #fff +primary = #ffb52a +secondary = #e60053 +alert = #bd2c40 + +[colors] +background = #00553555 +background-alt = #50553555 +background-inactive = #50755B69 +foreground = #000000 +foreground-alt = #fff +primary = #ffb52a +secondary = #e60053 +alert = #bd2c40 + +[bar/example] +;monitor = ${env:MONITOR:HDMI-1} +width = 100% +height = 27 +;offset-x = 1% +;offset-y = 1% +radius = 0.0 +fixed-center = false + +background = ${colors.background} +foreground = ${colors.foreground} + +line-size = 3 +line-color = #f00 + +border-size = 0 +border-color = #00000000 + +padding-left = 0 +padding-right = 2 + +module-margin-left = 1 +module-margin-right = 2 + +font-0 = fixed:pixelsize=10;1 +font-1 = Source Han Sans JP,源ノ角ゴシック JP:style=Regular +font-2 = NotoSansMono Nerd Font:style=Regular +font-3 = FontAwesome6Free + +modules-left = i3 +modules-center = +modules-right = pacman finance memory cpu filesystem wireless-network weather date + +tray-position = right +tray-padding = 2 +;tray-background = #0063ff + +;wm-restack = bspwm +;wm-restack = i3 + +;override-redirect = true + +;scroll-up = bspwm-desknext +;scroll-down = bspwm-deskprev + +;scroll-up = i3wm-wsnext +;scroll-down = i3wm-wsprev + +cursor-click = pointer +cursor-scroll = ns-resize + +[module/i3] +type = internal/i3 +format = +index-sort = true +wrapping-scroll = false +strip-wsnumbers = true +; Only show workspaces on the same output as the bar +;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 = 0;十 + +label-mode-padding = 1 +label-mode-foreground = #000 +label-mode-background = ${colors.primary} + +; focused = Active workspace on focused monitor +label-focused = %icon% +label-focused-background = ${colors.background-alt} +label-focused-foreground = ${colors.foreground-alt} +label-focused-underline= ${colors.primary} +label-focused-padding = 1 + +; unfocused = Inactive workspace on any monitor +label-unfocused = %icon% +label-unfocused-background = ${colors.background-inactive} +label-unfocused-underline= ${colors.primary} +label-unfocused-padding = 1 + +; visible = Active workspace on unfocused monitor +label-visible = %icon% +label-visible-background = ${self.label-focused-background} +label-visible-foreground = ${colors.foreground-alt} +label-visible-underline = ${self.label-focused-underline} +label-visible-padding = ${self.label-focused-padding} + +; urgent = Workspace with urgency hint set +label-urgent = %icon% +label-urgent-background = ${colors.alert} +label-urgent-padding = 2 + +; Separator in between workspaces +;label-separator = | + +[module/date] +type = internal/date +interval = 1.0 +date = 📅 %A, %B %d, %Y %I:%M:%S %p + +[module/filesystem] +type = internal/fs +interval = 60 + +mount-0 = / +mount-1 = /home + +label-mounted =  %mountpoint%: %percentage_used%% +;label-unmounted = %mountpoint% not mounted +;label-unmounted-foreground = ${colors.foreground-alt} + +; Separator in between workspaces +label-separator = | + +[module/cpu] +type = internal/cpu +interval = 10 +warn-percentage = 95 +label =  CPU %percentage%% + +[module/memory] +type = internal/memory +interval = 10 +warn-percentage = 95 +format =