From a922f9e4a8620b4fa725dc61af0bd76a337a7ef3 Mon Sep 17 00:00:00 2001 From: Dhanus M Lal Date: Fri, 1 Jul 2022 11:50:33 +0530 Subject: [PATCH] polybar added for arch install --- .bashrc | 6 +- .vimrc | 12 ++ i3/config | 43 +++-- polybar/config.ini | 211 +++++++++++++++++++++++++ polybar/launch.sh | 15 +- .Xresources.pop => pop/.Xresources.pop | 0 .bashrc.pop => pop/.bashrc.pop | 0 .vimrc.pop => pop/.vimrc.pop | 0 {i3.pop => pop/i3.pop}/config | 0 {i3.pop => pop/i3.pop}/i3blocks.conf | 0 {i3.pop => pop/i3.pop}/screenshot | 0 {polybar => pop/polybar.pop}/config | 0 pop/polybar.pop/launch.sh | 13 ++ 13 files changed, 276 insertions(+), 24 deletions(-) create mode 100644 polybar/config.ini rename .Xresources.pop => pop/.Xresources.pop (100%) rename .bashrc.pop => pop/.bashrc.pop (100%) rename .vimrc.pop => pop/.vimrc.pop (100%) rename {i3.pop => pop/i3.pop}/config (100%) rename {i3.pop => pop/i3.pop}/i3blocks.conf (100%) rename {i3.pop => pop/i3.pop}/screenshot (100%) rename {polybar => pop/polybar.pop}/config (100%) create mode 100755 pop/polybar.pop/launch.sh diff --git a/.bashrc b/.bashrc index 0f87619..f558275 100644 --- a/.bashrc +++ b/.bashrc @@ -9,8 +9,12 @@ alias ls='ls --color=auto' alias grep='grep --color=auto' alias fgrep='fgrep --color=auto' alias egrep='egrep --color=auto' +alias ll='ls -alF' +alias la='ls -A' +alias l='ls -CF' -PS1="[\[\e[01;32m\]\u@\h \[\e[00;33m\]\W\[\e[00m\]]\$ " +# PS1="[\[\e[01;32m\]\u@\h \[\e[00;33m\]\W\[\e[00m\]]\$ " +PS1="[\[\e[00;33m\]\w\[\e[00m\]]\$ " # default # PS1='[\u@\h \W]\$ ' diff --git a/.vimrc b/.vimrc index 3237f0f..288472f 100644 --- a/.vimrc +++ b/.vimrc @@ -7,6 +7,18 @@ set tabstop=4 softtabstop=4 set autoindent set incsearch +call plug#begin('~/.vim/plugged') + Plug 'tpope/vim-fugitive' + Plug 'vim-airline/vim-airline' + Plug '/vim-airline/vim-airline-themes' + Plug 'Raimondi/delimitMate' + Plug 'vim-syntastic/syntastic' + Plug 'ryanoasis/vim-devicons' + Plug 'sheerun/vim-polyglot' +call plug#end() + +let g:airline#extensions#tabline#enabled = 1 +let g:airline_powerline_fonts = 1 map :!pdflatex main.tex map :!zathura main.pdf & disown diff --git a/i3/config b/i3/config index 413c385..b5aa17c 100644 --- a/i3/config +++ b/i3/config @@ -4,6 +4,9 @@ default_floating_border pixel 1 hide_edge_borders both +# notification daemon +exec_always dunst + # This file has been auto-generated by i3-config-wizard(1). # It will not be overwritten, so edit it as you like. # @@ -55,13 +58,13 @@ bindsym XF86MonBrightnessDown exec xbacklight -dec 5 floating_modifier $mod # start a terminal -bindsym $mod+Return exec i3-sensible-terminal +bindsym $mod+Return exec st # i3-sensible-terminal # kill focused window bindsym $mod+Shift+q kill # start dmenu (a program launcher) -bindsym $mod+d exec --no-startup-id dmenu_run +bindsym $mod+d exec --no-startup-id dmenu_run -sb '#825702' # A more modern dmenu replacement is rofi: # bindcode $mod+40 exec "rofi -modi drun,run -show drun" # There also is i3-dmenu-desktop which only displays applications shipping a @@ -170,10 +173,10 @@ mode "resize" { # Pressing right will grow the window’s width. # Pressing up will shrink the window’s height. # Pressing down will grow the window’s height. - bindsym j resize shrink width 10 px or 10 ppt + bindsym h resize shrink width 10 px or 10 ppt bindsym k resize grow height 10 px or 10 ppt - bindsym l resize shrink height 10 px or 10 ppt - bindsym semicolon resize grow width 10 px or 10 ppt + bindsym j resize shrink height 10 px or 10 ppt + bindsym l resize grow width 10 px or 10 ppt # same bindings, but for the arrow keys bindsym Left resize shrink width 10 px or 10 ppt @@ -191,16 +194,23 @@ bindsym $mod+r mode "resize" # Start i3bar to display a workspace bar (plus the system information i3status # finds out, if available) -bar { - status_command i3status -c /home/dhanus/.config/i3status/i3status.conf - position top - font pango:Hack Nerd Font 7 -} +#bar { +# status_command i3status -c /home/dhanus/.config/i3status/i3status.conf +# position top +# font pango:Hack Nerd Font 8 +# colors{ +# background #1d1f21 +# } +#} -# Custom bindings: -bindsym $mod+shift+x exec i3lock --color 000000 -bindsym $mod+b exec brave -incognito -bindsym $mod+shift+b exec brave +## polybar ## + +exec_always --no-startup-id $HOME/.config/polybar/launch.sh + +## custom bindings ## +bindsym $mod+shift+x exec i3lock -i /home/dhanus/Pictures/Wallpapers/wallpaper4.png +bindsym $mod+b exec brave-browser-beta -incognito +bindsym $mod+shift+b exec brave-browser-beta @@ -208,5 +218,8 @@ bindsym $mod+shift+b exec brave exec xinput set-prop 'Synaptics TM3096-006' 'libinput Tapping Enabled' 1 exec xinput set-prop 'Synaptics TM3096-006' 'libinput Natural Scrolling Enabled' 1 +bindsym $mod+Print exec screenshot && notify-send "screenshot saved in ~/Pictures/Screenshots" +bindsym Print exec screenshot s && notify-send "screenshot saved in ~/Pictures/Screenshots" + # wallpaper -exec_always feh --bg-scale ~/Pictures/wallpaper15.jpg +exec_always feh --bg-scale ~/Pictures/Wallpapers/The-isle-of-the-dead.jpg diff --git a/polybar/config.ini b/polybar/config.ini new file mode 100644 index 0000000..388de8e --- /dev/null +++ b/polybar/config.ini @@ -0,0 +1,211 @@ +;========================================================== +; +; +; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗ +; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗ +; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝ +; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗ +; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║ +; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ +; +; +; To learn more about how to configure Polybar +; go to https://github.com/polybar/polybar +; +; The README contains a lot of information +; +;========================================================== + +[colors] +background = #1d1f21 +background-alt = #373B41 +foreground = #C5C8C6 +primary = #F0C674 +secondary = #8ABEB7 +alert = #A54242 +disabled = #707880 + +[bar/statusBar] +width = 100% +height = 15pt +fixed-center = false + +; dpi = 96 + +background = ${colors.background} +foreground = ${colors.foreground} + +line-size = 3pt + +border-size = 0pt +border-color = #00000000 + +padding-left = 0 +padding-right = 1 + +module-margin = 1 + +separator = | +separator-foreground = ${colors.disabled} + +; font-0 = monospace;1 +font-0 = Hack Nerd Font:size=8 + +modules-left = xworkspaces xwindow +;modules-center = mpd +modules-right = filesystem pulseaudio memory cpu wlan eth battery date + +cursor-click = pointer +cursor-scroll = ns-resize + +enable-ipc = true + +tray-position = right + +; wm-restack = generic +; wm-restack = bspwm + wm-restack = i3 + +; override-redirect = true + +[module/xworkspaces] +type = internal/xworkspaces + +label-active = %name% +label-active-background = ${colors.background-alt} +label-active-underline= ${colors.primary} +label-active-padding = 1 + +label-occupied = %name% +label-occupied-padding = 1 + +label-urgent = %name% +label-urgent-background = ${colors.alert} +label-urgent-padding = 1 + +label-empty = %name% +label-empty-foreground = ${colors.disabled} +label-empty-padding = 1 + +[module/xwindow] +type = internal/xwindow +label = %title:0:25..% + +[module/filesystem] +type = internal/fs +interval = 25 + +mount-0 = / + +;label-mounted = %{F#F0C674}%mountpoint%%{F-} %percentage_used%% +label-mounted = %free% + +label-unmounted = %mountpoint% not mounted +label-unmounted-foreground = ${colors.disabled} + +[module/pulseaudio] +type = internal/pulseaudio + +format-volume-prefix = "VOL " +format-volume-prefix-foreground = ${colors.primary} +format-volume = + +label-volume = %percentage%% + +label-muted = muted +label-muted-foreground = ${colors.disabled} + +[module/xkeyboard] +type = internal/xkeyboard +blacklist-0 = num lock + +label-layout = %layout% +label-layout-foreground = ${colors.primary} + +label-indicator-padding = 2 +label-indicator-margin = 1 +label-indicator-foreground = ${colors.background} +label-indicator-background = ${colors.secondary} + +[module/memory] +type = internal/memory +interval = 2 +format-prefix = "RAM " +format-prefix-foreground = ${colors.primary} +;label = %used% | %free% +;label = %percentage_used%% +label = %used% +format-warn-prefix = "RAM " +format-warn-prefix-foreground = ${colors.primary} +format-warn = +;label-warn = %used% | %free% +label-warn = %used% +;label-warn = %percentage_used%% +label-warn-foreground = #ea473b +warn-percentage = 80 + +[module/cpu] +type = internal/cpu +interval = 2 +format-prefix = "CPU " +format-prefix-foreground = ${colors.primary} +label = %percentage:2%% +format-warn-prefix = "CPU " +format-warn-foreground = ${colors.primary} +warn-percentage = 80 +format-warn = +label-warn = %percentage%% +label-warn-foreground = #ea473b + +[network-base] +type = internal/network +interval = 5 +format-connected = +format-disconnected = +;label-disconnected = %{F#F0C674}%ifname%%{F#707880} disconnected + +[module/wlan] +inherit = network-base +interface-type = wireless +;label-connected = %{F#F0C674}%ifname%%{F-} %essid% %local_ip% +label-connected = %{F#F0C674}wifi%{F-} %essid% %local_ip% +label-disconnected = %{F#F0C674}wifi%{F#707880} disconnected + +[module/eth] +inherit = network-base +interface-type = wired +;label-connected = %{F#F0C674}%ifname%%{F-} %local_ip% +label-connected = %{F#F0C674}eth%{F-} %local_ip% +label-disconnected = %{F#F0C674}eth%{F#707880} disconnected + +[module/date] +type = internal/date +interval = 1 + +date = %Y-%m-%d (%a) %H:%M:%S + +label = %date% +label-foreground = ${colors.primary} + +[module/battery] +type = internal/battery +battery = BAT0 +adapter = AC +full-at = 100 +low-at = 10 +time-format = %H:%M +format-charging = +format-discharging = +format-full = +format-low = +label-charging = %{F#F0C674}CHR %{F-}%percentage%% %time% +label-full = %{F#F0C674}FULL %{F#c2ef0e}%percentage%% +label-low = %{F#F0C674}LOW %{F#ea473b}%percentage%% %time% +label-discharging = %{F#F0C674}DIS %{F-}%percentage%% %time% + +[settings] +screenchange-reload = true +pseudo-transparency = true + +; vim:ft=dosini + diff --git a/polybar/launch.sh b/polybar/launch.sh index 01e1189..d294005 100755 --- a/polybar/launch.sh +++ b/polybar/launch.sh @@ -1,13 +1,12 @@ -#!/usr/bin/env bash +#!/bin/bash -# Terminate already running bar instances +# terminate already running bar instances # If all your bars have ipc enabled, you can use -# polybar-msg cmd quit +polybar-msg cmd quit # Otherwise you can use the nuclear option: -killall -q polybar +# killall -q polybar -# Launch bar1 and bar2 -echo "---" | tee -a /tmp/polybar1.log -polybar example 2>&1 | tee -a /tmp/polybar1.log & disown +echo "---" | tee -a /tmp/polybar1.log /tmp/polybar2.log +polybar statusBar 2>&1 | tee -a /tmp/polybar1.log & disown -echo "Bar launched..." +echo "Bars launched..." diff --git a/.Xresources.pop b/pop/.Xresources.pop similarity index 100% rename from .Xresources.pop rename to pop/.Xresources.pop diff --git a/.bashrc.pop b/pop/.bashrc.pop similarity index 100% rename from .bashrc.pop rename to pop/.bashrc.pop diff --git a/.vimrc.pop b/pop/.vimrc.pop similarity index 100% rename from .vimrc.pop rename to pop/.vimrc.pop diff --git a/i3.pop/config b/pop/i3.pop/config similarity index 100% rename from i3.pop/config rename to pop/i3.pop/config diff --git a/i3.pop/i3blocks.conf b/pop/i3.pop/i3blocks.conf similarity index 100% rename from i3.pop/i3blocks.conf rename to pop/i3.pop/i3blocks.conf diff --git a/i3.pop/screenshot b/pop/i3.pop/screenshot similarity index 100% rename from i3.pop/screenshot rename to pop/i3.pop/screenshot diff --git a/polybar/config b/pop/polybar.pop/config similarity index 100% rename from polybar/config rename to pop/polybar.pop/config diff --git a/pop/polybar.pop/launch.sh b/pop/polybar.pop/launch.sh new file mode 100755 index 0000000..01e1189 --- /dev/null +++ b/pop/polybar.pop/launch.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +# Terminate already running bar instances +# If all your bars have ipc enabled, you can use +# polybar-msg cmd quit +# Otherwise you can use the nuclear option: +killall -q polybar + +# Launch bar1 and bar2 +echo "---" | tee -a /tmp/polybar1.log +polybar example 2>&1 | tee -a /tmp/polybar1.log & disown + +echo "Bar launched..."