diff --git a/bin/README.md b/bin/README.md new file mode 100644 index 0000000..134d47d --- /dev/null +++ b/bin/README.md @@ -0,0 +1,8 @@ + +Scripts: +- `arch_upd`: Update packages(pacman, aur) base on arch. +- `extract`: Extract archive. +- `giti`: Gitignore manager(For help exec: giti help). +- `kbhl`: Enable/disable keyboard highlight scrlock. +- `local-ip`: Get local IP addres. +- `public-ip`: Get public IP addres. diff --git a/bin/local-ip b/bin/local-ip new file mode 100755 index 0000000..9fbaa5b --- /dev/null +++ b/bin/local-ip @@ -0,0 +1,2 @@ +#!/bin/sh +ifconfig | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p' | grep -v '172.[0-9][0-9].0.1' diff --git a/bin/public-ip b/bin/public-ip new file mode 100755 index 0000000..584377a --- /dev/null +++ b/bin/public-ip @@ -0,0 +1,7 @@ +#!/bin/sh +if [ -f '/usr/bin/curl' ] +then + curl ipinfo.io/ip +else + wget -qO- ipinfo.io/ip +fi diff --git a/config/berry/autostart b/config/berry/autostart index fe491ba..17a8663 100755 --- a/config/berry/autostart +++ b/config/berry/autostart @@ -1,21 +1,18 @@ #!/bin/bash - # ------ Autostart ------ # -setxkbmap "us,ru,ua" ",winkeys" "grp:alt_shift_toggle" -option "ctrl:nocaps" & +setxkbmap "us,ua" ",winkeys" "grp:alt_shift_toggle" -option "ctrl:nocaps" & /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & sxhkd -c ~/.config/berry/sxhkdrc & ~/.config/berry/polybar/bar.sh & nitrogen --restore & picom -b & -conky & - # ------ Berry ------ # # Set decoration geometry berryc border_width 0 berryc inner_border_width 1 berryc title_height 0 -berryc top_gap 0 +berryc top_gap 24 # Set decoration colors berryc focus_color 073642 @@ -28,5 +25,5 @@ berryc text_unfocus_color eeeeee # Other options berryc smart_place "true" berryc draw_text "true" -berryc edge_lock "false" +berryc edge_lock "true" berryc set_font "Dina-9" diff --git a/config/berry/polybar/bar.sh b/config/berry/polybar/bar.sh index e44a0d0..cd8c764 100755 --- a/config/berry/polybar/bar.sh +++ b/config/berry/polybar/bar.sh @@ -1,5 +1,6 @@ #!/bin/bash killall -q polybar while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done -polybar -c ~/.config/berry/polybar/polybar top & -polybar -c ~/.config/berry/polybar/polybar bom & +#polybar -c ~/.config/berry/polybar/polybar top & +#polybar -c ~/.config/berry/polybar/polybar bom & +polybar -c ~/.config/berry/polybar/polybar bar & diff --git a/config/berry/polybar/polybar b/config/berry/polybar/polybar index c23fe9a..c1c9f3a 100644 --- a/config/berry/polybar/polybar +++ b/config/berry/polybar/polybar @@ -2,38 +2,25 @@ pseudo-transparency = true [colors] -background = #002B36 -foreground = #dfdfdf -secondary = #073642 -alert = #268bd2 +background = #262A2B +foreground = #FFFFFF +secondary = #CED4DA +alert = #DD6C6B -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -[bar/top] -width = 14% -height = 22 +[bar/bar] +height = 24 override-redirect = false background = ${colors.background} foreground = ${colors.foreground} -offset-x = 85.8% -offset-y = 0.4% module-margin-left = 1 module-margin-right = 1 -font-0 = Iosevka Nerd Font:style=Medium:size=8;3 -font-1 = FontAwesome5Free:style=Solid:size=7.5;2.5 -modules-center = keyboard pulseaudio wifi-signal time - -[bar/bom] -width = 6% -height = 22 -bottom = true -offset-x = 93.8% -offset-y = 0.4% -font-0 = Iosevka Nerd Font:style=Medium:size=8;3 -font-1 = FontAwesome5Free:style=Solid:size=7.5;2.5 -background = ${colors.background} -foreground = ${colors.foreground} -modules-left = t -tray-position = center +padding-left = 3 +padding-right = 3 +font-0 = Iosevka Nerd Font:style=Medium:size=10;3 +font-1 = FontAwesome5Free:style=Solid:size=8;2.5 +modules-left = wifi-signal date +modules-center = wp +modules-right = keyboard pulseaudio backlight time [module/backlight] type = internal/xbacklight @@ -44,14 +31,14 @@ ramp-0 =  [module/wifi-signal] type = custom/script label =  %output:%% -exec = ~/.config/polybar/scripts/wifi-signal.sh +exec = cat /proc/net/wireless | grep "wlp3s0" | awk '{print $4}' | grep -o '[0-9]*' interval = 3.0 [module/pulseaudio] type = internal/pulseaudio format-volume = label-volume = %percentage%% -label-volume-foreground = ${root.foreground} +label-volume-foreground = ${colors.foreground} label-muted =  ramp-volume-0 =  ramp-volume-1 =  @@ -59,11 +46,6 @@ ramp-volume-2 =  ramp-volume-3 =  ramp-volume-4 =  -[module/updates-pacman] -type = custom/script -exec = ~/.config/polybar/scripts/updates-pacman-aur.sh -interval = 60 - [module/keyboard] type = internal/xkeyboard label-NAME-maxlen = 10 @@ -85,6 +67,16 @@ interval = 0 time = %H:%M label =  %time% -[module/t] -type = custom/text -content = " " +[module/wp] +type = internal/xworkspaces +format = +label-active = × +label-empty = · +label-urgent = ~ +label-active-foreground = ${colors.foreground} +label-active-background = ${colors.background} +label-active-padding = 1 +label-empty-foreground = ${colors.secondary} +label-empty-padding = +label-urgent-foreground = ${colors.alert} +label-urgent-padding = 1 diff --git a/config/berry/sxhkdrc b/config/berry/sxhkdrc index a9a569c..228b158 100644 --- a/config/berry/sxhkdrc +++ b/config/berry/sxhkdrc @@ -29,20 +29,18 @@ super + control + o ~/.script/dmenu/dmenu-sysmon.sh # ------ Berry ------ # -super + {h, j, k, l} +super + control + r + pkill -USR1 -x sxhkd ; pkill polybar ; ~/.config/berry/polybar/bar.sh +super + shift {h, j, k, l} berryc window_move {-50 0, 0 50, 0 -50, 50 0} -super + shift + {h, j, k, l} +super + control + {h, j, k, l} berryc window_resize {-50 0, 0 50, 0 -50, 50 0} super + {1-9} berryc switch_workspace {0-9} super + shift + {1-9} berryc send_to_workspace {0-9} -super + m +super + F11 berryc window_monocle -super + p - berryc snap_right -super + o - berryc snap_left super + n berryc toggle_decorations super + Tab diff --git a/config/i3/config b/config/i3/config index 23d1eca..d466f92 100644 --- a/config/i3/config +++ b/config/i3/config @@ -22,12 +22,12 @@ set $filemanager pcmanfm ############ Autostart ############ exec --no-startup-id exec picom -b -exec --no-startup-id exec nmcli radio wifi on; nmcli device wifi connect Pechenka password 24032006 name net -exec --no-startup-id exec redshift-gtk +exec --no-startup-id exec nmcli radio wifi on && nmcli device wifi connect $(echo $WIFINAME) password $(echo $WIFIPASS) name net +#exec --no-startup-id exec redshift-gtk exec --no-startup-id exec nitrogen --restore -exec --no-startup-id exec setxkbmap "us,ru,ua" ",winkeys" "grp:alt_shift_toggle" -option "ctrl:nocaps" +exec --no-startup-id exec setxkbmap "us,ua" ",winkeys" "grp:alt_shift_toggle" -option "ctrl:nocaps" exec --no-startup-id exec org.telegram.desktop -exec --no-startup-id exec conky +#exec --no-startup-id exec conky #exec --no-startup-id exec discord exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 exec_always --no-startup-id $HOME/.config/i3/bar.sh @@ -55,21 +55,18 @@ bindsym $mod+Shift+grave move scratchpad bindsym $mod+grave scratchpad show, floating disable ### Launchers -bindsym $mod+p exec "dmenu_run -h 24 -p Run" -bindsym $mod+Shift+Return exec "rofi -show drun -drun-display-format '{name}'" -bindsym $mod+Escape exec "~/.script/dmenu/dmenu-power.sh" -bindsym $mod+Control+u exec ~/.script/dmenu/dmenu-config-edit.sh +bindsym $mod+Shift+apostrophe exec "rofi -show run" +bindsym $mod+Shift+Return exec "rofi -show drun" +bindsym $mod+Escape exec ~/.script/dmenu/dmenu-power.sh -h 24 +bindsym $mod+Control+u exec ~/.script/dmenu/dmenu-config-edit.sh -h 24 bindsym $mod+Control+i exec passmenu -h 24 -p Passwords -bindsym $alt+Tab exec "rofi -show window -show-icons" -bindsym $mod+$alt+t exec $terminal nvim .todo - ### Applications bindsym $mod+Return exec $terminal bindsym $mod+F2 exec $browser -bindsym $mod+F3 exec gnvim bindsym $mod+F4 exec $filemanager bindsym --release $mod+Shift+Escape exec xkill +bindsym $mod+$alt+t exec $terminal nvim .todo ### Sceenshot @@ -121,6 +118,16 @@ bindsym $mod+Shift+Up move up bindsym $mod+Shift+l move right bindsym $mod+Shift+Right move right +##### Restart focused window ###### +bindsym $mod+Control+h resize shrink width 20 px or 20 ppt +bindsym $mod+Control+Left resize shrink width 20 px or 20 ppt +bindsym $mod+Control+j resize grow height 20 px or 20 ppt +bindsym $mod+Control+Down resize grow height 20 px or 20 ppt +bindsym $mod+Control+k resize shrink height 20 px or 20 ppt +bindsym $mod+Control+Up resize shrink height 20 px or 20 ppt +bindsym $mod+Control+l resize grow width 20 px or 20 ppt +bindsym $mod+Control+Right resize grow width 20 px or 20 ppt + ############ Workspaces ########### set $ws1 "1" set $ws2 "2" @@ -153,23 +160,7 @@ bindsym $mod+Shift+8 move container to workspace $ws8 bindsym $mod+Shift+9 move container to workspace $ws9 ############## Modes ############## -bindsym $mod+r mode "resize" bindsym $mod+g mode "gaps" -mode "resize" { - bindsym h resize shrink width 10 px or 10 ppt - bindsym j resize grow height 10 px or 10 ppt - bindsym k resize shrink height 10 px or 10 ppt - bindsym l resize grow width 10 px or 10 ppt - - bindsym Left resize shrink width 10 px or 10 ppt - bindsym Down resize grow height 10 px or 10 ppt - bindsym Up resize shrink height 10 px or 10 ppt - bindsym Right resize grow width 10 px or 10 ppt - - bindsym Return mode "default" - bindsym Escape mode "default" - bindsym $mod+r mode "default" -} mode "gaps" { bindsym plus gaps inner current plus 2 bindsym minus gaps inner current minus 2 @@ -186,9 +177,9 @@ mode "gaps" { ############## Colors ############# # Class Border Backgr Text Indicator Child_border -client.focused #268bd2 #268bd2 #dfdfdf #268bd2 #268bd2 -client.focused_inactive #002b36 #002b36 #dfdfdf #002b36 #002b36 -client.unfocused #002b36 #002b36 #586e75 #002b36 #002b36 -client.urgent #002b36 #002b36 #ffffff #002b36 #002b36 -client.placeholder #000000 #000000 #ffffff #000000 #000000 -client.background #ffffff +client.focused #008DCD #008DCD #FFFFFF #008DCD #008DCD +client.focused_inactive #008DCD #002b36 #DFDFDF #002b36 #002b36 +client.unfocused #262A2B #262A2B #DFDFDF #262A2B #262A2B +client.urgent #002b36 #262A2B #FFFFFF #262A2B #262A2B +client.placeholder #000000 #000000 #FFFFFF #000000 #000000 +client.background #FFFFFF diff --git a/config/neofetch/config.conf b/config/neofetch/config.conf index 3f17b52..ebc1b2b 100644 --- a/config/neofetch/config.conf +++ b/config/neofetch/config.conf @@ -31,7 +31,6 @@ package_managers="on" shell_path="off" shell_version="on" - speed_type="bios_limit" speed_shorthand="off" diff --git a/config/polybar/config b/config/polybar/config index 9da274c..961f70f 100644 --- a/config/polybar/config +++ b/config/polybar/config @@ -2,50 +2,21 @@ pseudo-transparency = true [colors] -; Solarized ======== -;background = #002B36 -;foreground = #dfdfdf -;secondary = #073642 -;alert = #268bd2 - -; Smirnov-O Sheme == background = #262A2B foreground = #ffffff -secondary = #111B1A -alert = #008dcd +secondary = #008DCD +alert = #008DCD -; Nord ============= -;background = #2E3440 -;foreground = #ECEFF4 -;secondary = #434C5E -;alert = #88C0D0 - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [bar/i3bar] width = 100% height = 24 fixed-center = true wm-restack = i3 -;override-redirect = true - background = ${colors.background} foreground = ${colors.foreground} - -line-size = 3 -line-color = #000000 - -#padding-left = 2 -#padding-right = 2 - -#radius = 6.0 -#border-left-size = 0.2% -#border-top-size = 0.2% -#border-right-size = 0.2% - module-margin-left = 1 module-margin-right = 1 - font-0 = Iosevka Nerd Font:style=Medium:size=8;3 font-1 = FontAwesome5Free:style=Solid:size=7.5;2.5 font-2 = Weather Icons:size=7;2 @@ -64,7 +35,6 @@ format = index-sort = false wrapping-scroll = false label-mode-padding = 1 -label-mode-foreground = #000 label-mode-background = ${colors.alert} label-focused = %icon% diff --git a/zshrc b/zshrc index 9c52747..64c1245 100644 --- a/zshrc +++ b/zshrc @@ -49,5 +49,5 @@ alias tozsh="chsh -s /bin/zsh && echo 'Now log out.'" alias tofish="chsh -s /bin/fish && echo 'Now log out.'" alias tobash="chsh -s /bin/bash && echo 'Now log out.'" -### Pfetch ### -pfetch +### NeoFetch ### +neofetch