diff --git a/calculator.py b/calculator.py deleted file mode 100755 index 370a807..0000000 --- a/calculator.py +++ /dev/null @@ -1,63 +0,0 @@ -from tkinter import * -from tkinter import ttk - -#This is tha main window usulayy called Root -root = Tk() -root.title("simple Calculator") - -numButtonSizeX=10 -numButtonSizeY=10 -calcScreenSize=50 -buttonPerRow=3 -paddingX=10 -paddingY=10 -buttonPaddingX=50 -buttonPaddingY=20 -boderSize=5 - -#FUNCTIONS It doenst matter if this is before the decalaritions(PYthon Thing). -def buttonClick(number): - screen.insert(0,number) -# Creating a widget label -#Labels -#Buttons -button1 = Button(root, text="1", padx=buttonPaddingX,pady=buttonPaddingY, command=lambda: buttonClick(1)) -button2 = Button(root, text="2", padx=buttonPaddingX,pady=buttonPaddingY, command=lambda: buttonClick(2)) -button3 = Button(root, text="3", padx=buttonPaddingX,pady=buttonPaddingY, command=lambda: buttonClick(3)) -button4 = Button(root, text="4", padx=buttonPaddingX,pady=buttonPaddingY, command=lambda: buttonClick(4)) -button5 = Button(root, text="5", padx=buttonPaddingX,pady=buttonPaddingY, command=lambda: buttonClick(5)) -button6 = Button(root, text="6", padx=buttonPaddingX,pady=buttonPaddingY, command=lambda: buttonClick(6)) -button7 = Button(root, text="7", padx=buttonPaddingX,pady=buttonPaddingY, command=lambda: buttonClick(7)) -button8 = Button(root, text="8", padx=buttonPaddingX,pady=buttonPaddingY, command=lambda: buttonClick(8)) -button9 = Button(root, text="9", padx=buttonPaddingX,pady=buttonPaddingY, command=lambda: buttonClick(9)) -button0 = Button(root, text="0", padx=buttonPaddingX,pady=buttonPaddingY, command=lambda: buttonClick(0)) -buttonPlus = Button(root, text="+", padx=buttonPaddingX,pady=buttonPaddingY, command=lambda: buttonClick()) -buttonClear = Button(root, text="Clear", padx=buttonPaddingX*2,pady=buttonPaddingY, command=lambda: buttonClick()) -buttonEqual = Button(root, text="=", padx=buttonPaddingX*2,pady=buttonPaddingY, command=lambda: buttonClick()) - -#Entry -screen = Entry(root, width=calcScreenSize, borderwidth=boderSize) -screen.grid(row=0, column=0, columnspan=buttonPerRow, padx=paddingX, pady=paddingY) - -#Showing on the screen and aranging them -button1.grid(row=1, column=0) -button2.grid(row=1, column=1) -button3.grid(row=1, column=2) - -button4.grid(row=2, column=0) -button5.grid(row=2, column=1) -button6.grid(row=2, column=2) - -button7.grid(row=3, column=0) -button8.grid(row=3, column=1) -button9.grid(row=3, column=2) - -button0.grid(row=4, column=0) -buttonClear.grid(row=4, column=1, columnspan=2) -buttonPlus.grid(row=5, column=0) -buttonEqual.grid(row=5, column=1, columnspan=2) - -#Main Loop Equivalent of our main(); -root.mainloop() - - diff --git a/dotfiles/i3/config b/dotfiles/i3/config index 24fc486..8879648 100644 --- a/dotfiles/i3/config +++ b/dotfiles/i3/config @@ -27,6 +27,8 @@ set $usrBorderUnFocusTextColor #6272a4 set $usrBorderUnFocusedIndicatorColor #ff79c6 set $usrBorderUnFocusChildLineColor #ff79c6 +set $usrBorderGaps 5 + # Default treminal to use set $defTerm "alacritty -e fish" # Default web browser @@ -42,7 +44,7 @@ set $defMenuLauncher "dmenu_run" # Default Wallpaper Mananer : it will be automatically Launched At start set $defWallpaperManager "feh --bg-fill --randomize $HOME/wallpaper/*" # Default Window compositor (fomr, rounded corners, tasparency and so on) :it will be automatically Launched At start -set $defWindowCompositor "picom --config ~/.config/picom/picom.conf" +set $defWindowCompositor "picom --experimental-backends --config ~/.config/picom/picom.conf" # Default sleep time ! it is needed during to startup auto launches to wait for programs to launch on the given workspace # before switching to the other workspace set $defSleep "sleep 5" @@ -132,16 +134,23 @@ bindsym $mod+Shift+q exec i3-msg exit ######## # Font for window titles. Will also be used by the bar unless a different font font pango:monospace 14 + +# COLORO SCHEME # class border backgr. text indicator child_border client.focused $usrBorderFocusLineColor $usrBorderFocusColor $usrBorderFocusTextColor $usrBorderFocusedIndicatorColor $usrBorderFocusChildLineColor client.focused_inactive $usrBorderUnFocusLineColor $usrBorderUnFocusColor $usrBorderUnFocusedTextColor $usrBorderUnFocusedIndicatorColor $usrBorderUnFocusChildLineColor client.unfocused #333333 #222222 #888888 #292d2e #222222 client.urgent #2f343a #900000 #ffffff #900000 #900000 client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c - client.background #F8F8F2 -#gaps inner all set 20 +gaps inner $usrBorderGaps +gaps outer $usrBorderGaps + +for_window [tiling_from="user"] border pixel 3 +for_window [tiling_from="auto"] border pixel 3 +for_window [floating_from="auto"] border pixel 5 +for_window [floating_from="user"] border pixel 5 ######################################################################### # STARTUP # @@ -216,7 +225,7 @@ bindsym $mod+w layout tabbed bindsym $mod+e layout toggle split # toggle tiling / floating -bindsym $mod+Shift+space floating toggle +bindsym $mod+Shift+f floating toggle # change focus between tiling / floating windows bindsym $mod+space focus mode_toggle diff --git a/dotfiles/picom/picom.conf b/dotfiles/picom/picom.conf index cad5072..3ac10de 100755 --- a/dotfiles/picom/picom.conf +++ b/dotfiles/picom/picom.conf @@ -212,8 +212,8 @@ blur-background-exclude = [ # Specify the backend to use: `xrender`, `glx`, or `xr_glx_hybrid`. # `xrender` is the default one. # -# backend = "glx" -backend = "xrender"; +backend = "glx" +#backend = "xrender"; # Enable/disable VSync. # vsync = false @@ -426,5 +426,3 @@ wintypes: popup_menu = { opacity = 0.8; } dropdown_menu = { opacity = 0.8; } }; - -opacity-rule = [ "100:class_g = 'Evolution' && focused", "100:class_g = 'Evolution' && !focused" ]; diff --git a/dotfiles/vim/.vimrc b/dotfiles/vim/.vimrc index ec455ef..0e12e61 100644 --- a/dotfiles/vim/.vimrc +++ b/dotfiles/vim/.vimrc @@ -1,10 +1,10 @@ "BASICS-------------------------------------------------------------- -set exrc ""You can get some cuntomizations if therre is a vimrc on the local eare that you are it wiil use it. +set exrc ""You can get some cuntomizations if therre is a vimrc on the local eare that you are it will use it. set guicursor= ""Bi cursor for oldstyle lovers. -set relativenumber ""Show the line beofre and ofetr starting from your line +set relativenumber ""Show the line beofre and ofetr starting from your line. set noerrorbells ""No sound effects. -set tabstop=4 ""TabSize of 4 -set shiftwidth=4 ""Indentation fo 4 +set tabstop=4 ""TabSize of 4. +set shiftwidth=4 ""Indentation fo 4. set softtabstop=4 ""Enabeling it will remplace tabs by spaces in insert mode set noexpandtab ""Enabeling it will remplace tabs by spaces set smartindent ""will try it's best to indent for you. @@ -12,23 +12,24 @@ set nowrap ""Will continue to go right when line is too long set incsearch ""incremental searching as i am typing the words will be highligted. set number ""Self explanatory set scrolloff=8 ""Will start to scroll down wehn there is still 8 Lines before end of page. - "Backup and Undo set noswapfile ""No swap file. they are anoying set nobackup ""Nobackup because we will do a undo dir set undodir=~/.vim/undodir set undofile - packadd termdebug let g:termdebug_wide=1 - filetype plugin indent on syntax enable - :autocmd InsertEnter,InsertLeave * set cul! "-------------------------------------------------------------------- "PLUGINS------------------------------------------------------------- +"plugins(included with vim) for file specific mappings Located at ~/.vim/ftplugin/ +"Example for c Would be: ~/.vim/ftplugin/c_mappings.vim +filetype plugin on + +"Plug pkluginmanager start and end call plug#begin('~/.vim/plugged') Plug 'gruvbox-community/gruvbox' Plug 'arcticicestudio/nord-vim' @@ -36,7 +37,6 @@ Plug 'vim-utils/vim-man' Plug 'mbbill/undotree' Plug 'gyim/vim-boxdraw' Plug 'vim-airline/vim-airline' -""Plug 'theprimeagen/vim-be-good' call plug#end() "-------------------------------------------------------------------- @@ -44,37 +44,63 @@ call plug#end() set colorcolumn=100 highlight ColorColumn ctermbg=0 guibg=lightgrey set signcolumn=yes - colorscheme gruvbox set background=dark highlight Normal guibg=blue - -" lightline -"" set noshowmode -""let g:lightline = { 'colorscheme': 'nord' } "-------------------------------------------------------------------- "REMAPS-------------------------------------------------------------- +"(VIM) Remaps Spca bar as the Leader command let mapleader=" " -"Ease of window jumg intead of ^wj etc.. -map h :wincmd h -map j :wincmd j -map k :wincmd k -map l :wincmd l + +"(NAVIGATION) +"Switches to the Left window +map h :wincmd h +"Switches to the Bottom window +map j :wincmd j +"Switches to the Top window +map k :wincmd k +"Switches to the Right window +map l :wincmd l + +"(FILES) +map fw :Sex! :vertical resize 30 map u :UndotreeShow + +"(POSITION) +"[P]ut one line [U]p everything from the cursor till the end of the line +map pu d$Op +"[P]ut one line [D]own everything from the cursor till the end of the line +map pd d$op + +"(WORD) Manipulation +"[W]ord [R]reformat for word under the cursor +map wr ebvey:%s/0//g +"[C]hange [W]ord in registered buffer To be more similar to whant vim implment +map cw ebvey/0Ncw +"[C]hange [N]ext word in registered buffer To be more similar to what vim implements +map cn ncw +"[W]ord [N]ext occurence for word under the cursor +map wn ebvey/0 +"[W]ord [P]revious occurence for word under the cursor +map wp ebvey/0NN +"[W]ord [S]earch for word under the cursor +map ws ebvey/0 +"[W]ord [F]ind [F]irst for word under the cursor +map wff ebveyG/0 +"[W]ord [F]ind [L]ast for word under the cursor +map wfl ebveyG/0N +"-------------------------------------------------------------------- + +"DEBUGER-------------------------------------------------------------- map db :Termdebug :vertical resize 30 noremap ts :Step noremap to :Over noremap tn :Next noremap tc :Cont -map pv :Sex! :vertical resize 30 -map ,/ :s/^/\/\// -map ,{ :s/);/)\r{\r\t\r}\r/g -map ra ebvey :%s/0/ "-------------------------------------------------------------------- "WILDMENU FOR FUZZY FILE SEARCH-------------------------------------- -filetype plugin on "plugins(included with vim) for netrw set path+=** set wildmenu "Display all matching files when we tab complete @@ -106,30 +132,17 @@ command! MakeTags !ctags -R . " - Use ^n and ^p to go back and forth in the suggestion list "-------------------------------------------------------------------- -"FILE BROWSING------------------------------------------------------- -let g:netrw_banner=0 " disable annoying banner -let g:netrw_browse_split=4 " open in prior window -let g:netrw_altv=1 " open splits to the right -let g:netrw_liststyle=3 " tree view -let g:netrw_list_hide=netrw_gitignore#Hide() -let g:netrw_list_hide.=',\(^\|\s\s\)\zs\.\S\+' - - " NOW WE CAN: - " - :edit a folder to open a file browser - " - /v/t to open in an h-split/v-split/tab - " - check |netrw-browse-maps| for more mappings -"PLUGINS------------------------------------------------------------- -"-------------------------------------------------------------------- - "SNIPPETS------------------------------------------------------------ -" Command Read template move cursor -nnoremap ,html :-1read $HOME/.vim/.skeleton.html3jwf>a - -" NOW WE CAN: -" - Take over the world! -" (with much fewer keystrokes) +" Command Read template move cursor +nnoremap shs :-1read $HOME/.vim/snippets/html_skeleton.html5jwf>a +nnoremap shb :-1read $HOME/.vim/snippets/html_vertical_bracets.html:s/VARTOCHANGE//g +nnoremap sht :-1read $HOME/.vim/snippets/html_horizontal_bracets.html:.,+2s/VARTOCHANGE//g +nnoremap scf :-1read $HOME/.vim/snippets/c_for.cyi)/0N:s/VARTOCHANGE//g +nnoremap scs :-1read $HOME/.vim/snippets/c_switch.cyi)/0Ncw +nnoremap scw :-1read $HOME/.vim/snippets/c_while.cyi)/0Ncw "-------------------------------------------------------------------- + "BUILD INTEGRATION--------------------------------------------------- " Steal Mr. Bradley's formatter & add it to our spec_helper " http://philipbradley.net/rspec-into-vim-with-quickfix diff --git a/dotfiles/vim/ftplugin/c_mappings.vim b/dotfiles/vim/ftplugin/c_mappings.vim new file mode 100644 index 0000000..79386a0 --- /dev/null +++ b/dotfiles/vim/ftplugin/c_mappings.vim @@ -0,0 +1,2 @@ +map :s/^/\/\// +map :s/\/\/// diff --git a/dotfiles/vim/snippets/c_for.c b/dotfiles/vim/snippets/c_for.c new file mode 100644 index 0000000..cb396ce --- /dev/null +++ b/dotfiles/vim/snippets/c_for.c @@ -0,0 +1,4 @@ +for(VARTOCHANGE = 0; VARTOCHANGE < n; VARTOCHANGE++) +{ + VARTOCHANGE +} diff --git a/dotfiles/vim/snippets/c_switch.c b/dotfiles/vim/snippets/c_switch.c new file mode 100644 index 0000000..7ce3c88 --- /dev/null +++ b/dotfiles/vim/snippets/c_switch.c @@ -0,0 +1,19 @@ +switch (VARTOCHANGE) +{ + case VARTOCHANGE: + break; + + case VARTOCHANGE: + break; + + case VARTOCHANGE: + break; + + case VARTOCHANGE: + break; + + case VARTOCHANGE: + break; + + default: +} diff --git a/dotfiles/vim/snippets/c_while.c b/dotfiles/vim/snippets/c_while.c new file mode 100644 index 0000000..60e660a --- /dev/null +++ b/dotfiles/vim/snippets/c_while.c @@ -0,0 +1,4 @@ +while(VARTOCHANGE) +{ + VARTOCHANGE +} diff --git a/dotfiles/vim/snippets/htlm_skeleton.html b/dotfiles/vim/snippets/htlm_skeleton.html new file mode 100644 index 0000000..0651214 --- /dev/null +++ b/dotfiles/vim/snippets/htlm_skeleton.html @@ -0,0 +1,14 @@ + + + + + + + + +
+
+
+
+ + diff --git a/dotfiles/vim/snippets/html_horizontal_bracets.html b/dotfiles/vim/snippets/html_horizontal_bracets.html new file mode 100644 index 0000000..dd17dd9 --- /dev/null +++ b/dotfiles/vim/snippets/html_horizontal_bracets.html @@ -0,0 +1,3 @@ + + + diff --git a/dotfiles/vim/snippets/html_vertical_bracets.html b/dotfiles/vim/snippets/html_vertical_bracets.html new file mode 100644 index 0000000..0300df7 --- /dev/null +++ b/dotfiles/vim/snippets/html_vertical_bracets.html @@ -0,0 +1 @@ + diff --git a/main.py b/main.py deleted file mode 100755 index 1557026..0000000 --- a/main.py +++ /dev/null @@ -1,44 +0,0 @@ -from tkinter import * -from tkinter import ttk - -#This is tha main window usulayy called Root -root = Tk() -root.title("simple Calculator") - -numButtonSizeX=10; -numButtonSizeY=10; -calcScreenSize=50; - - -#FUNCTIONS It doenst matter if this is before the decalaritions(PYthon Thing). -def myClick(): - clicText = "Label 1 Entry is: " + myEntry.get() - myCLickLabel = Label(root, text=clicText) - myCLickLabel.grid(row=5, column=0) - -# Creating a widget label -#Labels -myLabel1 = Label(root, text="Label1") -myLabel2 = Label(root, text="Label2") -#Buttons -myButton1 = Button(root, text="do not press", state=DISABLED, padx=10,pady=10,fg="blue",bg="orange") -myButton2 = Button(root, text="do not press",command=myClick,fg="blue",bg="orange") - -#Entry -myEntry = Entry(root, width=50) -myEntry.insert(0, "Isert Label one's Entry") -myEntry.grid(row=0, column=1) - -#Showing on the screen and aranging them -myLabel1.grid(row=0, column=0) -myLabel2.grid(row=1, column=0) -myButton1.grid(row=3, column=0) -myButton2.grid(row=4, column=0) - - - - -#Main Loop Equivalent of our main(); -root.mainloop() - - diff --git a/programs/picom/picom.sh b/programs/picom/picom.sh index 137eb4b..e812074 100755 --- a/programs/picom/picom.sh +++ b/programs/picom/picom.sh @@ -13,13 +13,10 @@ install_picom() case $OS in debian) - sudo apt install -y picom - ;; - ddebian) graphics_install_prompt "For Debian The verison which supports rounded edges" graphics_install_prompt "Source : $picomDebianSource" - install_from_list "${picom_req_list_debian[@]}" + install_from_repo "${picom_req_list_debian[@]}" git clone $picomDebianSource ls cd picom diff --git a/programs/vim/vim.sh b/programs/vim/vim.sh index cd5ffce..6f8ef57 100755 --- a/programs/vim/vim.sh +++ b/programs/vim/vim.sh @@ -2,12 +2,13 @@ VIM_SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) -LOCALVIMRC="$VIM_SCRIPT_DIR/../../dotfiles/vim/.vimrc" +VIM_DOTFILE_DIR="$VIM_SCRIPT_DIR/../../dotfiles/vim" +VIM_DOTFILE_VIMRC="$VIM_DOTFILE_DIR/.vimrc" +VIM_DOTFILE_FTPLUGIN="$VIM_DOTFILE_DIR/ftplugin" +VIM_DOTFILE_SMIPPETS="$VIM_DOTFILE_DIR/snippets" -echo "VIM dotfile $DOTFILE_DIR" - -VIMRC="/home/$USER/.vimrc" -VIMDIR="/home/$USER" +USER_DOFILE_VIMRC="/home/$USER/.vimrc" +USER_VIM_DIR="/home/$USER/.vim" CURDATE=$(date +%m%d%Y%H%M%S) @@ -18,15 +19,8 @@ install_vim() graphics_install_prompt "Vim Will be installed" install_from_repo "vim" - - if [ -f $VIMRC ]; - then - echo Backing the old config file with the current date - cp $VIMRC "$VIMRC"."$CURDATE" - cp $LOCALVIMRC $VIMDIR - else - cp $LOCALVIMRC $VIMDIR - fi + cp $VIM_DOTFILE_VIMRC $USER_DOFILE_VIMRC + cp -r $VIM_DOTFILE_FTPLUGIN $VIM_DOTFILE_SMIPPETS $USER_VIM_DIR curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim diff --git a/setup.sh b/setup.sh index 04134e7..04e6bc8 100755 --- a/setup.sh +++ b/setup.sh @@ -40,9 +40,10 @@ pckgmngr_list=('sudo apt -y install' 'sudo pacman -S' 'raspi install') common_programs_list=(htop curl tmux git mc wget sudo unzip cmake make gcc exa scrot acpi) # These pacakges must not be found in the standart repositories and can be gits or direct installs -custom_installs_debian=(fish dmenu fonts wallpaper i3 picom alacritty obsidian sddm) -custom_installs_arch=(fish dmenu fonts wallpaper i3 picom alacritty obsidian sddm) -custom_installs_raspberry=(fish dmenu fonts wallpaper i3 picom alacritty sddm) +#custom_installs_debian=(vim fish dmenu fonts wallpaper i3 picom alacritty obsidian sddm) +custom_installs_debian=(vim) +custom_installs_arch=(vim fish dmenu fonts wallpaper i3 picom alacritty obsidian sddm) +custom_installs_raspberry=(vim fish dmenu fonts wallpaper i3 picom alacritty sddm) os_count=${#os_list[@]} pckgmngr_count=${#pckgmngr_list[@]}