diff options
-rw-r--r-- | .bash_profile | 3 | ||||
-rw-r--r-- | .bashrc | 18 | ||||
-rw-r--r-- | .clang-format | 225 | ||||
-rw-r--r-- | .config/i3/config | 54 | ||||
-rw-r--r-- | .config/i3status/config | 54 | ||||
-rw-r--r-- | .config/nvim/lazy-lock.json | 28 | ||||
-rw-r--r-- | .config/nvim/lua/user/lsp/asm.lua | 7 | ||||
-rw-r--r-- | .config/nvim/lua/user/lspinit.lua | 2 | ||||
-rw-r--r-- | .config/picom/picom.conf | 1 | ||||
-rw-r--r-- | .config/sakura/sakura.conf | 2 | ||||
-rw-r--r-- | .config/xsettingsd/xsettingsd.conf | 4 | ||||
-rw-r--r-- | .cursed_bash.sh | 26 | ||||
-rw-r--r-- | .gitignore | 6 | ||||
-rwxr-xr-x | .screenlayout/doublemonitor.layout.sh | 2 |
14 files changed, 366 insertions, 66 deletions
diff --git a/.bash_profile b/.bash_profile new file mode 100644 index 0000000..b1b93f7 --- /dev/null +++ b/.bash_profile @@ -0,0 +1,3 @@ +if [ -f ~/.bashrc ]; then + . ~/.bashrc +fi @@ -1,3 +1,4 @@ +source /etc/profile source ~/.cursed_bash.sh # application shortcuts @@ -6,28 +7,15 @@ alias dl="~/.local/bin/download" alias qmake="/usr/lib/qt6/bin/qmake" alias psiphon="psiphon-console-client" alias cppreference="microsoft-edge-dev /usr/share/doc/cppreference/en/cpp.html" -alias nv=nvim -alias whatsapp=whatsie alias lan="/home/main/zerotierconnect.sh" alias python=/home/main/coding/py/venv/bin/python3 -alias copy="xclip -selection clipboard" -alias ""="g++" -alias fucking=sudo -alias AAAAA=su -alias md=mkdir -export DRO=/mnt/D/root -export c="/mnt/C" -export d="/mnt/D" -export SUDO_EDITOR="/usr/bin/nvim" -export EDITOR="/usr/bin/nvim" export JAVA_HOME="/usr/lib/jvm/default/" # dotfiles -alias config='/usr/bin/git --git-dir=$HOME/.cfg --work-tree=$HOME' GHC_PACKAGE_PATH="/usr/lib/ghc-9.0.2/package.conf.d" # Created by `pipx` on 2023-08-09 18:40:17 -export PATH="$PATH:/home/main/.local/bin:/home/main/.cargo/bin" -export VISUAL=nvim +append_path '/home/main/.local/bin' +append_path '/home/main/.cargo/bin' diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..97371b1 --- /dev/null +++ b/.clang-format @@ -0,0 +1,225 @@ +--- +Language: Cpp +# BasedOnStyle: LLVM +AccessModifierOffset: -8 +AlignAfterOpenBracket: Align +AlignArrayOfStructures: None +AlignConsecutiveAssignments: + Enabled: true + AcrossEmptyLines: false + AcrossComments: true + AlignCompound: false + PadOperators: true +AlignConsecutiveBitFields: + Enabled: true + AcrossEmptyLines: false + AcrossComments: true + AlignCompound: false + PadOperators: false +AlignConsecutiveDeclarations: + Enabled: true + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + PadOperators: false +AlignConsecutiveMacros: + Enabled: true + AcrossEmptyLines: false + AcrossComments: true + AlignCompound: false + PadOperators: false +AlignEscapedNewlines: Right +AlignOperands: Align +AlignTrailingComments: + Kind: Always + OverEmptyLines: 0 +AllowAllArgumentsOnNextLine: true +AllowAllParametersOfDeclarationOnNextLine: true +AllowShortBlocksOnASingleLine: Always +AllowShortCaseLabelsOnASingleLine: false +AllowShortEnumsOnASingleLine: true +AllowShortFunctionsOnASingleLine: All +AllowShortIfStatementsOnASingleLine: Always +AllowShortLambdasOnASingleLine: All +AllowShortLoopsOnASingleLine: true +AlwaysBreakAfterDefinitionReturnType: None +AlwaysBreakAfterReturnType: None +AlwaysBreakBeforeMultilineStrings: true +AlwaysBreakTemplateDeclarations: MultiLine +AttributeMacros: + - __capability +BinPackArguments: false +BinPackParameters: false +BitFieldColonSpacing: Both +BraceWrapping: + AfterCaseLabel: false + AfterClass: true + AfterControlStatement: Always + AfterEnum: true + AfterExternBlock: true + AfterFunction: true + AfterNamespace: true + AfterObjCDeclaration: false + AfterStruct: true + AfterUnion: true + BeforeCatch: false + BeforeElse: false + BeforeLambdaBody: false + BeforeWhile: false + IndentBraces: false + SplitEmptyFunction: true + SplitEmptyRecord: true + SplitEmptyNamespace: true +BreakAfterAttributes: Always +BreakAfterJavaFieldAnnotations: true +BreakArrays: true +BreakBeforeBinaryOperators: None +BreakBeforeConceptDeclarations: Always +BreakBeforeBraces: Linux +BreakBeforeInlineASMColon: OnlyMultiline +BreakBeforeTernaryOperators: true +BreakConstructorInitializers: BeforeColon +BreakInheritanceList: BeforeColon +BreakStringLiterals: true +ColumnLimit: 120 +CommentPragmas: '^ IWYU pragma:' +CompactNamespaces: false +ConstructorInitializerIndentWidth: 8 +ContinuationIndentWidth: 8 +Cpp11BracedListStyle: true +DerivePointerAlignment: false +DisableFormat: false +EmptyLineAfterAccessModifier: Never +EmptyLineBeforeAccessModifier: LogicalBlock +ExperimentalAutoDetectBinPacking: false +FixNamespaceComments: true +ForEachMacros: + - foreach + - Q_FOREACH + - BOOST_FOREACH +IfMacros: + - KJ_IF_MAYBE +IncludeBlocks: Preserve +IncludeCategories: + - Regex: '^"(llvm|llvm-c|clang|clang-c)/' + Priority: 2 + SortPriority: 0 + CaseSensitive: false + - Regex: '^(<|"(gtest|gmock|isl|json)/)' + Priority: 3 + SortPriority: 0 + CaseSensitive: false + - Regex: '.*' + Priority: 1 + SortPriority: 0 + CaseSensitive: false +IncludeIsMainRegex: '(Test)?$' +IncludeIsMainSourceRegex: '' +IndentAccessModifiers: false +IndentCaseBlocks: false +IndentCaseLabels: false +IndentExternBlock: AfterExternBlock +IndentGotoLabels: true +IndentPPDirectives: BeforeHash +IndentRequiresClause: true +IndentWidth: 8 +IndentWrappedFunctionNames: false +InsertBraces: false +InsertNewlineAtEOF: false +InsertTrailingCommas: Wrapped +IntegerLiteralSeparator: + Binary: 0 + BinaryMinDigits: 0 + Decimal: 0 + DecimalMinDigits: 0 + Hex: 0 + HexMinDigits: 0 +JavaScriptQuotes: Leave +JavaScriptWrapImports: true +KeepEmptyLinesAtTheStartOfBlocks: false +LambdaBodyIndentation: Signature +LineEnding: DeriveLF +MacroBlockBegin: '' +MacroBlockEnd: '' +MaxEmptyLinesToKeep: 1 +NamespaceIndentation: None +ObjCBinPackProtocolList: Auto +ObjCBlockIndentWidth: 2 +ObjCBreakBeforeNestedBlockParam: true +ObjCSpaceAfterProperty: false +ObjCSpaceBeforeProtocolList: true +PackConstructorInitializers: BinPack +PenaltyBreakAssignment: 2 +PenaltyBreakBeforeFirstCallParameter: 19 +PenaltyBreakComment: 300 +PenaltyBreakFirstLessLess: 120 +PenaltyBreakOpenParenthesis: 0 +PenaltyBreakString: 1000 +PenaltyBreakTemplateDeclaration: 10 +PenaltyExcessCharacter: 1000000 +PenaltyIndentedWhitespace: 0 +PenaltyReturnTypeOnItsOwnLine: 60 +PointerAlignment: Right +PPIndentWidth: -1 +QualifierAlignment: Leave +ReferenceAlignment: Pointer +ReflowComments: true +RemoveBracesLLVM: false +RemoveSemicolon: false +RequiresClausePosition: OwnLine +RequiresExpressionIndentation: OuterScope +SeparateDefinitionBlocks: Leave +ShortNamespaceLines: 1 +SortIncludes: CaseSensitive +SortJavaStaticImport: Before +SortUsingDeclarations: LexicographicNumeric +SpaceAfterCStyleCast: false +SpaceAfterLogicalNot: false +SpaceAfterTemplateKeyword: true +SpaceAroundPointerQualifiers: Default +SpaceBeforeAssignmentOperators: true +SpaceBeforeCaseColon: false +SpaceBeforeCpp11BracedList: false +SpaceBeforeCtorInitializerColon: true +SpaceBeforeInheritanceColon: true +SpaceBeforeParens: ControlStatements +SpaceBeforeParensOptions: + AfterControlStatements: true + AfterForeachMacros: true + AfterFunctionDefinitionName: false + AfterFunctionDeclarationName: false + AfterIfMacros: true + AfterOverloadedOperator: false + AfterRequiresInClause: false + AfterRequiresInExpression: false + BeforeNonEmptyParentheses: false +SpaceBeforeRangeBasedForLoopColon: true +SpaceBeforeSquareBrackets: false +SpaceInEmptyBlock: false +SpaceInEmptyParentheses: false +SpacesBeforeTrailingComments: 1 +SpacesInAngles: Never +SpacesInConditionalStatement: false +SpacesInContainerLiterals: true +SpacesInCStyleCastParentheses: false +SpacesInLineCommentPrefix: + Minimum: 1 + Maximum: -1 +SpacesInParentheses: false +SpacesInSquareBrackets: false +Standard: Latest +StatementAttributeLikeMacros: + - Q_EMIT +StatementMacros: + - Q_UNUSED + - QT_REQUIRE_VERSION +TabWidth: 8 +UseTab: Always +WhitespaceSensitiveMacros: + - BOOST_PP_STRINGIZE + - CF_SWIFT_NAME + - NS_SWIFT_NAME + - PP_STRINGIZE + - STRINGIZE +... + diff --git a/.config/i3/config b/.config/i3/config index c6a6e15..983f3bd 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -19,8 +19,9 @@ exec --no-startup-id dex --autostart --environment i3 # and nm-applet is a desktop environment-independent system tray GUI for it. exec --no-startup-id nm-applet -exec_always --no-startup-id xcompmgr -exec_always --no-startup-id devilspie -a +exec --no-startup-id devilspie -a +exec --no-startup-id xcompmgr +exec --no-startup-id xsettnigsd # Use pactl to adjust volume in PulseAudio. set $refresh_i3status killall -SIGUSR1 i3status @@ -29,6 +30,11 @@ bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT 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 playerctl +bindsym XF86AudioPause exec --no-startup-id playerctl play-pause +bindsym XF86AudioNext exec --no-startup-id playerctl next +bindsym XF86AudioPrev exec --no-startup-id playerctl previous + bindsym $mod+b exec sudo systemctl start bluetooth.service bindsym $mod+Shift+b exec sudo systemctl stop bluetoth.service @@ -120,16 +126,17 @@ bindsym $mod+Shift+a 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: terminals" -set $ws2 "2: browser" -set $ws3 "3: messengers" -set $ws4 "4: file manager" -set $ws5 "5: office" -set $ws6 "6" -set $ws7 "7: games" -set $ws8 "8: media player" -set $ws9 "9: code assisting" -set $ws10 "10: code editors" +# nerd font icons +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 $monitor_primary "DP-0" set $monitor_secondary "HDMI-0" @@ -171,8 +178,12 @@ assign [class="pr"] workspace $ws5 assign [class="pm"] workspace $ws5 assign [class="vlc"] workspace $ws8 assign [class="libreoffice"] workspace $ws5 +assign [class="libreoffice-writer"] workspace $ws5 +assign [class="libreoffice-impress"] workspace $ws5 +assign [class="libreoffice-calc"] workspace $ws5 assign [class="steam"] workspace $ws9 assign [class="org-tlauncher-tlauncher-rmo-TLauncher"] workspace $ws7 +assign [class="dotnet"] workspace $ws7 assign [class="^Minecraft.*$"] workspace $ws7 #assign [class="GigaQt"] workspace $ws9 @@ -180,8 +191,8 @@ assign [class="^Minecraft.*$"] workspace $ws7 #monitors workspace $ws1 output $monitor_primary workspace $ws2 output $monitor_secondary -workspace $ws3 output $monitor_primary -# workspace $ws4 output $monitor_primary +workspace $ws3 output $monitor_secondary +workspace $ws4 output $monitor_secondary workspace $ws5 output $monitor_primary workspace $ws6 output $monitor_secondary workspace $ws7 output $monitor_primary @@ -250,22 +261,25 @@ bindsym $mod+Shift+e mode $ModeName #Start i3bar to display a workspace bar (plus the system information i3status finds out, if available) bar { status_command i3status -# status_command xmobar position bottom - font pango:DejaVu Sans Mono 11 + font pango:OverpassM Nerd Font 10 + } -default_border pixel 3 +default_border pixel 5 +gaps inner 4 +gaps outer 0 # started upon launching -# monito settings -exec --setprovideroutputsource NVIDIA-G0 Intel +# monitor settings +# the first line is actual magic exec_always ~/.screenlayout/doublemonitor.layout.sh # disable integrated keyboard input # please, just work (check out that function in bashrc lmao) -exec_always kboff +# only needed for my laptop +# exec_always kboff # switch keyboard colors exec openrgb --color "00FFFF" diff --git a/.config/i3status/config b/.config/i3status/config new file mode 100644 index 0000000..7985398 --- /dev/null +++ b/.config/i3status/config @@ -0,0 +1,54 @@ + +general { + output_format = "i3bar" + colors = true + interval = 5 +} + +order += "wireless wlan0" +order += "ethernet enp3s0" +order += "volume master" +order += "disk /" +order += "memory" +order += "cpu_usage" +order += "cpu_temperature 0" +order += "time" + +wireless wlan0 { + format_up = "%quality at %ip" + format_down = "" +} + +ethernet enp3s0 { + format_up = "Eth: %ip" + format_down = "Eth: N/A" +} + +volume master { + format = " %volume" + format_muted = " " + device = "default" + mixer = "Master" +} + +disk "/" { + format = " %avail" +} + +cpu_usage { + format = " %usage" + max_threshold = 75 +} +cpu_temperature 0 { + format = "%degrees " + max_threshold = 75 + format_above_threshold = "TEMPERATURE: %degrees " +} + +memory { + format = " %used" +} + +time { + format = "%H:%M:%S %Y-%m-%d " +} diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json deleted file mode 100644 index 2ab507c..0000000 --- a/.config/nvim/lazy-lock.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "LuaSnip": { "branch": "master", "commit": "954c81b53989097faaff0fabc11c29575288c3e1" }, - "awesome-vim-colorschemes": { "branch": "master", "commit": "4b2787b8894c4a70c42d15c2808d7cf278cb6abb" }, - "bufferline.nvim": { "branch": "main", "commit": "6c456b888823d9e4832aa91c482bccd19445c009" }, - "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, - "cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, - "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" }, - "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, - "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, - "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, - "colorschemes": { "branch": "master", "commit": "e29f32990d6e2c7c3a4763326194fbd847b49dac" }, - "crates.nvim": { "branch": "main", "commit": "b8ea20fda2e1029fbbb1bae7a9eab35c84037ca0" }, - "friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" }, - "lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" }, - "nerdtree": { "branch": "master", "commit": "9ec27d45a863aeb82fea56cebcb8a75a4e369fc9" }, - "nvim-autopairs": { "branch": "master", "commit": "0f04d78619cce9a5af4f355968040f7d675854a1" }, - "nvim-cmp": { "branch": "main", "commit": "0b751f6beef40fd47375eaf53d3057e0bfa317e4" }, - "nvim-lspconfig": { "branch": "master", "commit": "511609ae0311abfcfaed3c398429a147e895ce2c" }, - "nvim-treesitter": { "branch": "master", "commit": "1b5bbb54b385c4eae217113f72df5284bc3cc94b" }, - "plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" }, - "popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" }, - "rust-tools.nvim": { "branch": "master", "commit": "0cc8adab23117783a0292a0c8a2fbed1005dc645" }, - "tokyonight.nvim": { "branch": "main", "commit": "f247ee700b569ed43f39320413a13ba9b0aef0db" }, - "vim-commentary": { "branch": "master", "commit": "e87cd90dc09c2a203e13af9704bd0ef79303d755" }, - "vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" }, - "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" } -}
\ No newline at end of file diff --git a/.config/nvim/lua/user/lsp/asm.lua b/.config/nvim/lua/user/lsp/asm.lua new file mode 100644 index 0000000..04814a9 --- /dev/null +++ b/.config/nvim/lua/user/lsp/asm.lua @@ -0,0 +1,7 @@ +local lsp = require'lspconfig' + +lsp.asm_lsp.setup{ + cmd = { "asm-lsp", "--stdio" }, + filetypes = { "s", "asm", "S" }, + root_dir = lsp.util.root_pattern("Makefile", ".git"), +} diff --git a/.config/nvim/lua/user/lspinit.lua b/.config/nvim/lua/user/lspinit.lua index 4a75ec2..47e4a63 100644 --- a/.config/nvim/lua/user/lspinit.lua +++ b/.config/nvim/lua/user/lspinit.lua @@ -6,6 +6,6 @@ require 'user.lsp.bash' require 'user.lsp.rust' require 'user.lsp.cxx' require 'user.lsp.lua' - +require 'user.lsp.asm' -- lsp = require 'lspconfig' diff --git a/.config/picom/picom.conf b/.config/picom/picom.conf new file mode 100644 index 0000000..c5312b4 --- /dev/null +++ b/.config/picom/picom.conf @@ -0,0 +1 @@ +inactive-opacity = 0.95; diff --git a/.config/sakura/sakura.conf b/.config/sakura/sakura.conf index caeaa49..47d82b2 100644 --- a/.config/sakura/sakura.conf +++ b/.config/sakura/sakura.conf @@ -1,6 +1,6 @@ [sakura] colorset1_fore=rgb(255,255,255) -colorset1_back=rgb(41,41,41) +colorset1_back=rgba(41,41,41,0.95) colorset1_curs=rgb(143,240,164) colorset1_scheme=0 colorset1_key=F1 diff --git a/.config/xsettingsd/xsettingsd.conf b/.config/xsettingsd/xsettingsd.conf new file mode 100644 index 0000000..39e1fbf --- /dev/null +++ b/.config/xsettingsd/xsettingsd.conf @@ -0,0 +1,4 @@ +Xft/Hinting 1 +Xft/HintStyle "hintsfull" +Xft/Antialias 1 +Xft/RGBA "rgb" diff --git a/.cursed_bash.sh b/.cursed_bash.sh new file mode 100644 index 0000000..f304e14 --- /dev/null +++ b/.cursed_bash.sh @@ -0,0 +1,26 @@ + +function count_git_files_length { + echo $( for i in `git ls-tree --full-tree -r --name-only HEAD`; do wc -l "$i"; done | sed -r 's/[^0-9]+/\+/g' | cat - <(echo 0) | tr -d '\n'; echo ) | bc +} + +function swap() { mv "$1" "$1._tmp" && mv "$2" "$1" && mv "$1._tmp" "$2"; } + +function kboff() { xinput float `xinput \ + | grep "AT Translated" \ + | sed -r 's/.+id=([0-9]+).+/\1/'`; } +function kbon() { xinput reattach `xinput \ + | grep "AT Translated" \ + | sed -r 's/.+id=([0-9]+).+/\1/'` \ + `xinput \ + | grep "Virtual core keyboard" \ + | sed -r 's/.+id=([0-9]+).+/\1/'` ; } + +function fix-ntfs() { \ + sudo umount /dev/sda1 && \ + sudo ntfsfix /dev/sda1 &&\ + sudo mount /dev/sda1 /mnt/D ; } + +function screenoff() { sudo vbetool dpms off; } +function screenon() { sudo vbetool dpms on; } + + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7f142a0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +*.log +NetworkManager +libnm-iwd-*-x86_64.pkg.tar.* +networkmanager-iwd-*.pkg.tar.* +nm-iwd-cloud-setup-*-x86_64.pkg.tar.* +*-lock* diff --git a/.screenlayout/doublemonitor.layout.sh b/.screenlayout/doublemonitor.layout.sh index 09dbf31..8ef40ce 100755 --- a/.screenlayout/doublemonitor.layout.sh +++ b/.screenlayout/doublemonitor.layout.sh @@ -1,2 +1,2 @@ #!/bin/sh -xrandr --output DVI-D-0 --off --output HDMI-0 --mode 1680x1050 --pos 2560x390 --rotate normal --output DP-0 -r 100 --mode 2560x1440 --pos 0x0 --rotate normal --output DP-1 --off --output None-2-1 --off --output HDMI-1-1 --off --output HDMI-1-2 --off --output DP-1-1 --off --output HDMI-1-3 --off --output DP-1-2 --off --output HDMI-1-4 --off +xrandr --output DVI-D-0 --off --output HDMI-0 --mode 1680x1050 --pos 2560x390 --rotate normal --output DP-0 --rate 100 --primary --mode 2560x1440 --pos 0x0 --rotate normal --output DP-1 --off --output None-2-1 --off --output HDMI-1-1 --off --output HDMI-1-2 --off --output DP-1-1 --off --output HDMI-1-3 --off --output DP-1-2 --off --output HDMI-1-4 --off |