diff --git a/i3/config b/i3/config index 74ffae6..63ff54e 100644 --- a/i3/config +++ b/i3/config @@ -1,13 +1,3 @@ -# no borders for windows -default_border pixel 1 -default_floating_border pixel 1 -hide_edge_borders both - -exec_always picom --config /home/dhanus/.config/picom/picom.conf -b - -# 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. # @@ -15,6 +5,13 @@ exec_always dunst # this file and re-run i3-config-wizard(1). # +default_border pixel 1 +default_floating_border pixel 1 +hide_edge_borders both + +exec_always picom --config /home/dhanus/.config/picom/picom.conf -b +exec_always dunst + # i3 config file (v4) # # Please see https://i3wm.org/docs/userguide.html for a complete reference! @@ -23,11 +20,11 @@ set $mod Mod4 # Font for window titles. Will also be used by the bar unless a different font # is used in the bar {} block below. -# font pango:monospace 8 +font pango:monospace 8 # This font is widely installed, provides lots of unicode glyphs, right-to-left # text rendering and scalability on retina/hidpi displays (thanks to pango). -font pango:DejaVu Sans Mono 8 +#font pango:DejaVu Sans Mono 8 # Start XDG autostart .desktop files using dex. See also # https://wiki.archlinux.org/index.php/XDG_Autostart @@ -46,26 +43,26 @@ exec --no-startup-id nm-applet # Use pactl to adjust volume in PulseAudio. set $refresh_i3status killall -SIGUSR1 i3status -bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5% && $refresh_i3status -bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5% && $refresh_i3status +bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status +bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status -# Use xrandr to adjust screen brightness -bindsym XF86MonBrightnessUp exec xbacklight -inc 2 -bindsym XF86MonBrightnessDown exec xbacklight -dec 2 - # Use Mouse+$mod to drag floating windows to their wanted position floating_modifier $mod +# move tiling windows via drag & drop by left-clicking into the title bar, +# or left-clicking anywhere into the window while holding the floating modifier. +# tiling_drag modifier titlebar + # start a terminal -bindsym $mod+Return exec st # i3-sensible-terminal +bindsym $mod+Return exec alacritty # kill focused window bindsym $mod+Shift+q kill # start dmenu (a program launcher) -bindsym $mod+d exec --no-startup-id dmenu_run -sb '#825702' +bindsym $mod+d exec --no-startup-id dmenu_run # 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 @@ -193,40 +190,26 @@ mode "resize" { bindsym $mod+r mode "resize" -## gsimplecal must be on the top right ## -for_window [instance="gsimplecal"] move absolute position 1140 px 20 px -for_window [class="Cisco AnyConnect Secure Mobility Client"] floating enable - # 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 8 -# colors{ -# background #1d1f21 -# } -#} +bar { + status_command i3status -c /home/dhanus/.config/i3status/i3status.conf + position top + colors{ + background #1d1f21 + statusline #c5c8c6 + focused_workspace #c5c8c6 #052003 + } +} -## 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+shift+x exec wm-lock bindsym $mod+b exec brave-browser-beta -incognito bindsym $mod+shift+b exec brave-browser-beta -bindsym $mod+g exec st ranger +bindsym $mod+p exec (pgrep picom && pkill picom) || picom --config /home/dhanus/.config/picom/picom.conf bindsym $mod+c exec run +bindsym $mod+Print exec screenshot +bindsym Print exec screenshot s - - -# touch pad configuration -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+p exec screenshot -bindsym Print exec screenshot s - -# wallpaper -exec_always feh --bg-scale /home/dhanus/Pictures/Wallpapers/flying-whales-gojira.jpg +exec_always feh --bg-scale /home/dhanus/Pictures/Wallpapers/arch.png diff --git a/i3/config.old b/i3/config.old new file mode 100644 index 0000000..74ffae6 --- /dev/null +++ b/i3/config.old @@ -0,0 +1,232 @@ +# no borders for windows +default_border pixel 1 +default_floating_border pixel 1 +hide_edge_borders both + +exec_always picom --config /home/dhanus/.config/picom/picom.conf -b + +# 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. +# +# Should you change your keyboard layout some time, delete +# this file and re-run i3-config-wizard(1). +# + +# i3 config file (v4) +# +# Please see https://i3wm.org/docs/userguide.html for a complete reference! + +set $mod Mod4 + +# Font for window titles. Will also be used by the bar unless a different font +# is used in the bar {} block below. +# font pango:monospace 8 + +# This font is widely installed, provides lots of unicode glyphs, right-to-left +# text rendering and scalability on retina/hidpi displays (thanks to pango). +font pango:DejaVu Sans Mono 8 + +# Start XDG autostart .desktop files using dex. See also +# https://wiki.archlinux.org/index.php/XDG_Autostart +exec --no-startup-id dex --autostart --environment i3 + +# The combination of xss-lock, nm-applet and pactl is a popular choice, so +# they are included here as an example. Modify as you see fit. + +# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the +# screen before suspend. Use loginctl lock-session to lock your screen. +exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork + +# NetworkManager is the most popular way to manage wireless networks on Linux, +# and nm-applet is a desktop environment-independent system tray GUI for it. +exec --no-startup-id nm-applet + +# Use pactl to adjust volume in PulseAudio. +set $refresh_i3status killall -SIGUSR1 i3status +bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5% && $refresh_i3status +bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5% && $refresh_i3status +bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status +bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status + +# Use xrandr to adjust screen brightness +bindsym XF86MonBrightnessUp exec xbacklight -inc 2 +bindsym XF86MonBrightnessDown exec xbacklight -dec 2 + +# Use Mouse+$mod to drag floating windows to their wanted position +floating_modifier $mod + +# start a 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 -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 +# .desktop file. It is a wrapper around dmenu, so you need that installed. +# bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop + +# change focus +bindsym $mod+h focus left +bindsym $mod+j focus down +bindsym $mod+k focus up +bindsym $mod+l focus right + +# alternatively, you can use the cursor keys: +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +# move focused window +bindsym $mod+Shift+h move left +bindsym $mod+Shift+j move down +bindsym $mod+Shift+k move up +bindsym $mod+Shift+l move right + +# alternatively, you can use the cursor keys: +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right + +# split in horizontal orientation +bindsym $mod+o split h + +# split in vertical orientation +bindsym $mod+v split v + +# enter fullscreen mode for the focused container +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 + +# toggle tiling / floating +bindsym $mod+Shift+space floating toggle + +# change focus between tiling / floating windows +bindsym $mod+space focus mode_toggle + +# focus the parent container +bindsym $mod+a focus parent + +# focus the child container +#bindsym $mod+d focus child + +# 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 "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" + +# switch to workspace +bindsym $mod+1 workspace number $ws1 +bindsym $mod+2 workspace number $ws2 +bindsym $mod+3 workspace number $ws3 +bindsym $mod+4 workspace number $ws4 +bindsym $mod+5 workspace number $ws5 +bindsym $mod+6 workspace number $ws6 +bindsym $mod+7 workspace number $ws7 +bindsym $mod+8 workspace number $ws8 +bindsym $mod+9 workspace number $ws9 +bindsym $mod+0 workspace number $ws10 + +# move focused container to workspace +bindsym $mod+Shift+1 move container to workspace number $ws1 +bindsym $mod+Shift+2 move container to workspace number $ws2 +bindsym $mod+Shift+3 move container to workspace number $ws3 +bindsym $mod+Shift+4 move container to workspace number $ws4 +bindsym $mod+Shift+5 move container to workspace number $ws5 +bindsym $mod+Shift+6 move container to workspace number $ws6 +bindsym $mod+Shift+7 move container to workspace number $ws7 +bindsym $mod+Shift+8 move container to workspace number $ws8 +bindsym $mod+Shift+9 move container to workspace number $ws9 +bindsym $mod+Shift+0 move container to workspace number $ws10 + +# reload the configuration file +bindsym $mod+Shift+c reload +# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) +bindsym $mod+Shift+r restart +# exit i3 (logs you out of your X session) +bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'" + +# resize window (you can also use the mouse for that) +mode "resize" { + # These bindings trigger as soon as you enter the resize mode + + # Pressing left will shrink the window’s width. + # 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 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 + + # same bindings, but for the arrow keys + 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 + + # back to normal: Enter or Escape or $mod+r + bindsym Return mode "default" + bindsym Escape mode "default" + bindsym $mod+r mode "default" +} + +bindsym $mod+r mode "resize" + +## gsimplecal must be on the top right ## +for_window [instance="gsimplecal"] move absolute position 1140 px 20 px +for_window [class="Cisco AnyConnect Secure Mobility Client"] floating enable + +# 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 8 +# colors{ +# background #1d1f21 +# } +#} + +## 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 +bindsym $mod+g exec st ranger +bindsym $mod+c exec run + + + +# touch pad configuration +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+p exec screenshot +bindsym Print exec screenshot s + +# wallpaper +exec_always feh --bg-scale /home/dhanus/Pictures/Wallpapers/flying-whales-gojira.jpg diff --git a/i3status/i3status.conf b/i3status/i3status.conf index ee9027f..0421f07 100644 --- a/i3status/i3status.conf +++ b/i3status/i3status.conf @@ -9,20 +9,23 @@ general { colors = true interval = 5 + color_good = "#8c9440" + color_degraded = "#de935f" + color_bad = "#a54242" } # order += "ipv6" +order += "volume master" order += "wireless _first_" -order += "ethernet _first_" -order += "battery all" +#order += "ethernet _first_" order += "disk /" order += "load" order += "memory" order += "tztime local" wireless _first_ { - format_up = "W: (%quality at %essid) %ip" - format_down = "W: down" + format_up = "wifi %quality %essid" + format_down = "wifi: down" } ethernet _first_ { @@ -43,7 +46,7 @@ load { } memory { - format = "%used | %available" + format = "%used | %total" threshold_degraded = "1G" format_degraded = "MEMORY < %available" } @@ -51,3 +54,12 @@ memory { tztime local { format = "%Y-%m-%d (%a) %H:%M:%S" } + +volume master { + format = "VOL: %volume" + format_muted = "VOL: muted (%volume)" + device = "default" + mixer = "Master" + mixer_idx = 0 + +} diff --git a/i3status/i3status.conf.old b/i3status/i3status.conf.old new file mode 100644 index 0000000..ee9027f --- /dev/null +++ b/i3status/i3status.conf.old @@ -0,0 +1,53 @@ +# i3status configuration file. +# see "man i3status" for documentation. + +# It is important that this file is edited as UTF-8. +# The following line should contain a sharp s: +# ß +# If the above line is not correctly displayed, fix your editor first! + +general { + colors = true + interval = 5 +} + +# order += "ipv6" +order += "wireless _first_" +order += "ethernet _first_" +order += "battery all" +order += "disk /" +order += "load" +order += "memory" +order += "tztime local" + +wireless _first_ { + format_up = "W: (%quality at %essid) %ip" + format_down = "W: down" +} + +ethernet _first_ { + format_up = "E: %ip (%speed)" + format_down = "E: down" +} + +battery all { + format = "%status %percentage %remaining" +} + +disk "/" { + format = "%avail" +} + +load { + format = "%1min" +} + +memory { + format = "%used | %available" + threshold_degraded = "1G" + format_degraded = "MEMORY < %available" +} + +tztime local { + format = "%Y-%m-%d (%a) %H:%M:%S" +} diff --git a/vim/.vimrc b/vim/.vimrc index d71ac68..74901d2 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -1,9 +1,11 @@ "file created by dhanus on 21-July-2021 syntax on set nu rnu -set clipboard+=unnamedplus +set clipboard=unnamedplus set encoding=utf-8 set tabstop=4 softtabstop=4 +set shiftwidth=4 +set expandtab set autoindent set incsearch @@ -12,23 +14,23 @@ call plug#begin('~/.vim/plugged') Plug 'vim-airline/vim-airline' Plug '/vim-airline/vim-airline-themes' Plug 'Raimondi/delimitMate' - Plug 'vim-syntastic/syntastic' +" Plug 'vim-syntastic/syntastic' Plug 'ryanoasis/vim-devicons' Plug 'sheerun/vim-polyglot' - Plug 'preservim/nerdtree' - Plug 'Valloric/YouCompleteMe' + Plug 'ycm-core/YouCompleteMe' call plug#end() let g:airline#extensions#tabline#enabled = 1 let g:airline_powerline_fonts = 1 -"highlighting +"YCM highlightning +"hi SpellBad ctermfg=160 ctermbg=236 cterm=underline guifg=#ff0000 guibg=#303030 hi SpellBad term=reverse cterm=underline ctermfg=9 ctermbg=0 gui=undercurl guisp=Red hi SpellCap term=reverse cterm=underline ctermfg=11 ctermbg=0 gui=undercurl guisp=Blue -"YCM config +"YCM disable preview split set completeopt-=preview map :!pdflatex main.tex map :!zathura main.pdf & disown -map :!st $pwd & disown +map :!alacritty --working-directory $(pwd) & disown diff --git a/vim/.vimrc.old b/vim/.vimrc.old new file mode 100644 index 0000000..d71ac68 --- /dev/null +++ b/vim/.vimrc.old @@ -0,0 +1,34 @@ +"file created by dhanus on 21-July-2021 +syntax on +set nu rnu +set clipboard+=unnamedplus +set encoding=utf-8 +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' + Plug 'preservim/nerdtree' + Plug 'Valloric/YouCompleteMe' +call plug#end() + +let g:airline#extensions#tabline#enabled = 1 +let g:airline_powerline_fonts = 1 + +"highlighting +hi SpellBad term=reverse cterm=underline ctermfg=9 ctermbg=0 gui=undercurl guisp=Red +hi SpellCap term=reverse cterm=underline ctermfg=11 ctermbg=0 gui=undercurl guisp=Blue + +"YCM config +set completeopt-=preview + +map :!pdflatex main.tex +map :!zathura main.pdf & disown +map :!st $pwd & disown