This commit is contained in:
Shihaam Abdul Rahman 2023-03-13 09:19:24 +05:00
parent d03559fd51
commit 8f63f6fbf8
Signed by: shihaam
GPG Key ID: 6DA2E87EBC227636
3 changed files with 44 additions and 65 deletions

13
bashrc
View File

@ -1,10 +1,13 @@
PATH=$HOME/.scripts:/opt:$PATH
PATH=$HOME/.scripts:/opt:/home/shihaam/.local/bin:$HOME/.shortcuts/wineprograms:$PATH
HISTSIZE=999999
HISTFILESIZE=999999
export GPG_TTY=$(tty) #Set GPG_TTY veriable, needed for signing git commits other gpg stuff
export SSH_CA_FILES=/home/shihaam/git/alliedmaldives/ops/ssh-ca
#export SSH_CA_FILES=/home/shihaam/git/alliedmaldives/ops/ssh-ca
export SSH_CA_FILES=/home/shihaam/.ssh
export SSH_CA_REVOCATION_LIST=$HOME/git/alliedmaldives/ops/ssh-ca/revoked_keys
export SSL_FILES=/home/shihaam/ssl/allied
#load ble.sh
source ~/.local/share/blesh/ble.sh
@ -37,9 +40,11 @@ math(){ echo $1 | bc;}
checkip(){ dig $1 +short;}
# search for term and edit first file with that specific text
edit(){ nano $(grep $1 * -R | awk '{print $1}'|cut -f1 -d ':' | head -n1);}
root(){ su -c "$@";}
#root(){ su -c "$@";}
# view md file on cli
catmd() { pandoc $1 | lynx -stdin;}
###############################################################################
#load neofetch
neofetch
#neofetch

View File

@ -44,6 +44,10 @@ bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOU
# 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 i3-sensible-terminal
@ -53,8 +57,6 @@ 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 rofi -show 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
@ -113,16 +115,16 @@ 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 "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"
# switch to workspace
bindsym $mod+1 workspace number $ws1
@ -148,7 +150,6 @@ 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)
@ -189,57 +190,20 @@ bar {
status_command i3status
}
##my config
#lock screen
bindsym $mod+shift+x exec i3lock --color=000000
#set wallpaper
#exec nitrogen --restore
#exec_always feh --bg-scale /usr/share/backgrounds/archlinux/archbtw.png
#exec_always feh --no-fehbg --bg-scale '/usr/share/backgrounds/archlinux/archwave.png'
#exec_always feh --no-fehbg --bg-scale ~/Pictures/Wallpapers/current-wallpaper
exec_always ~/.scripts/set-random-wallpaper
#restore displays
exec --no-startup-id /home/shihaam/.scripts/office2kdisplay.sh
#screenshot util
bindsym $mod+shift+s exec flameshot gui
# flameshot
bindsym $mod+Shift+s exec flameshot gui
#fixed opening workspaces
assign [class="TelegramDesktop"] $ws10
#assign [class=""] $ws9
assign [class="obs"] $ws8
assign [class="Virt-manager"] $ws7
assign [class="org.remmina.Remmina"] $ws7
assign [class="Brave"] $ws6
assign [class="Pcmanfm"] $ws5
# start the compositor at login
exec --no-startup-id picom
#window boder size
for_window [class="^.*"] border pixel 0
# Start bluetooth system tray applet at login
exec --no-startup-id blueman-applet
#floating mode windows
# float Bitwarden Extension from brave
for_window [class="Brave-browser" instance="crx_nngceckbapebfimnlniiiahkandclblb"] floating enable
# float network manager setting window
for_window [class="Nm-connection-editor" instance="nm-connection-editor"] floating enable
exec --no-startup-id /home/shihaam/.scripts/scrcpy-autostart
#start programs
exec telegram-desktop
exec_always picom
exec dunst
exec ~/.script/addvirtualsoundcard Virtual-Sound-Card
exec systemctl --user start mpd
exec --no-startup-id i3-msg 'workspace $ws1;exec i3-sensible-terminal ~/.scripts/run'
exec --no-startup-id i3-msg 'workspace $ws9;exec i3-sensible-terminal ncmpcpp'
# Sreen brightness controls
bindsym XF86MonBrightnessUp exec xbacklight -inc 20 # increase screen brightness
bindsym XF86MonBrightnessDown exec xbacklight -dec 20 # decrease screen brightness
# Touchpad controls
bindsym XF86TouchpadToggle exec /home/shihaam/.scripts/toggletouchpad.sh # toggle touchpad
# Media player controls
bindsym XF86AudioPlay exec playerctl play
bindsym XF86AudioPause exec playerctl pause
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous
# start activty watcher
exec --no-startup-id aw-qt

View File

@ -13,6 +13,16 @@ then
fi
###################################################################
###################################################################
read -p "Restore i3wm config?? [Y/n]: " ENABLE_NANO
if [ "$RESTORE_I3" = "Y" ] || [ "$RESTORE_I3" = "y" ] || [ "$RESTORE_I3" = "" ]
then
rm -rfv $HOME/.config/i3
mkdir -p $HOME/.config/i3
ln -s $PWD/config/i3/config $HOME/.config/i3/config
fi
###################################################################
###################################################################
read -p "Restore ~/.bashrc? [Y/n]: " ENABLE_BASHRC
if [ "$ENABLE_BASHRC" = "Y" ] || [ "$ENABLE_BASHRC" = "y" ] || [ "$ENABLE_NANO" = "" ]