From cfcdb8cdb5a1188e6885d1ee0ef516447b90168b Mon Sep 17 00:00:00 2001 From: DhanusML Date: Sun, 29 May 2022 20:30:57 +0530 Subject: [PATCH] first commit --- .Xresources | 18 ++++ .vimrc | 32 +++++++ i3/config | 244 +++++++++++++++++++++++++++++++++++++++++++++++ i3/i3blocks.conf | 154 ++++++++++++++++++++++++++++++ 4 files changed, 448 insertions(+) create mode 100644 .Xresources create mode 100644 .vimrc create mode 100644 i3/config create mode 100644 i3/i3blocks.conf diff --git a/.Xresources b/.Xresources new file mode 100644 index 0000000..7ccfe6d --- /dev/null +++ b/.Xresources @@ -0,0 +1,18 @@ +#include "/home/dhanus/.rxvt_colors/mocha.dark" + +URxvt.scrollBar: False +URxvt.font: xft: Hack Nerd Font:size=11 + + + +URxvt.perl-lib: $HOME/.urxvt/ext/ +!/usr/lib/urxvt/perl/ + +URxvt.perl-ext-common: fullscreen, resize-font + +URxvt.keysym.F11: perl:fullscreen:switch + +URxvt.keysym.C-minus: resize-font:smaller +URxvt.keysym.C-plus: resize-font:bigger +URxvt.keysym.C-equal: resize-font:reset +URxvt.keysym.C-question: resize-font:show diff --git a/.vimrc b/.vimrc new file mode 100644 index 0000000..ba7fe61 --- /dev/null +++ b/.vimrc @@ -0,0 +1,32 @@ +"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 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } + Plug 'vim-airline/vim-airline' + "Plug 'morhetz/gruvbox' + Plug '/vim-airline/vim-airline-themes' + Plug 'Raimondi/delimitMate' + Plug 'vim-syntastic/syntastic' + Plug 'rafi/awesome-vim-colorschemes' + Plug 'ryanoasis/vim-devicons' + Plug 'sheerun/vim-polyglot' + "Plug 'davidhalter/jedi-vim' + "Plug 'ryanoasis/nerd-fonts' + +call plug#end() + +let g:airline#extensions#tabline#enabled = 1 +let g:airline_powerline_fonts = 1 +"colorscheme onedark +"let g:airline_theme='gruvbox' + +map :!pdflatex main.tex +map :!zathura main.pdf & disown diff --git a/i3/config b/i3/config new file mode 100644 index 0000000..26513e5 --- /dev/null +++ b/i3/config @@ -0,0 +1,244 @@ +default_border pixel 1 +default_floating_border pixel 1 +hide_edge_borders both + +# 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 + +# 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@ +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 + +# Sreen brightness controls +bindsym XF86MonBrightnessUp exec light -A 5 # ixrandr --output eDP-1 --brightness 1ncrease screen brightness +bindsym XF86MonBrightnessDown exec light -U 5 # xrandr --output eDP-1 --brightness 0.5 decrease screen brightness + +# Use Mouse+$mod to drag floating windows to their wanted position +floating_modifier $mod + +# start a terminal +bindsym $mod+Return exec urxvt #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 +# 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" + +# Start i3bar to display a workspace bar (plus the system information i3status +# finds out, if available) +# bar { + # i3status + # status_command i3blocks -c ~/.config/i3/i3blocks.conf #i3status + + # font pango:Hack Nerd Font 8 + # position top + # status_command /home/dhanus/.local/bin/bumblebee-status \ + # -m memory disk network_traffic cpu amixer battery date time\ + # -t gruvbox-powerline\ + # -p root.path=/ time.format="%H:%M:%S" date.format="%a, %b %d %Y"\ + # amixer.interval=1s + + #cpu.interval=5s battery.interval=30s memory.interval=5s + # -p \ + # -t +# } +# +# Polybar +exec_always --no-startup-id $HOME/.config/polybar/launch.sh + +exec xinput set-prop 11 314 1 +exec xinput set-prop 11 322 1 + + +bindsym $mod+shift+x exec i3lock --color 000000 + + +set $bg-color-foc #1c2423 +set $bg-color #000000 + +# class border backgr. text indicator child_border +client.focused "$bg-color-foc" #1c2423 #ffffff #2e9ef4 #285577 +client.focused_inactive "$bg-color-foc" #35f676a #ffffff #484e50 #5f676a +client.unfocused #333333 #222222 #888888 #292d2e #222222 +client.urgent #2f343a #900000 #ffffff #900000 #900000 +client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c + +client.background #ffffff + + + +exec diodon +exec picom -b +exec xrdb -load /home/dhanus/.Xresources + + +bindsym $mod+b exec brave-browser -incognito +bindsym $mod+shift+b exec brave-browser + + +bindsym Print exec gnome-screenshot +bindsym $mod+Print exec gnome-screenshot -a + + + +# Wallpaper +exec_always feh --bg-scale ~/Pictures/wallpaper15.jpg diff --git a/i3/i3blocks.conf b/i3/i3blocks.conf new file mode 100644 index 0000000..bf2c7ce --- /dev/null +++ b/i3/i3blocks.conf @@ -0,0 +1,154 @@ +# i3blocks config file +# +# Please see man i3blocks for a complete reference! +# The man page is also hosted at http://vivien.github.io/i3blocks +# +# List of valid properties: +# +# align +# color +# command +# full_text +# instance +# interval +# label +# min_width +# name +# separator +# separator_block_width +# short_text +# signal +# urgent + +# Global properties +# +# The top properties below are applied to every block, but can be overridden. +# Each block command defaults to the script name to avoid boilerplate. +command=/usr/share/i3blocks/$BLOCK_NAME +separator_block_width=15 +markup=none + +# Volume indicator +# +# The first parameter sets the step (and units to display) +# The second parameter overrides the mixer selection +# See the script for details. +[volume] +label=VOL +# label=♪ +instance=Master +#instance=PCM +interval=1 # once +signal=10 + +# Memory usage +# +# The type defaults to "mem" if the instance is not specified. +[memory] +label=MEM +separator=false +interval=30 + +[memory] +label=SWAP +instance=swap +separator=false +interval=30 + +# Disk usage +# +# The directory defaults to $HOME if the instance is not specified. +# The script may be called with a optional argument to set the alert +# (defaults to 10 for 10%). +[disk] +label=HOME +#instance=/mnt/data +interval=30 + +# Network interface monitoring +# +# If the instance is not specified, use the interface used for default route. +# The address can be forced to IPv4 or IPv6 with -4 or -6 switches. +[iface] +#instance=wlan0 +color=#00FF00 +interval=10 +separator=false + +[wifi] +#instance=wlp3s0 +interval=10 +separator=false + +[bandwidth] +#instance=eth0 +interval=5 + +# CPU usage +# +# The script may be called with -w and -c switches to specify thresholds, +# see the script for details. +[cpu_usage] +label=CPU +interval=10 +min_width=CPU: 100.00% +#separator=false + +[load_average] +label=LOAD +interval=10 + +# Battery indicator +# +# The battery instance defaults to 0. +[battery] +label=BAT +#label=⚡ +#instance=1 +interval=30 + +# Date Time +# +[time] +command=date '+%Y-%m-%d %H:%M:%S' +interval=1 + +# Generic media player support +# +# This displays "ARTIST - SONG" if a music is playing. +# Supported players are: spotify, vlc, audacious, xmms2, mplayer, and others. +#[mediaplayer] +#instance=spotify +#interval=5 +#signal=10 + +# OpenVPN support +# +# Support multiple VPN, with colors. +#[openvpn] +#interval=20 + +# Temperature +# +# Support multiple chips, though lm-sensors. +# The script may be called with -w and -c switches to specify thresholds, +# see the script for details. +#[temperature] +#label=TEMP +#interval=10 + +# Key indicators +# +# Add the following bindings to i3 config file: +# +# bindsym --release Caps_Lock exec pkill -SIGRTMIN+11 i3blocks +# bindsym --release Num_Lock exec pkill -SIGRTMIN+11 i3blocks +#[keyindicator] +#instance=CAPS +#interval=once +#signal=11 + +#[keyindicator] +#instance=NUM +#interval=once +#signal=11