From 33bfafb50ea8a9842cb41e599f487e3ee0146618 Mon Sep 17 00:00:00 2001 From: mitsuo Date: Mon, 22 Nov 2021 05:36:18 -0500 Subject: Restructure directory, Fix install.sh --- 20-libinput.conf | 12 -- applications.txt | 51 ------- extra/20-libinput.conf | 12 ++ extra/applications.txt | 51 +++++++ extra/newdebian | 199 ++++++++++++++++++++++++++ extra/qtcurvetestsettings.qtcurve | 165 ++++++++++++++++++++++ fun.vim | 83 ----------- newdebian | 199 -------------------------- qtcurvetestsettings.qtcurve | 165 ---------------------- vim/fun.vim | 83 +++++++++++ vim/vimrc | 285 ++++++++++++++++++++++++++++++++++++++ vimrc | 285 -------------------------------------- 12 files changed, 795 insertions(+), 795 deletions(-) delete mode 100644 20-libinput.conf delete mode 100644 applications.txt create mode 100644 extra/20-libinput.conf create mode 100644 extra/applications.txt create mode 100644 extra/newdebian create mode 100644 extra/qtcurvetestsettings.qtcurve delete mode 100644 fun.vim delete mode 100644 newdebian delete mode 100644 qtcurvetestsettings.qtcurve create mode 100644 vim/fun.vim create mode 100644 vim/vimrc delete mode 100644 vimrc diff --git a/20-libinput.conf b/20-libinput.conf deleted file mode 100644 index b621fa2..0000000 --- a/20-libinput.conf +++ /dev/null @@ -1,12 +0,0 @@ -# Enable single tab, double tab, tab with 2 and 3 fingers and -# natural scrolling. -# Retrived/Adapted from https://abdullah.today/2019/09/19/things-to-do-after-debian-install.html -Section "InputClass" - Identifier "libinput touchpad catchall" - MatchIsTouchpad "on" - Driver "libinput" - MatchDevicePath "/dev/input/event*" - Option "Tapping" "on" - Option "TappingButtonMap" "Irm" - Option "NaturalScrolling" "false" -EndSection diff --git a/applications.txt b/applications.txt deleted file mode 100644 index e856407..0000000 --- a/applications.txt +++ /dev/null @@ -1,51 +0,0 @@ -Applications and programs I use - -Programs -================================================================================ - -Most of these can be easily installed using apt(8). - -utilities - ghostscript gnupg screenfetch neofetch htop gparted R rename curl gzip grep - -devices - acpi cups - -media - vlc audacity mpv feh - -docs - pdftk pandoc groff vim libreoffice - -mail - mutt thunderbird - -reading - zathura calibre - -music - clementine mpc ncmpcpp spotify - -games - zsnes retroarch dolphin cowsay steam minecraft - -productivity - taskwarrior timewarrior - -dev - virtualbox git netbeans - -ref - goldendict wordnet gcide tldr - -network - qbittorrent - -internet - brave-browser discord mullvad-vpn - - -Manual config -====================================================================== - -feh: add heif support using https://github.com/vi/imlib2-heic diff --git a/extra/20-libinput.conf b/extra/20-libinput.conf new file mode 100644 index 0000000..b621fa2 --- /dev/null +++ b/extra/20-libinput.conf @@ -0,0 +1,12 @@ +# Enable single tab, double tab, tab with 2 and 3 fingers and +# natural scrolling. +# Retrived/Adapted from https://abdullah.today/2019/09/19/things-to-do-after-debian-install.html +Section "InputClass" + Identifier "libinput touchpad catchall" + MatchIsTouchpad "on" + Driver "libinput" + MatchDevicePath "/dev/input/event*" + Option "Tapping" "on" + Option "TappingButtonMap" "Irm" + Option "NaturalScrolling" "false" +EndSection diff --git a/extra/applications.txt b/extra/applications.txt new file mode 100644 index 0000000..e856407 --- /dev/null +++ b/extra/applications.txt @@ -0,0 +1,51 @@ +Applications and programs I use + +Programs +================================================================================ + +Most of these can be easily installed using apt(8). + +utilities + ghostscript gnupg screenfetch neofetch htop gparted R rename curl gzip grep + +devices + acpi cups + +media + vlc audacity mpv feh + +docs + pdftk pandoc groff vim libreoffice + +mail + mutt thunderbird + +reading + zathura calibre + +music + clementine mpc ncmpcpp spotify + +games + zsnes retroarch dolphin cowsay steam minecraft + +productivity + taskwarrior timewarrior + +dev + virtualbox git netbeans + +ref + goldendict wordnet gcide tldr + +network + qbittorrent + +internet + brave-browser discord mullvad-vpn + + +Manual config +====================================================================== + +feh: add heif support using https://github.com/vi/imlib2-heic diff --git a/extra/newdebian b/extra/newdebian new file mode 100644 index 0000000..3dc994e --- /dev/null +++ b/extra/newdebian @@ -0,0 +1,199 @@ +My configuration description of Debian - Plasma KDE 5. + +# KDE Plasma 5 configuration + +Appearance: + Workspace Theme: + L&F: Breeze Dark + DT: Sweet + Cursor Theme: Breeze + Colors: Breeze + Fonts: + Fixed width: SF Mono 10 + Icons: Breeze Dark + Application Style: + Widget style: QtCurve + settings file: qtcurvesettings.qtcurve + Window Decoration: + Breeze: + Don't allow resize on maximazed windows. + Window borders: tiny. +Workspace: + Desktop Behaviour: + Workspace: Double-click to open files and folders + Screen Edges: No. + Screen Locking: + No automatick screen lock. + Wallpaper: spongebob little cockroach eating krabbypatty, Scaled. + Virtual Desktops: 2, 1 row. + Activities: Default and Leisure + Window Management: + Window Behaviour: + Advanced: + Window placement: Cascaded + Task Switcher: + Visualization: MediumRounded + KWin Scripts: + Enforces Window Decoration on GTK+ window + MinimizeAll (Meta+D) + Shortcuts: + Global: + Launch Dolphin Meta+E + Launch Firefox Meta+W + Launch GoldenDict Meta+G + Launch KCalc Meta+C (although python3 is better) + Launch Konsole Meta+ + Launch Thunderbird Meta+M + Launch Zathura Meta+Z + Launch Zeal Meta+H + + (Spectacle(1) default global shortcuts) + Take Active Win SS Meta+Print + Take Full SS Shift+Print + Take Rect. Reg. SS Meta+Shift+Print + + (KDE's default) + Run command Alt+Space + + (Power Management) + Hibernate Meta+Shift+Z + Suspend (aka. sleep)Meta+Shift+X + Custom: + zazke: + Shutdown Meta+Shift+S systemctl poweroff + Web: (shortcut:"search string" in Run command) + Amazon amz + RAE rae https://dle.rae.es/?w=\{@} + Github gh + Gitlab gt + Google gg + Google Maps ggm + MetaCrawler mc + Python Ref py + Qt4 Doc qt4 + Vimeo vm + Wikia wikia + Wikipedia wp + Youtube yt + Startup and Shutdown: + Login Screen: + Theme: Debian Maui + Wallpaper: Black Pearl Nandita + Autostart: dropboxd # I think this one is configured + # automatically +Personalization: + Regional Setings: + Language: en_US + Formats: en_CA + Applications: + Default Applications: + Email Thunder + File Manager Dolphin + Terminal Emu Konsole + Web Browser Firefox + File Associations: + Text Vim + Image feh + Video mpv + Audio mpv + pdf zathura + Location for Personal Files: + Documents: /home/mitsuo/docs + Movies: /home/mitsuo/media/Videos + Pictures: /home/mitsuo/media/Pictures + Music: /home/mitsuo/media/Music +Network: + Bluetooth: + Disable +Hardware: + Input Devices: + Keyboard: + NumLock on Plasma Startup: Turn on + Show layout indicator + Make Caps Lock an additional Esc + Switch to another layout with Win+Space + Mouse Controls: + Pointer speed: 4.5 + Acceleration: flat + Touchpad: + Edge scrolling: no + Two-finger scrolling: yes + Reverse scrolling: no + Power Management: + Energy Saving: + On AC Power: + Dim screen: OFF + Switch off screen after 5 min + Suspend session: NO + Button events: + When lid closed: Do nothing + When power button pressed: Prompt log out dialog + On Battery: + Dim screen: OFF + Switch off screen after 5 min + Suspend session: 10 min (Sleep) + Button events: + When lid closed: Do nothing + When power button pressed: Prompt log out dialog + On Low Battery: + Screen brightness: low + Dim screen: OFF + Switch off screen after 5 min + Suspend session: 10 min (Hibernate) + Button events: + When lid closed: Do nothing + When power button pressed: Prompt log out dialog + Advanced Setting: + Low level: 10% + Critical level: 3% + At critical level: Hibernate + Pause media players when suspending: ON + Removable Storage: + Removable Devices: + Enable automatic mounting of removable media: OFF + + +## Widgets configuration + +(Default one is "Application Launcher") +Application Menu: + Behaviour: + Icon: Stardewvalley chicken + Show application as: Name only + Categories: + Show: Recently used + Show recent applications + Show recent documents + Search: + Expand search to bookmarks, files and emails + Align search results to bottom # what does this do? + +Task Manager: + Position: + Bottom, autohide, 32 px heigh + Widgets: + Application Menu + Pager + Icons-only Task Manager + System Tray: + Battery + Digital Clock + Media Controls + Clipboard + Clock: + Appearance: + Show date + Show seconds + Use 24-hour Clock + ISO Date + Calendar: + Show week numbers in Calendar + +## Apps + +Dolphin + TODO + +Konsole + TODO + diff --git a/extra/qtcurvetestsettings.qtcurve b/extra/qtcurvetestsettings.qtcurve new file mode 100644 index 0000000..787da51 --- /dev/null +++ b/extra/qtcurvetestsettings.qtcurve @@ -0,0 +1,165 @@ +[KWin] +BorderSize=3 +InnerBorder=0 +OuterBorder=0 + +[Settings] +activeTabAppearance=soft +animatedProgress=false +appearance=soft +bgndAppearance=flat +bgndGrad=horiz +bgndImage=none +bgndOpacity=100 +boldProgress=false +borderInactiveTab=false +borderMenuitems=false +borderProgress=true +borderSbarGroove=true +borderSelection=false +borderTab=true +buttonEffect=shadow +buttonStyleMenuSections=true +centerTabText=false +colorMenubarMouseOver=true +colorSelTab=0 +colorSliderMouseOver=false +coloredMouseOver=glow +coloredTbarMo=false +comboBtn=none +comboSplitter=false +crButton=true +crColor=none +crHighlight=0 +crSize=15 +customAlphas=0 +customMenuNormTextColor=#000000 +customMenuSelTextColor=#000000 +customMenuTextColor=false +customShades=1.16,1.07,0.9,0.78,0.84,0.75 +customgradient1=3d,0,1.2,0.5,1,1,1 +customgradient2=3d,0,0.9,0.5,1,1,1 +darkerBorders=false +defBtnIndicator=glow +dlgOpacity=100 +doubleGtkComboArrow=false +drawStatusBarFrames=false +dwtAppearance=customgradient1 +dwtSettings=33 +embolden=false +etchEntry=false +expanderHighlight=3 +fadeLines=true +fillProgress=true +fillSlider=true +flatSbarButtons=true +focus=glow +forceAlternateLvCols=false +gbFactor=-3 +gbLabel=9 +glowProgress=end +grooveAppearance=inverted +groupBox=faded +gtkButtonOrder=false +gtkComboMenus=false +gtkScrollViews=true +handles=dashes +hideShortcutUnderline=true +highlightFactor=3 +highlightScrollViews=true +highlightTab=false +inactiveTitlebarAppearance=customgradient1 +invertBotTab=true +lighterPopupMenuBgnd=2 +lvAppearance=bevelled +lvButton=false +lvLines=false +mapKdeIcons=true +menuBgndAppearance=flat +menuBgndGrad=horiz +menuBgndImage=none +menuBgndOpacity=100 +menuCloseDelay=300 +menuDelay=225 +menuIcons=true +menuStripe=none +menuStripeAppearance=darkinverted +menubarAppearance=flat +menubarApps=smplayer,VirtualBox +menubarHiding=0 +menubarMouseOver=true +menuitemAppearance=fade +noBgndGradientApps= +noBgndImageApps= +noBgndOpacityApps=sonata,vmplayer,smplayer,totem,vmware +noMenuBgndOpacityApps=gtk,sonata,vmplayer,totem,vmware +noMenuStripeApps=gtk,soffice.bin +nonnativeMenubarApps= +onlyTicksInMenu=false +passwordChar=9679 +popupBorder=true +progressAppearance=dullglass +progressColor=#006C00 +progressGrooveAppearance=inverted +progressGrooveColor=dark +reorderGtkButtons=false +round=extra +roundAllTabs=true +roundMbTopOnly=true +sbarBgndAppearance=flat +scrollbarType=kde +selectionAppearance=harsh +shadeCheckRadio=none +shadeMenubarOnlyWhenActive=false +shadeMenubars=none +shadePopupMenu=false +shadeSliders=none +shading=hsl +shadowSize=30 +sliderAppearance=gradient +sliderFill=true +sliderStyle=plain +sliderThumbs=flat +sliderWidth=15 +smallRadio=true +sortedLv=none +splitterHighlight=3 +splitters=1dot +square=1538 +statusbarApps=kde +statusbarHiding=0 +stdBtnSizes=false +stdSidebarButtons=false +stripedProgress=diagonal +stripedSbar=false +sunkenAppearance=soft +tabAppearance=soft +tabBgnd=0 +tabMouseOver=glow +tbarBtnAppearance=none +tbarBtnEffect=none +tbarBtns=standard +thin=1 +thinSbarGroove=true +titlebarAlignment=center-full +titlebarAppearance=customgradient1 +titlebarButtonAppearance=gradient +titlebarButtonColors=#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000 +titlebarButtons=5 +titlebarEffect=shadow +titlebarIcon=title +toolbarAppearance=customgradient1 +toolbarBorders=light +toolbarSeparators=flat +toolbarTabs=false +tooltipAppearance=gradient +unifyCombo=true +unifySpin=true +unifySpinBtns=false +useHighlightForMenu=false +useQtFileDialogApps= +vArrows=true +version=1.9.0 +windowBorder=36 +windowDrag=0 +xCheck=false diff --git a/fun.vim b/fun.vim deleted file mode 100644 index 0dbfe11..0000000 --- a/fun.vim +++ /dev/null @@ -1,83 +0,0 @@ -" Echoes longest line number and lenght. - -function! LongestLineLength ( ) - let maxlength = 0 - let linenumber= 1 - while linenumber <= line("$") - exe ":".linenumber - let linelength = virtcol("$") - if maxlength < linelength - let maxlength = linelength - let maxlinenumber = linenumber - endif - let linenumber = linenumber+1 - endwhile - -"exe ':0' -"exe 'normal O' -"exe 'normal 0C'.maxlength - exe "normal" . maxlinenumber . "G" - exe ":echo \"" . maxlinenumber . ": " . maxlength . "\"" -endfunction - -command LongestLineLength call LongestLineLength() - - -" Save markdown document and export to pdf using pandoc. -" -" It would be nicer if a default document would be used but I coulnd't made it -" to work even after reading that manual section like 2 times. Also, there are -" variables that are lists of other variables that I don't know how to make them -" work (e.g. geometry=[top=1in, bottom=1in, heightrounded]) - -function! Md2Pdf ( ) - exe ":w" - "-N for numbered headers - exe ":! pandoc -o \"" . expand("%:r") . ".pdf\" -t latex --variable classoption=twosides --variable papersize=a4 --variable margin-left=1in --variable margin-right=1in --variable margin-top=1in --variable margin-bottom=1in --variable links-as-notes --variable colorlinks --variable pagestyle=plain --variable documentclass=article -f markdown-implicit_figures \"" . expand("%") . "\"" - echo "pdf saved as \"" . expand("%:p:r") . ".pdf\"" -endfunction - -function! Md2Pdfms ( ) - exe ":w" - exe ":! pandoc -o " . expand("%:r") . ".pdf" . " -t ms -f markdown-implicit_figures \"" . expand("%") . "\"" - echo "pdf saved as " . expand("%:p:r") . ".pdf" -endfunction - -command Md2Pdf call Md2Pdf() -command Md2Pdfms call Md2Pdfms() - - -" Save markdown document and export to html using pandoc - -function! Md2Html ( ) - exe ":w" - exe ":! pandoc -o \"" . expand("%:r") . ".html\"" . " -s \"" . expand("%") . "\"" - echo "html saved as " . expand("%:p:r") . ".html" -endfunction - -command Md2Html call Md2Html() - -" Compiles and Runs a C++ project - -" TODO: how to add program's arguments or file redirectioning from command. -function! CompRunProj ( ) - exe ":w" - exe ":! g++ -o " . expand("%:r") . "-g *.cpp" - exe ":! ./" . expand("%:r") -endfunction - -command CompRunProj call CompRunProj() - - -" Function made to give feedback to students code in 1INF01 - -" export C code to syntax highlighted pdf -function! C2Pdf ( ) - exe ":set ts=4" - exe ":w" - exe ":ha > %.ps" - exe ":!ps2pdf %.ps" - exe ":!rm %.ps" -endfunction - -command C2Pdf call C2Pdf() diff --git a/newdebian b/newdebian deleted file mode 100644 index 3dc994e..0000000 --- a/newdebian +++ /dev/null @@ -1,199 +0,0 @@ -My configuration description of Debian - Plasma KDE 5. - -# KDE Plasma 5 configuration - -Appearance: - Workspace Theme: - L&F: Breeze Dark - DT: Sweet - Cursor Theme: Breeze - Colors: Breeze - Fonts: - Fixed width: SF Mono 10 - Icons: Breeze Dark - Application Style: - Widget style: QtCurve - settings file: qtcurvesettings.qtcurve - Window Decoration: - Breeze: - Don't allow resize on maximazed windows. - Window borders: tiny. -Workspace: - Desktop Behaviour: - Workspace: Double-click to open files and folders - Screen Edges: No. - Screen Locking: - No automatick screen lock. - Wallpaper: spongebob little cockroach eating krabbypatty, Scaled. - Virtual Desktops: 2, 1 row. - Activities: Default and Leisure - Window Management: - Window Behaviour: - Advanced: - Window placement: Cascaded - Task Switcher: - Visualization: MediumRounded - KWin Scripts: - Enforces Window Decoration on GTK+ window - MinimizeAll (Meta+D) - Shortcuts: - Global: - Launch Dolphin Meta+E - Launch Firefox Meta+W - Launch GoldenDict Meta+G - Launch KCalc Meta+C (although python3 is better) - Launch Konsole Meta+ - Launch Thunderbird Meta+M - Launch Zathura Meta+Z - Launch Zeal Meta+H - - (Spectacle(1) default global shortcuts) - Take Active Win SS Meta+Print - Take Full SS Shift+Print - Take Rect. Reg. SS Meta+Shift+Print - - (KDE's default) - Run command Alt+Space - - (Power Management) - Hibernate Meta+Shift+Z - Suspend (aka. sleep)Meta+Shift+X - Custom: - zazke: - Shutdown Meta+Shift+S systemctl poweroff - Web: (shortcut:"search string" in Run command) - Amazon amz - RAE rae https://dle.rae.es/?w=\{@} - Github gh - Gitlab gt - Google gg - Google Maps ggm - MetaCrawler mc - Python Ref py - Qt4 Doc qt4 - Vimeo vm - Wikia wikia - Wikipedia wp - Youtube yt - Startup and Shutdown: - Login Screen: - Theme: Debian Maui - Wallpaper: Black Pearl Nandita - Autostart: dropboxd # I think this one is configured - # automatically -Personalization: - Regional Setings: - Language: en_US - Formats: en_CA - Applications: - Default Applications: - Email Thunder - File Manager Dolphin - Terminal Emu Konsole - Web Browser Firefox - File Associations: - Text Vim - Image feh - Video mpv - Audio mpv - pdf zathura - Location for Personal Files: - Documents: /home/mitsuo/docs - Movies: /home/mitsuo/media/Videos - Pictures: /home/mitsuo/media/Pictures - Music: /home/mitsuo/media/Music -Network: - Bluetooth: - Disable -Hardware: - Input Devices: - Keyboard: - NumLock on Plasma Startup: Turn on - Show layout indicator - Make Caps Lock an additional Esc - Switch to another layout with Win+Space - Mouse Controls: - Pointer speed: 4.5 - Acceleration: flat - Touchpad: - Edge scrolling: no - Two-finger scrolling: yes - Reverse scrolling: no - Power Management: - Energy Saving: - On AC Power: - Dim screen: OFF - Switch off screen after 5 min - Suspend session: NO - Button events: - When lid closed: Do nothing - When power button pressed: Prompt log out dialog - On Battery: - Dim screen: OFF - Switch off screen after 5 min - Suspend session: 10 min (Sleep) - Button events: - When lid closed: Do nothing - When power button pressed: Prompt log out dialog - On Low Battery: - Screen brightness: low - Dim screen: OFF - Switch off screen after 5 min - Suspend session: 10 min (Hibernate) - Button events: - When lid closed: Do nothing - When power button pressed: Prompt log out dialog - Advanced Setting: - Low level: 10% - Critical level: 3% - At critical level: Hibernate - Pause media players when suspending: ON - Removable Storage: - Removable Devices: - Enable automatic mounting of removable media: OFF - - -## Widgets configuration - -(Default one is "Application Launcher") -Application Menu: - Behaviour: - Icon: Stardewvalley chicken - Show application as: Name only - Categories: - Show: Recently used - Show recent applications - Show recent documents - Search: - Expand search to bookmarks, files and emails - Align search results to bottom # what does this do? - -Task Manager: - Position: - Bottom, autohide, 32 px heigh - Widgets: - Application Menu - Pager - Icons-only Task Manager - System Tray: - Battery - Digital Clock - Media Controls - Clipboard - Clock: - Appearance: - Show date - Show seconds - Use 24-hour Clock - ISO Date - Calendar: - Show week numbers in Calendar - -## Apps - -Dolphin - TODO - -Konsole - TODO - diff --git a/qtcurvetestsettings.qtcurve b/qtcurvetestsettings.qtcurve deleted file mode 100644 index 787da51..0000000 --- a/qtcurvetestsettings.qtcurve +++ /dev/null @@ -1,165 +0,0 @@ -[KWin] -BorderSize=3 -InnerBorder=0 -OuterBorder=0 - -[Settings] -activeTabAppearance=soft -animatedProgress=false -appearance=soft -bgndAppearance=flat -bgndGrad=horiz -bgndImage=none -bgndOpacity=100 -boldProgress=false -borderInactiveTab=false -borderMenuitems=false -borderProgress=true -borderSbarGroove=true -borderSelection=false -borderTab=true -buttonEffect=shadow -buttonStyleMenuSections=true -centerTabText=false -colorMenubarMouseOver=true -colorSelTab=0 -colorSliderMouseOver=false -coloredMouseOver=glow -coloredTbarMo=false -comboBtn=none -comboSplitter=false -crButton=true -crColor=none -crHighlight=0 -crSize=15 -customAlphas=0 -customMenuNormTextColor=#000000 -customMenuSelTextColor=#000000 -customMenuTextColor=false -customShades=1.16,1.07,0.9,0.78,0.84,0.75 -customgradient1=3d,0,1.2,0.5,1,1,1 -customgradient2=3d,0,0.9,0.5,1,1,1 -darkerBorders=false -defBtnIndicator=glow -dlgOpacity=100 -doubleGtkComboArrow=false -drawStatusBarFrames=false -dwtAppearance=customgradient1 -dwtSettings=33 -embolden=false -etchEntry=false -expanderHighlight=3 -fadeLines=true -fillProgress=true -fillSlider=true -flatSbarButtons=true -focus=glow -forceAlternateLvCols=false -gbFactor=-3 -gbLabel=9 -glowProgress=end -grooveAppearance=inverted -groupBox=faded -gtkButtonOrder=false -gtkComboMenus=false -gtkScrollViews=true -handles=dashes -hideShortcutUnderline=true -highlightFactor=3 -highlightScrollViews=true -highlightTab=false -inactiveTitlebarAppearance=customgradient1 -invertBotTab=true -lighterPopupMenuBgnd=2 -lvAppearance=bevelled -lvButton=false -lvLines=false -mapKdeIcons=true -menuBgndAppearance=flat -menuBgndGrad=horiz -menuBgndImage=none -menuBgndOpacity=100 -menuCloseDelay=300 -menuDelay=225 -menuIcons=true -menuStripe=none -menuStripeAppearance=darkinverted -menubarAppearance=flat -menubarApps=smplayer,VirtualBox -menubarHiding=0 -menubarMouseOver=true -menuitemAppearance=fade -noBgndGradientApps= -noBgndImageApps= -noBgndOpacityApps=sonata,vmplayer,smplayer,totem,vmware -noMenuBgndOpacityApps=gtk,sonata,vmplayer,totem,vmware -noMenuStripeApps=gtk,soffice.bin -nonnativeMenubarApps= -onlyTicksInMenu=false -passwordChar=9679 -popupBorder=true -progressAppearance=dullglass -progressColor=#006C00 -progressGrooveAppearance=inverted -progressGrooveColor=dark -reorderGtkButtons=false -round=extra -roundAllTabs=true -roundMbTopOnly=true -sbarBgndAppearance=flat -scrollbarType=kde -selectionAppearance=harsh -shadeCheckRadio=none -shadeMenubarOnlyWhenActive=false -shadeMenubars=none -shadePopupMenu=false -shadeSliders=none -shading=hsl -shadowSize=30 -sliderAppearance=gradient -sliderFill=true -sliderStyle=plain -sliderThumbs=flat -sliderWidth=15 -smallRadio=true -sortedLv=none -splitterHighlight=3 -splitters=1dot -square=1538 -statusbarApps=kde -statusbarHiding=0 -stdBtnSizes=false -stdSidebarButtons=false -stripedProgress=diagonal -stripedSbar=false -sunkenAppearance=soft -tabAppearance=soft -tabBgnd=0 -tabMouseOver=glow -tbarBtnAppearance=none -tbarBtnEffect=none -tbarBtns=standard -thin=1 -thinSbarGroove=true -titlebarAlignment=center-full -titlebarAppearance=customgradient1 -titlebarButtonAppearance=gradient -titlebarButtonColors=#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000,#000000 -titlebarButtons=5 -titlebarEffect=shadow -titlebarIcon=title -toolbarAppearance=customgradient1 -toolbarBorders=light -toolbarSeparators=flat -toolbarTabs=false -tooltipAppearance=gradient -unifyCombo=true -unifySpin=true -unifySpinBtns=false -useHighlightForMenu=false -useQtFileDialogApps= -vArrows=true -version=1.9.0 -windowBorder=36 -windowDrag=0 -xCheck=false diff --git a/vim/fun.vim b/vim/fun.vim new file mode 100644 index 0000000..0dbfe11 --- /dev/null +++ b/vim/fun.vim @@ -0,0 +1,83 @@ +" Echoes longest line number and lenght. + +function! LongestLineLength ( ) + let maxlength = 0 + let linenumber= 1 + while linenumber <= line("$") + exe ":".linenumber + let linelength = virtcol("$") + if maxlength < linelength + let maxlength = linelength + let maxlinenumber = linenumber + endif + let linenumber = linenumber+1 + endwhile + +"exe ':0' +"exe 'normal O' +"exe 'normal 0C'.maxlength + exe "normal" . maxlinenumber . "G" + exe ":echo \"" . maxlinenumber . ": " . maxlength . "\"" +endfunction + +command LongestLineLength call LongestLineLength() + + +" Save markdown document and export to pdf using pandoc. +" +" It would be nicer if a default document would be used but I coulnd't made it +" to work even after reading that manual section like 2 times. Also, there are +" variables that are lists of other variables that I don't know how to make them +" work (e.g. geometry=[top=1in, bottom=1in, heightrounded]) + +function! Md2Pdf ( ) + exe ":w" + "-N for numbered headers + exe ":! pandoc -o \"" . expand("%:r") . ".pdf\" -t latex --variable classoption=twosides --variable papersize=a4 --variable margin-left=1in --variable margin-right=1in --variable margin-top=1in --variable margin-bottom=1in --variable links-as-notes --variable colorlinks --variable pagestyle=plain --variable documentclass=article -f markdown-implicit_figures \"" . expand("%") . "\"" + echo "pdf saved as \"" . expand("%:p:r") . ".pdf\"" +endfunction + +function! Md2Pdfms ( ) + exe ":w" + exe ":! pandoc -o " . expand("%:r") . ".pdf" . " -t ms -f markdown-implicit_figures \"" . expand("%") . "\"" + echo "pdf saved as " . expand("%:p:r") . ".pdf" +endfunction + +command Md2Pdf call Md2Pdf() +command Md2Pdfms call Md2Pdfms() + + +" Save markdown document and export to html using pandoc + +function! Md2Html ( ) + exe ":w" + exe ":! pandoc -o \"" . expand("%:r") . ".html\"" . " -s \"" . expand("%") . "\"" + echo "html saved as " . expand("%:p:r") . ".html" +endfunction + +command Md2Html call Md2Html() + +" Compiles and Runs a C++ project + +" TODO: how to add program's arguments or file redirectioning from command. +function! CompRunProj ( ) + exe ":w" + exe ":! g++ -o " . expand("%:r") . "-g *.cpp" + exe ":! ./" . expand("%:r") +endfunction + +command CompRunProj call CompRunProj() + + +" Function made to give feedback to students code in 1INF01 + +" export C code to syntax highlighted pdf +function! C2Pdf ( ) + exe ":set ts=4" + exe ":w" + exe ":ha > %.ps" + exe ":!ps2pdf %.ps" + exe ":!rm %.ps" +endfunction + +command C2Pdf call C2Pdf() diff --git a/vim/vimrc b/vim/vimrc new file mode 100644 index 0000000..83aab15 --- /dev/null +++ b/vim/vimrc @@ -0,0 +1,285 @@ +" mitsuo's vimrc +" Created c. 2019-11-11 +" Last update (after destroying it accidentally): 2020-09-02 +" +" ┌─┬─┬─┬─┬─┬─┐ +" │m│i│t│s│u│o│✓x け が +" ├─┼─┼─┼─┼─┼─┤ ん +" │v│i│m│r│c│←│█▓▒░ り ば +" └─┴─┴─┴─┴─┴─┘ こ れ + +" XDG compliant REMOVED :D (what a pain) +" - For new installs just copy (or link) this file into ~/.vimrc and create +" the ~/.vim directory +" TODO: - sort sections + + +" Variables +" ---------------------------------------------------------------------- +set undodir=~/.vim/undo +set viminfofile=~/.vim/viminfo +set viewdir=~/.vim/view + + +" Useful +" ---------------------------------------------------------------------- +set nocompatible +" Auto-recognize files and apply pluggins +filetype plugin indent on " See :h vimrc-filetype +syntax on + +" Search files +set wildmenu " command-line completion <-- soo good +set wildignore+=*.o,*.obj,.git,*.rbc,*.class +set path+=./**30 " For gf and :find, add all subdirectories relative to + " current file (30 max) to the "search space" + +set scrolloff=5 " show a few lines of context + +set backspace=indent,eol,start " Allow and in insert mode + +" number gutter +set nonumber +set norelativenumber + +" Store session information +set viminfo+='1000 + +" Tag Jumping <-- so cool +" Instructions: create tag index (e.g. $ ctags -R .) +" place cursor on tag +" ^] to jump to definition +" g^] if more than 1 definition +" ^T to return (or ^O) +" TODO: create tags automatically (:!ctags -R . after :w if ft=c) + + +" Status line +" ---------------------------------------------------------------------- +set showcmd " show partial command on last line (below status bar) +" just add buffer number to the default +set statusline=%<%f\ %h%m%r%=b%02n\ \ %-14.(%l,%c%V%)\ %P + + +" Search +" ---------------------------------------------------------------------- +set hlsearch " highlight search (this can be annoying if no shortcut to then + " clear the highlight +set incsearch " Incrementally move cursor while typing search-string +" stop highlight only for current search. +" (Still preserve updating directory in netrw) +nnoremap :nohl +" Ignore case only when pattern is lowercase (both needed) +set ignorecase +set smartcase + + +" Indentation +" ---------------------------------------------------------------------- +" 4 column softtabs (uses ' ', not '\t'). +" TODO: move this 'guide' to somewhere apropiate +" tab->softtab :set tabstop=n :set expandtab :retab +" softtab->tab :set noexpandtab :set tabstop={softtabstop} :retab! +" Caution: +" - This will insert a tab wherever it can, even between words +" separated by as few as 2 spaces if ts=2! +" - Not recommended at all. Use some other program to only translate +" leading indenting from space to tabs. Also using tabs is not very +" good. My opinion is that they are good as a special character to +" separate data (like comma for CSV). +set tabstop=8 " '\t' or HT = 8 virtual columns +set shiftwidth=4 " Indentation with >> and C-T and C-D (insert mode) +set softtabstop=4 " For "inserted tabs" (inserts and + " minimizing ) +set expandtab " Expand with the inserted s +"set smarttab " Use shiftwidth for inserted in the front of + " a line (Maybe useful for YAML) +" autoindent -> smartindent -> cindent -> indentexpr +" (from simple/less general to complex/more general) +set smartindent " This is a really nice and simple one +"set cindent +"set cinoptions=:0,g0 " See C-indenting + + +" Automatic formatting +" ---------------------------------------------------------------------- +" see fo-table +set formatoptions=l " Don't break long lines that are already typed +set formatoptions+=q " Allow formatting of comments with "gq" +set formatoptions+=r " Insert current leader after in Insert mode +set formatoptions-=o " Automatically insert the current comment leader + " after hitting 'o'. +set formatoptions+=t " auto-wrap text (when inserting) +set formatoptions+=c " auto-wrap comments (when inserting) +set formatoptions+=p " Don't break honorifics like Prof. Smith +set formatoptions+=n " Allow lists +set formatoptions+=j " Removes comment leader when joining lines + + +" Word wrap +" ---------------------------------------------------------------------- +set wrap " Visual wrapping of lines wider than window +set linebreak " Works with previous option to not break words +" To 'justify' comments or block of text (paragraph) use "gq{motion}" or +" "gp{motion}", where {motion} can be "[/", "]/", "ip", "i{", "a{". +set textwidth=80 " auto break inserted text longer than 80 colums + + +" Other settings +" ---------------------------------------------------------------------- +set mouse=a " Enable for all modes +" set cmdheight=1 +" Always display the status line, even if only one window is displayed +set laststatus=2 +set ruler +set encoding=utf-8 +set more " Enable more-prompt for listings that don't fit in + " screen +"hint: g< command can be used to see the last page of previous command. + + +" Mappings +" ---------------------------------------------------------------------- +" F1 is help, F11 is full screen (terminal emulator) +map :source ~/.vim/vimrc +map :e ~/.vim/vimrc +map :tabp +map :tabn +map :w:make +"map :!./%:r +map :!./a.out +map :cnext +map :cprev +" One has to do :E first in order for this to work +"map :Rex +" = '\' when 'mapleader' is empty +" Change to the directory of the current file and generate tags recursively +" there. +" TODO: make the change of directory whenever a .c .cpp .h file is opened +map rt :cd %:h:!ctags -R . +map :tnext +" Motion to go to beggining of function while cursor is inside +nmap [f [m[{k0 + +" Funcionallity of the following depends on terminal (8bit input enabled needed +" for = Alt key combos +" From: https://vim.fandom.com/wiki/Get_Alt_key_to_work_in_terminal + +nmap h +nmap j +nmap k +nmap l + +" Go Title Case (and clear highlighted matches) +" Ref.: vim.fandom.com +vmap gt :s/\<\(\w\)\(\w*\)\>/\u\1\L\2/g + + +" Yanking and pasting +" ---------------------------------------------------------------------- +" TODO: map something to "+y (cut buffer) and "*y (selection buffer) while in +" visual mode. +"vmap <++> "+y " The yank to the cut buffer (clipboard) +"vmap <++> "*y " The yank to the selection buffer + + +" Buffers +" ---------------------------------------------------------------------- +set hidden +map :bNext +map :bnext + + +" Printing +" ---------------------------------------------------------------------- +set printoptions=paper:A4,duplex:long +" set printoptions+=number:y +" TODO: Figure out how to print multibyte encodings. Enabling this settings +" produces errors. +set encoding=utf-8 +set fileencoding=utf-8 +" set printmbcharset=JIS_X_1990 " This allows Japanese characters to be printed +" set printmbfont=r:Noto-Sans-CJK-JP + + +" Functions +" ---------------------------------------------------------------------- +" TODO: maybe replace with $runtimepath +source ~/.vim/fun.vim + + +" Views and Sessions (Window layout and Line folding) +" ---------------------------------------------------------------------- +" It is possible to create folds automatically but idk how to do it. +" :mkview so save them :loadview to load them (zo open one, zc close one, +" zR to open all, zM to close all, zx to restore)) + +" Views saves folds. Sessions saves all windows configuration and layout +" Load Sessions with $ vim -S Session.vim + +" To automatically save and restore views for *.c *.cpp files: +au BufWinLeave *.c mkview +au BufWinEnter *.c silent loadview +au BufWinLeave *.cpp mkview +au BufWinEnter *.cpp silent loadview + + +" Snippets +" ---------------------------------------------------------------------- +" I deleted the file accidently +"nnoremap ,ch :-1r ~/.vim/snippets/cheader.c + + +" File Browsing +" ---------------------------------------------------------------------- +" Use netrw out of the box file browser plugin. +" :e . open file browser on current directory +" V or t open file on vsplit or new tab. +" :bd or :Rex to return +" More mappings on |netrw-browse-maps| +"let g:netrw_banner=0 " disable banner +"let g:netrw_browse_split=4 " open in prior window +let g:netrw_altv=1 " open splits to the right +"let g:netrw_list_hide=netrw_gitignore#Hide() +"let g:netrw_list_hide.=',\(^\|\s\s\)\zs\.\S\+' " wtf? (?) +" Learned from Max Cantor talk https://youtu.be/XA2WjJbmmoM + + +" Additions +" ---------------------------------------------------------------------- +" Replaces previous WORD arithmetic expression with result (from Vim +" fandom-wiki) +inoremap diWi=" + + +" Plugins +" ---------------------------------------------------------------------- +" I disabled it bc I think it interferes with formatoptions +"" Automatic vim-plug install +"if empty(glob('~/.vim/autoload/plug.vim')) +" silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs +" \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim +" autocmd VimEnter * PlugInstall --sync | source $MYVIMRC +"endif +" +"call plug#begin() +"Plug 'ARM9/arm-syntax-vim' +"autocmd BufNewFile,BufRead *.s,*.S set filetype=arm " arm = armv6/7 +" +"call plug#end() + +" Other plugins +source ~/.vim/plugins/IndexedSearch.vim + + +" Colors +" ---------------------------------------------------------------------- +" ADDME :) + + +" Ducktape (place this in ~/.vim/after (after directory)) +" ---------------------------------------------------------------------- +" Not even the ducktape worked for this one on C files TODO +set formatoptions-=o " Automatically insert the current comment leader +" TODO: fix this shit getting reset in a markdown text +set formatoptions+=r " auto insert comment leader after diff --git a/vimrc b/vimrc deleted file mode 100644 index 83aab15..0000000 --- a/vimrc +++ /dev/null @@ -1,285 +0,0 @@ -" mitsuo's vimrc -" Created c. 2019-11-11 -" Last update (after destroying it accidentally): 2020-09-02 -" -" ┌─┬─┬─┬─┬─┬─┐ -" │m│i│t│s│u│o│✓x け が -" ├─┼─┼─┼─┼─┼─┤ ん -" │v│i│m│r│c│←│█▓▒░ り ば -" └─┴─┴─┴─┴─┴─┘ こ れ - -" XDG compliant REMOVED :D (what a pain) -" - For new installs just copy (or link) this file into ~/.vimrc and create -" the ~/.vim directory -" TODO: - sort sections - - -" Variables -" ---------------------------------------------------------------------- -set undodir=~/.vim/undo -set viminfofile=~/.vim/viminfo -set viewdir=~/.vim/view - - -" Useful -" ---------------------------------------------------------------------- -set nocompatible -" Auto-recognize files and apply pluggins -filetype plugin indent on " See :h vimrc-filetype -syntax on - -" Search files -set wildmenu " command-line completion <-- soo good -set wildignore+=*.o,*.obj,.git,*.rbc,*.class -set path+=./**30 " For gf and :find, add all subdirectories relative to - " current file (30 max) to the "search space" - -set scrolloff=5 " show a few lines of context - -set backspace=indent,eol,start " Allow and in insert mode - -" number gutter -set nonumber -set norelativenumber - -" Store session information -set viminfo+='1000 - -" Tag Jumping <-- so cool -" Instructions: create tag index (e.g. $ ctags -R .) -" place cursor on tag -" ^] to jump to definition -" g^] if more than 1 definition -" ^T to return (or ^O) -" TODO: create tags automatically (:!ctags -R . after :w if ft=c) - - -" Status line -" ---------------------------------------------------------------------- -set showcmd " show partial command on last line (below status bar) -" just add buffer number to the default -set statusline=%<%f\ %h%m%r%=b%02n\ \ %-14.(%l,%c%V%)\ %P - - -" Search -" ---------------------------------------------------------------------- -set hlsearch " highlight search (this can be annoying if no shortcut to then - " clear the highlight -set incsearch " Incrementally move cursor while typing search-string -" stop highlight only for current search. -" (Still preserve updating directory in netrw) -nnoremap :nohl -" Ignore case only when pattern is lowercase (both needed) -set ignorecase -set smartcase - - -" Indentation -" ---------------------------------------------------------------------- -" 4 column softtabs (uses ' ', not '\t'). -" TODO: move this 'guide' to somewhere apropiate -" tab->softtab :set tabstop=n :set expandtab :retab -" softtab->tab :set noexpandtab :set tabstop={softtabstop} :retab! -" Caution: -" - This will insert a tab wherever it can, even between words -" separated by as few as 2 spaces if ts=2! -" - Not recommended at all. Use some other program to only translate -" leading indenting from space to tabs. Also using tabs is not very -" good. My opinion is that they are good as a special character to -" separate data (like comma for CSV). -set tabstop=8 " '\t' or HT = 8 virtual columns -set shiftwidth=4 " Indentation with >> and C-T and C-D (insert mode) -set softtabstop=4 " For "inserted tabs" (inserts and - " minimizing ) -set expandtab " Expand with the inserted s -"set smarttab " Use shiftwidth for inserted in the front of - " a line (Maybe useful for YAML) -" autoindent -> smartindent -> cindent -> indentexpr -" (from simple/less general to complex/more general) -set smartindent " This is a really nice and simple one -"set cindent -"set cinoptions=:0,g0 " See C-indenting - - -" Automatic formatting -" ---------------------------------------------------------------------- -" see fo-table -set formatoptions=l " Don't break long lines that are already typed -set formatoptions+=q " Allow formatting of comments with "gq" -set formatoptions+=r " Insert current leader after in Insert mode -set formatoptions-=o " Automatically insert the current comment leader - " after hitting 'o'. -set formatoptions+=t " auto-wrap text (when inserting) -set formatoptions+=c " auto-wrap comments (when inserting) -set formatoptions+=p " Don't break honorifics like Prof. Smith -set formatoptions+=n " Allow lists -set formatoptions+=j " Removes comment leader when joining lines - - -" Word wrap -" ---------------------------------------------------------------------- -set wrap " Visual wrapping of lines wider than window -set linebreak " Works with previous option to not break words -" To 'justify' comments or block of text (paragraph) use "gq{motion}" or -" "gp{motion}", where {motion} can be "[/", "]/", "ip", "i{", "a{". -set textwidth=80 " auto break inserted text longer than 80 colums - - -" Other settings -" ---------------------------------------------------------------------- -set mouse=a " Enable for all modes -" set cmdheight=1 -" Always display the status line, even if only one window is displayed -set laststatus=2 -set ruler -set encoding=utf-8 -set more " Enable more-prompt for listings that don't fit in - " screen -"hint: g< command can be used to see the last page of previous command. - - -" Mappings -" ---------------------------------------------------------------------- -" F1 is help, F11 is full screen (terminal emulator) -map :source ~/.vim/vimrc -map :e ~/.vim/vimrc -map :tabp -map :tabn -map :w:make -"map :!./%:r -map :!./a.out -map :cnext -map :cprev -" One has to do :E first in order for this to work -"map :Rex -" = '\' when 'mapleader' is empty -" Change to the directory of the current file and generate tags recursively -" there. -" TODO: make the change of directory whenever a .c .cpp .h file is opened -map rt :cd %:h:!ctags -R . -map :tnext -" Motion to go to beggining of function while cursor is inside -nmap [f [m[{k0 - -" Funcionallity of the following depends on terminal (8bit input enabled needed -" for = Alt key combos -" From: https://vim.fandom.com/wiki/Get_Alt_key_to_work_in_terminal - -nmap h -nmap j -nmap k -nmap l - -" Go Title Case (and clear highlighted matches) -" Ref.: vim.fandom.com -vmap gt :s/\<\(\w\)\(\w*\)\>/\u\1\L\2/g - - -" Yanking and pasting -" ---------------------------------------------------------------------- -" TODO: map something to "+y (cut buffer) and "*y (selection buffer) while in -" visual mode. -"vmap <++> "+y " The yank to the cut buffer (clipboard) -"vmap <++> "*y " The yank to the selection buffer - - -" Buffers -" ---------------------------------------------------------------------- -set hidden -map :bNext -map :bnext - - -" Printing -" ---------------------------------------------------------------------- -set printoptions=paper:A4,duplex:long -" set printoptions+=number:y -" TODO: Figure out how to print multibyte encodings. Enabling this settings -" produces errors. -set encoding=utf-8 -set fileencoding=utf-8 -" set printmbcharset=JIS_X_1990 " This allows Japanese characters to be printed -" set printmbfont=r:Noto-Sans-CJK-JP - - -" Functions -" ---------------------------------------------------------------------- -" TODO: maybe replace with $runtimepath -source ~/.vim/fun.vim - - -" Views and Sessions (Window layout and Line folding) -" ---------------------------------------------------------------------- -" It is possible to create folds automatically but idk how to do it. -" :mkview so save them :loadview to load them (zo open one, zc close one, -" zR to open all, zM to close all, zx to restore)) - -" Views saves folds. Sessions saves all windows configuration and layout -" Load Sessions with $ vim -S Session.vim - -" To automatically save and restore views for *.c *.cpp files: -au BufWinLeave *.c mkview -au BufWinEnter *.c silent loadview -au BufWinLeave *.cpp mkview -au BufWinEnter *.cpp silent loadview - - -" Snippets -" ---------------------------------------------------------------------- -" I deleted the file accidently -"nnoremap ,ch :-1r ~/.vim/snippets/cheader.c - - -" File Browsing -" ---------------------------------------------------------------------- -" Use netrw out of the box file browser plugin. -" :e . open file browser on current directory -" V or t open file on vsplit or new tab. -" :bd or :Rex to return -" More mappings on |netrw-browse-maps| -"let g:netrw_banner=0 " disable banner -"let g:netrw_browse_split=4 " open in prior window -let g:netrw_altv=1 " open splits to the right -"let g:netrw_list_hide=netrw_gitignore#Hide() -"let g:netrw_list_hide.=',\(^\|\s\s\)\zs\.\S\+' " wtf? (?) -" Learned from Max Cantor talk https://youtu.be/XA2WjJbmmoM - - -" Additions -" ---------------------------------------------------------------------- -" Replaces previous WORD arithmetic expression with result (from Vim -" fandom-wiki) -inoremap diWi=" - - -" Plugins -" ---------------------------------------------------------------------- -" I disabled it bc I think it interferes with formatoptions -"" Automatic vim-plug install -"if empty(glob('~/.vim/autoload/plug.vim')) -" silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs -" \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim -" autocmd VimEnter * PlugInstall --sync | source $MYVIMRC -"endif -" -"call plug#begin() -"Plug 'ARM9/arm-syntax-vim' -"autocmd BufNewFile,BufRead *.s,*.S set filetype=arm " arm = armv6/7 -" -"call plug#end() - -" Other plugins -source ~/.vim/plugins/IndexedSearch.vim - - -" Colors -" ---------------------------------------------------------------------- -" ADDME :) - - -" Ducktape (place this in ~/.vim/after (after directory)) -" ---------------------------------------------------------------------- -" Not even the ducktape worked for this one on C files TODO -set formatoptions-=o " Automatically insert the current comment leader -" TODO: fix this shit getting reset in a markdown text -set formatoptions+=r " auto insert comment leader after -- cgit v1.2.3