52 Commits
work ... master

Author SHA1 Message Date
Martin Blazik
7de1042823 Smazani pojmenovane unix pipe kdyz nebezi ssh-agent 2025-10-20 10:57:02 +02:00
Martin Blazik
6982026a88 Fix fish installation 2025-10-11 13:29:34 +02:00
Martin Blazik
d96ef0af90 Basic settings for fish shell 2025-10-09 10:35:20 +02:00
lachtan
3049391a4f Better version ssh-agent for WSL 2025-09-19 05:59:07 +02:00
lachtan
138d76a19f Sample wsl.conf 2025-09-19 05:02:11 +02:00
lachtan
57d0ebda20 Make things simpler 2025-09-18 20:22:02 +02:00
lachtan
726e6098b2 Oprava ssh agenta ve WSL 2025-09-03 20:19:22 +02:00
lachtan obecny
6b963ee277 JS nvm initialization 2025-06-29 15:43:15 +02:00
Martin Blazik
b11baff00e PowerShell installation script update 2025-04-24 13:34:23 +02:00
Martin Blazik
17f984c99c Add ~/.local/bin to rc 2025-04-24 13:18:06 +02:00
Martin Blazik
6a4fdb6162 Install script for lazygit 2025-04-24 13:14:16 +02:00
lachtan
6854c3bfa8 Join rc and rc.local folders 2025-01-03 16:58:29 +00:00
lachtan
87cc0c95ac Add ~/.local/bin to PATH 2025-01-03 16:49:46 +00:00
Martin Blazik
60a46ca129 Add uv tool 2024-09-11 10:07:49 +02:00
lachtan
71486cfdf8 sudo user oneliner 2024-09-10 06:10:01 +02:00
lachtan
cb9986f490 Fix readme 2024-09-10 06:10:01 +02:00
lachtan
2c1cb9e9dc Add installation script 2024-09-01 17:15:11 +02:00
lachtan
7f6686b3d4 Tuning installation scripts 2024-09-01 17:14:30 +02:00
lachtan
420f85e31e Move installation scripts to install/ dir 2024-09-01 16:24:15 +02:00
lachtan
36b28ae72e Move init scipts to rc.local 2024-09-01 08:26:14 +02:00
lachtan
a21113f961 Cargo tools 2024-09-01 08:13:10 +02:00
lachtan
e37974f371 Add virtualenv init to pyenv rc 2024-09-01 08:11:58 +02:00
lachtan
1bbb372856 Small tunings 2024-03-23 07:59:16 +01:00
lachtan
2256cd3107 Cleaning 2024-03-19 06:10:06 +01:00
e6db9f7123 export LC_ALL 2024-03-19 05:43:47 +01:00
lachtan
12e55c1c5d Cleaning 2024-03-16 11:18:05 +01:00
lachtan
ea7a60db11 Tuning bash colors 2024-03-16 11:11:55 +01:00
Martin Blazik
bcf859bb1e Set PS1 prompt 2024-03-15 10:46:47 +01:00
Martin Blazik
d2542f38eb Add git aliases 2024-03-15 10:46:21 +01:00
lachtan
ca1a1e54ac add git config 2023-12-02 09:48:54 +01:00
af6acef7ad Rename vim configuration 2023-10-24 17:10:50 +02:00
2b49dd4066 VIM configuration 2023-10-23 20:02:47 +02:00
lachtan
a93cc52bf0 Fix dircolors.sh script 2023-10-23 13:49:49 +02:00
lachtan
5ebeea732e Better console colors 2023-10-05 10:55:59 +02:00
7787c4a0ac Merge pull request 'wood' (#3) from wood into master
Reviewed-on: http://wood.hell:8030/lachtan/linux-workspace/pulls/3
2023-09-27 19:06:32 +02:00
cd27b2464a Improve uniq_path function 2023-09-27 19:04:57 +02:00
f31c44630e Cleaning for github publishing 2023-09-27 19:04:54 +02:00
8261335e92 Fix pyenv initialization 2023-09-27 19:02:12 +02:00
lachtan
7cd2ac70cb Fix multiple time_ms definition 2023-02-28 09:42:31 +01:00
Martin Blazik
4382f72b7c Rust installation script 2023-02-25 19:21:36 +01:00
Martin Blazik
fbe35a8fa9 Enable call sudo without password 2023-02-25 19:17:27 +01:00
Martin Blazik
dbe870ab5f Initialize LWS_* variables 2023-02-25 14:05:42 +01:00
lachtan
5c689e4c16 Remove doubled code 2023-02-25 14:05:42 +01:00
lachtan
01f1f95c00 Better loading of git-prompt 2023-02-25 14:05:42 +01:00
lachtan
85eb30eb96 Measure loading time of scripts 2023-02-25 14:05:42 +01:00
lachtan
e3920af719 Improve speed of loading scripts 2023-02-25 14:05:40 +01:00
lachtan
d165040dd0 Add bashrc to .editorconfig 2023-02-25 14:02:50 +01:00
Martin Blazik
2df9c7a2e9 Detect X11 or Wayland 2023-02-25 14:02:50 +01:00
Martin Blazik
a76638856a Enable set dc from environment 2023-02-25 14:02:50 +01:00
Martin Blazik
db8960ea6a Improve git-prompt installation script 2023-02-09 17:22:42 +01:00
lachtan obecny
7133130eb5 Fix thefuck init script 2023-02-09 16:22:47 +01:00
lachtan
77ec65376b Git config rewrite ald values 2022-12-10 11:39:20 +01:00
75 changed files with 1130 additions and 160 deletions

View File

@@ -1,12 +1,10 @@
# top-most EditorConfig file
root = true
# defaults
[*]
charset=utf-8
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line=lf
end_of_line = lf
indent_size = 4
indent_style = space
@@ -16,26 +14,24 @@ indent_size = 2
[*.{java,kt,kts}]
continuation_indent_size = 4
max_line_length=120
wildcard_import_limit=99
max_line_length = 120
wildcard_import_limit = 99
[*.xml]
indent_size = 2
continuation_indent_size = 8
# YAML
# http://yaml.org/spec/1.2/2009-07-21/spec.html#id2576668
[*.{yaml,yml}]
indent_size = 2
# Shell
# https://google.github.io/styleguide/shell.xml#Indentation
[*.{bash,sh,zsh}]
[*.{sh,bash,zsh}]
indent_size = 2
[bashrc]
indent_size = 2
# HTML
# https://google.github.io/styleguide/htmlcssguide.xml#General_Formatting_Rules
[*.{htm,html}]
indent_size = 2
[*.json]
indent_size=2
indent_size = 2

View File

@@ -3,8 +3,18 @@
Repository of config files, scripts and other staff to enable quick and easy configuring a new computer.
## Quick start
Add to $HOME/.bashrc file:
`source <full_path_to_repository>/bashrc`
Add to `$HOME/.bashrc` file:
```bash
source $full_path_to_repository/bashrc
```
or install by script
```bash
./install.sh
```
After that each bash login is ready to offer full functionality.
@@ -15,13 +25,11 @@ For debug log enabled
`LWS_DEBUG=1`
## Quick commands
```
```bash
# reload full configuration
reload-workspace
# home directory of project
$LWS
```
### TODO
- vim configuration
- debian packages installation
# home directory of project
echo $LWS
```

10
bashrc
View File

@@ -4,17 +4,19 @@ WORKSPACE_BASHRC=$(realpath $BASH_SOURCE)
export WORKSPACE=$(dirname $WORKSPACE_BASHRC)
export LWS=$WORKSPACE
LWS_DEBUG=${LWS_DEBUG:-0}
LWS_FAST=${LWS_FAST:-0}
echo "Linux Workspace initialization"
if [[ -z $LC_ALL ]]; then
export LC_ALL=en_US.UTF-8
fi
for rc_file in $WORKSPACE/rc/*.sh; do
source $rc_file
done
source "$LWS/functions.sh"
source_directory_sh "$LWS/rc"
source_directory_sh "$HOME/.bashrc.d"
append_path "$LWS/bin"
append_path "$LWS/opt/bin"
set_uniq_path

View File

@@ -4,6 +4,6 @@
# locale-gen
export LANG="cs_CZ.UTF-8"
#export LC_ALL=$LANG
export LC_ALL=$LANG
echo "LANG set to $LANG"

View File

@@ -213,7 +213,7 @@ def try_load_list(name, default):
return default
DOCKER_COMPOSE = "docker-compose"
DOCKER_COMPOSE = os.environ.get("DC", "docker compose")
DEFAULT_DCF = ["docker-compose.yaml"]
DC_FILES = try_load_list("DCF", DEFAULT_DCF)

View File

@@ -0,0 +1,488 @@
# https://github.com/seebi/dircolors-solarized/blob/master/dircolors.ansi-light
#
# Exact Solarized Light color theme for the color GNU ls utility.
# Designed for dircolors (GNU coreutils) 5.97
#
# This simple theme was simultaneously designed for these terminal color schemes:
# - Solarized dark
# - Solarized light (best)
# - default dark
# - default light
# with a slight optimization for Solarized Light.
#
# How the colors were selected:
# - Terminal emulators often have an option typically enabled by default that makes
# bold a different color. It is important to leave this option enabled so that
# you can access the entire 16-color Solarized palette, and not just 8 colors.
# - We favor universality over a greater number of colors. So we limit the number
# of colors so that this theme will work out of the box in all terminals,
# Solarized or not, dark or light.
# - We choose to have the following category of files:
# NORMAL & FILE, DIR, LINK, EXEC and
# editable text including source, unimportant text, binary docs & multimedia source
# files, viewable multimedia, archived/compressed, and unimportant non-text
# - For uniqueness, we stay away from the Solarized foreground colors are -- either
# base00 (brightyellow) or base0 (brightblue). However, they can be used if
# you know what the bg/fg colors of your terminal are, in order to optimize the display.
# - 3 different options are provided: universal, solarized dark, and solarized light.
# The only difference between the universal scheme and one that's optimized for
# dark/light is the color of "unimportant" files, which should blend more with the
# background
# - We note that blue is the hardest color to see on dark bg and yellow is the hardest
# color to see on light bg (with blue being particularly bad). So we choose yellow
# for multimedia files which are usually accessed in a GUI folder browser anyway.
# And blue is kept for custom use of this scheme's user.
# - See table below to see the assignments.
# Installation instructions:
# This file goes in the /etc directory, and must be world readable.
# You can copy this file to .dir_colors in your $HOME directory to override
# the system defaults.
# COLOR needs one of these arguments: 'tty' colorizes output to ttys, but not
# pipes. 'all' adds color characters to all output. 'none' shuts colorization
# off.
COLOR tty
# Below, there should be one TERM entry for each termtype that is colorizable
TERM alacritty
TERM ansi
TERM color_xterm
TERM color-xterm
TERM con132x25
TERM con132x30
TERM con132x43
TERM con132x60
TERM con80x25
TERM con80x28
TERM con80x30
TERM con80x43
TERM con80x50
TERM con80x60
TERM cons25
TERM console
TERM cygwin
TERM dtterm
TERM dvtm
TERM dvtm-256color
TERM Eterm
TERM eterm-color
TERM fbterm
TERM gnome
TERM gnome-256color
TERM jfbterm
TERM konsole
TERM konsole-256color
TERM kterm
TERM linux
TERM linux-c
TERM mach-color
TERM mlterm
TERM nxterm
TERM putty
TERM putty-256color
TERM rxvt
TERM rxvt-256color
TERM rxvt-cygwin
TERM rxvt-cygwin-native
TERM rxvt-unicode
TERM rxvt-unicode256
TERM rxvt-unicode-256color
TERM screen
TERM screen-16color
TERM screen-16color-bce
TERM screen-16color-s
TERM screen-16color-bce-s
TERM screen-256color
TERM screen-256color-bce
TERM screen-256color-s
TERM screen-256color-bce-s
TERM screen-256color-italic
TERM screen-bce
TERM screen-w
TERM screen.linux
TERM screen.xterm-256color
TERM screen.xterm-new
TERM st
TERM st-meta
TERM st-256color
TERM st-meta-256color
TERM tmux
TERM tmux-256color
TERM vt100
TERM xterm
TERM xterm-new
TERM xterm-16color
TERM xterm-256color
TERM xterm-256color-italic
TERM xterm-88color
TERM xterm-color
TERM xterm-debian
TERM xterm-kitty
TERM xterm-termite
# EIGHTBIT, followed by '1' for on, '0' for off. (8-bit output)
EIGHTBIT 1
#############################################################################
# Below are the color init strings for the basic file types. A color init
# string consists of one or more of the following numeric codes:
#
# Attribute codes:
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
# Text color codes:
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
#
# NOTES:
# - See http://www.oreilly.com/catalog/wdnut/excerpt/color_names.html
# - Color combinations
# ANSI Color code Solarized Notes Universal SolDark SolLight
# ~~~~~~~~~~~~~~~ ~~~~~~~~~ ~~~~~ ~~~~~~~~~ ~~~~~~~ ~~~~~~~~
# 00 none NORMAL, FILE <SAME> <SAME>
# 30 black base02
# 01;30 bright black base03 bg of SolDark
# 31 red red docs & mm src <SAME> <SAME>
# 01;31 bright red orange EXEC <SAME> <SAME>
# 32 green green editable text <SAME> <SAME>
# 01;32 bright green base01 unimportant text <SAME>
# 33 yellow yellow unclear in light bg multimedia <SAME> <SAME>
# 01;33 bright yellow base00 fg of SolLight unimportant non-text
# 34 blue blue unclear in dark bg user customized <SAME> <SAME>
# 01;34 bright blue base0 fg in SolDark unimportant text
# 35 magenta magenta LINK <SAME> <SAME>
# 01;35 bright magenta violet archive/compressed <SAME> <SAME>
# 36 cyan cyan DIR <SAME> <SAME>
# 01;36 bright cyan base1 unimportant non-text <SAME>
# 37 white base2
# 01;37 bright white base3 bg in SolLight
# 05;37;41 unclear in Putty dark
### By file type
# global default
NORMAL 00
# normal file
FILE 00
# directory
DIR 36
# XX2, XX3, XX6, and XX7 directories
OTHER_WRITABLE 34;47
# symbolic link
LINK 35
# pipe, socket, block device, character device (blue bg)
FIFO 30;44
SOCK 35;44
DOOR 35;44 # Solaris 2.5 and later
BLK 33;44
CHR 37;44
#############################################################################
### By file attributes
# Orphaned symlinks (blinking white on red)
# Blink may or may not work (works on iTerm dark or light, and Putty dark)
ORPHAN 05;37;41
# ... and the files that orphaned symlinks point to (blinking white on red)
MISSING 05;37;41
# files with execute permission
EXEC 01;31 # Unix
.cmd 01;31 # Win
.exe 01;31 # Win
.com 01;31 # Win
.bat 01;31 # Win
.reg 01;31 # Win
.app 01;31 # OSX
#############################################################################
### By extension
# List any file extensions like '.gz' or '.tar' that you would like ls
# to colorize below. Put the extension, a space, and the color init string.
# (and any comments you want to add after a '#')
### Text formats
# Text that we can edit with a regular editor
.txt 32
.org 32
.md 32
.mkd 32
# Source text
.h 32
.hpp 32
.c 32
.C 32
.cc 32
.cpp 32
.cxx 32
.objc 32
.cl 32
.sh 32
.bash 32
.csh 32
.zsh 32
.el 32
.vim 32
.java 32
.pl 32
.pm 32
.py 32
.rb 32
.hs 32
.php 32
.htm 32
.html 32
.shtml 32
.erb 32
.haml 32
.xml 32
.rdf 32
.css 32
.sass 32
.scss 32
.less 32
.js 32
.coffee 32
.man 32
.0 32
.1 32
.2 32
.3 32
.4 32
.5 32
.6 32
.7 32
.8 32
.9 32
.l 32
.n 32
.p 32
.pod 32
.tex 32
.go 32
.sql 32
.csv 32
.sv 32
.svh 32
.v 32
.vh 32
.vhd 32
### Multimedia formats
# Image
.bmp 33
.cgm 33
.dl 33
.dvi 33
.emf 33
.eps 33
.gif 33
.jpeg 33
.jpg 33
.JPG 33
.mng 33
.pbm 33
.pcx 33
.pgm 33
.png 33
.PNG 33
.ppm 33
.pps 33
.ppsx 33
.ps 33
.svg 33
.svgz 33
.tga 33
.tif 33
.tiff 33
.xbm 33
.xcf 33
.xpm 33
.xwd 33
.xwd 33
.yuv 33
.nef 33 # Nikon RAW format
.NEF 33
.heic 33
.HEIC 33
# Audio
.aac 33
.au 33
.flac 33
.m4a 33
.mid 33
.midi 33
.mka 33
.mp3 33
.mpa 33
.mpeg 33
.mpg 33
.ogg 33
.opus 33
.ra 33
.wav 33
# Video
.anx 33
.asf 33
.avi 33
.axv 33
.flc 33
.fli 33
.flv 33
.gl 33
.m2v 33
.m4v 33
.mkv 33
.mov 33
.MOV 33
.mp4 33
.mp4v 33
.mpeg 33
.mpg 33
.nuv 33
.ogm 33
.ogv 33
.ogx 33
.qt 33
.rm 33
.rmvb 33
.swf 33
.vob 33
.webm 33
.wmv 33
### Misc
# Binary document formats and multimedia source
.doc 31
.docx 31
.rtf 31
.odt 31
.dot 31
.dotx 31
.ott 31
.xls 31
.xlsx 31
.ods 31
.ots 31
.ppt 31
.pptx 31
.odp 31
.otp 31
.fla 31
.psd 31
.pdf 31
# Archives, compressed
.7z 1;35
.apk 1;35
.arj 1;35
.bin 1;35
.bz 1;35
.bz2 1;35
.cab 1;35 # Win
.deb 1;35
.dmg 1;35 # OSX
.gem 1;35
.gz 1;35
.iso 1;35
.jar 1;35
.msi 1;35 # Win
.rar 1;35
.rpm 1;35
.tar 1;35
.tbz 1;35
.tbz2 1;35
.tgz 1;35
.tx 1;35
.war 1;35
.xpi 1;35
.xz 1;35
.z 1;35
.Z 1;35
.zip 1;35
.zst 1;35
# For testing
.ANSI-30-black 30
.ANSI-01;30-brblack 01;30
.ANSI-31-red 31
.ANSI-01;31-brred 01;31
.ANSI-32-green 32
.ANSI-01;32-brgreen 01;32
.ANSI-33-yellow 33
.ANSI-01;33-bryellow 01;33
.ANSI-34-blue 34
.ANSI-01;34-brblue 01;34
.ANSI-35-magenta 35
.ANSI-01;35-brmagenta 01;35
.ANSI-36-cyan 36
.ANSI-01;36-brcyan 01;36
.ANSI-37-white 37
.ANSI-01;37-brwhite 01;37
#############################################################################
# Your customizations
# Unimportant text files
# For universal scheme, use brightgreen 01;32
# For optimal on light bg (but too prominent on dark bg), use white 01;34
#.log 01;32
#*~ 01;32
#*# 01;32
.log 01;34
*~ 01;34
*# 01;34
# Unimportant non-text files
# For universal scheme, use brightcyan 01;36
# For optimal on dark bg (but too prominent on light bg), change to 01;33
.bak 01;36
.BAK 01;36
.old 01;36
.OLD 01;36
.org_archive 01;36
.off 01;36
.OFF 01;36
.dist 01;36
.DIST 01;36
.orig 01;36
.ORIG 01;36
.swp 01;36
.swo 01;36
*.v 01;36
#.bak 01;33
#.BAK 01;33
#.old 01;33
#.OLD 01;33
#.org_archive 01;33
#.off 01;33
#.OFF 01;33
#.dist 01;33
#.DIST 01;33
#.orig 01;33
#.ORIG 01;33
#.swp 01;33
#.swo 01;33
#*.v 01;33
# The brightmagenta (Solarized: purple) color is free for you to use for your
# custom file type
.gpg 34
.pgp 34
.asc 34
.3des 34
.aes 34
.enc 34
.sqlite 34

View File

@@ -0,0 +1,260 @@
# https://github.com/dracula/dircolors
# Configuration file for dircolors, a utility to help you set the
# LS_COLORS environment variable used by GNU ls with the --color option.
# Copyright (C) 1996-2024 Free Software Foundation, Inc.
# Copying and distribution of this file, with or without modification,
# are permitted provided the copyright notice and this notice are preserved.
#
# The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the
# slackware version of dircolors) are recognized but ignored.
# Global config options can be specified before TERM or COLORTERM entries
# ===================================================================
# Terminal filters
# ===================================================================
# Below are TERM or COLORTERM entries, which can be glob patterns, which
# restrict following config to systems with matching environment variables.
COLORTERM ?*
TERM Eterm
TERM ansi
TERM *color*
TERM con[0-9]*x[0-9]*
TERM cons25
TERM console
TERM cygwin
TERM *direct*
TERM dtterm
TERM gnome
TERM hurd
TERM jfbterm
TERM konsole
TERM kterm
TERM linux
TERM linux-c
TERM mlterm
TERM putty
TERM rxvt*
TERM screen*
TERM st
TERM terminator
TERM tmux*
TERM vt48;2;98;114;164
TERM xterm*
# ===================================================================
# Basic file attributes
# ===================================================================
# Below are the color init strings for the basic file types.
# One can use codes for 256 or more colors supported by modern terminals.
# The default color codes use the capabilities of an 8 color terminal
# with some additional attributes as per the following codes:
# Attribute codes:
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
# Text color codes:
# 38;2;33;34;44=black 38;2;255;85;85=red 38;2;80;250;123=green 38;2;241;250;140=yellow 38;2;189;147;249=blue 38;2;255;121;198=magenta 38;2;139;233;253=cyan 38;2;248;248;242=white
# Background color codes:
# 48;2;33;34;44=black 48;2;255;85;85=red 48;2;80;250;123=green 48;2;241;250;140=yellow 48;2;189;147;249=blue 48;2;255;121;198=magenta 48;2;139;233;253=cyan 48;2;248;248;242=white
#NORMAL 00 # no color code at all
#FILE 00 # regular file: use no color at all
RESET 0 # reset to "normal" color
DIR 01;38;2;189;147;249 # directory
LINK 01;38;2;139;233;253 # symbolic link. (If you set this to 'target' instead of a
# numerical value, the color is as for the file pointed to.)
MULTIHARDLINK 00 # regular file with more than one link
FIFO 48;2;33;34;44;38;2;241;250;140 # pipe
SOCK 01;38;2;255;121;198 # socket
DOOR 01;38;2;255;121;198 # door
BLK 48;2;33;34;44;38;2;241;250;140;01 # block device driver
CHR 48;2;33;34;44;38;2;241;250;140;01 # character device driver
ORPHAN 48;2;33;34;44;38;2;255;85;85;01 # symlink to nonexistent file, or non-stat'able file ...
MISSING 00 # ... and the files they point to
SETUID 38;2;248;248;242;48;2;255;85;85 # file that is setuid (u+s)
SETGID 38;2;33;34;44;48;2;241;250;140 # file that is setgid (g+s)
CAPABILITY 00 # file with capability (very expensive to lookup)
STICKY_OTHER_WRITABLE 38;2;33;34;44;48;2;80;250;123 # dir that is sticky and other-writable (+t,o+w)
OTHER_WRITABLE 38;2;189;147;249;48;2;80;250;123 # dir that is other-writable (o+w) and not sticky
STICKY 38;2;248;248;242;48;2;189;147;249 # dir with the sticky bit set (+t) and not other-writable
# This is for files with execute permission:
EXEC 01;38;2;80;250;123
# ===================================================================
# File extension attributes
# ===================================================================
# List any file extensions like '.gz' or '.tar' that you would like ls
# to color below. Put the suffix, a space, and the color init string.
# (and any comments you want to add after a '#').
# Suffixes are matched case insensitively, but if you define different
# init strings for separate cases, those will be honored.
#
# If you use DOS-style suffixes, you may want to uncomment the following:
#.cmd 01;38;2;80;250;123 # executables (bright green)
#.exe 01;38;2;80;250;123
#.com 01;38;2;80;250;123
#.btm 01;38;2;80;250;123
#.bat 01;38;2;80;250;123
# Or if you want to color scripts even if they do not have the
# executable bit actually set.
#.sh 01;38;2;80;250;123
#.csh 01;38;2;80;250;123
# archives or compressed (bright red)
.7z 01;38;2;255;85;85
.ace 01;38;2;255;85;85
.alz 01;38;2;255;85;85
.apk 01;38;2;255;85;85
.arc 01;38;2;255;85;85
.arj 01;38;2;255;85;85
.bz 01;38;2;255;85;85
.bz2 01;38;2;255;85;85
.cab 01;38;2;255;85;85
.cpio 01;38;2;255;85;85
.crate 01;38;2;255;85;85
.deb 01;38;2;255;85;85
.drpm 01;38;2;255;85;85
.dwm 01;38;2;255;85;85
.dz 01;38;2;255;85;85
.ear 01;38;2;255;85;85
.egg 01;38;2;255;85;85
.esd 01;38;2;255;85;85
.gz 01;38;2;255;85;85
.jar 01;38;2;255;85;85
.lha 01;38;2;255;85;85
.lrz 01;38;2;255;85;85
.lz 01;38;2;255;85;85
.lz4 01;38;2;255;85;85
.lzh 01;38;2;255;85;85
.lzma 01;38;2;255;85;85
.lzo 01;38;2;255;85;85
.pyz 01;38;2;255;85;85
.rar 01;38;2;255;85;85
.rpm 01;38;2;255;85;85
.rz 01;38;2;255;85;85
.sar 01;38;2;255;85;85
.swm 01;38;2;255;85;85
.t7z 01;38;2;255;85;85
.tar 01;38;2;255;85;85
.taz 01;38;2;255;85;85
.tbz 01;38;2;255;85;85
.tbz2 01;38;2;255;85;85
.tgz 01;38;2;255;85;85
.tlz 01;38;2;255;85;85
.txz 01;38;2;255;85;85
.tz 01;38;2;255;85;85
.tzo 01;38;2;255;85;85
.tzst 01;38;2;255;85;85
.udeb 01;38;2;255;85;85
.war 01;38;2;255;85;85
.whl 01;38;2;255;85;85
.wim 01;38;2;255;85;85
.xz 01;38;2;255;85;85
.z 01;38;2;255;85;85
.zip 01;38;2;255;85;85
.zoo 01;38;2;255;85;85
.zst 01;38;2;255;85;85
# image formats
.avif 01;38;2;255;121;198
.jpg 01;38;2;255;121;198
.jpeg 01;38;2;255;121;198
.mjpg 01;38;2;255;121;198
.mjpeg 01;38;2;255;121;198
.gif 01;38;2;255;121;198
.bmp 01;38;2;255;121;198
.pbm 01;38;2;255;121;198
.pgm 01;38;2;255;121;198
.ppm 01;38;2;255;121;198
.tga 01;38;2;255;121;198
.xbm 01;38;2;255;121;198
.xpm 01;38;2;255;121;198
.tif 01;38;2;255;121;198
.tiff 01;38;2;255;121;198
.png 01;38;2;255;121;198
.svg 01;38;2;255;121;198
.svgz 01;38;2;255;121;198
.mng 01;38;2;255;121;198
.pcx 01;38;2;255;121;198
.mov 01;38;2;255;121;198
.mpg 01;38;2;255;121;198
.mpeg 01;38;2;255;121;198
.m2v 01;38;2;255;121;198
.mkv 01;38;2;255;121;198
.webm 01;38;2;255;121;198
.webp 01;38;2;255;121;198
.ogm 01;38;2;255;121;198
.mp4 01;38;2;255;121;198
.m4v 01;38;2;255;121;198
.mp4v 01;38;2;255;121;198
.vob 01;38;2;255;121;198
.qt 01;38;2;255;121;198
.nuv 01;38;2;255;121;198
.wmv 01;38;2;255;121;198
.asf 01;38;2;255;121;198
.rm 01;38;2;255;121;198
.rmvb 01;38;2;255;121;198
.flc 01;38;2;255;121;198
.avi 01;38;2;255;121;198
.fli 01;38;2;255;121;198
.flv 01;38;2;255;121;198
.gl 01;38;2;255;121;198
.dl 01;38;2;255;121;198
.xcf 01;38;2;255;121;198
.xwd 01;38;2;255;121;198
.yuv 01;38;2;255;121;198
.cgm 01;38;2;255;121;198
.emf 01;38;2;255;121;198
# https://wiki.xiph.org/MIME_Types_and_File_Extensions
.ogv 01;38;2;255;121;198
.ogx 01;38;2;255;121;198
# audio formats
.aac 00;38;2;139;233;253
.au 00;38;2;139;233;253
.flac 00;38;2;139;233;253
.m4a 00;38;2;139;233;253
.mid 00;38;2;139;233;253
.midi 00;38;2;139;233;253
.mka 00;38;2;139;233;253
.mp3 00;38;2;139;233;253
.mpc 00;38;2;139;233;253
.ogg 00;38;2;139;233;253
.ra 00;38;2;139;233;253
.wav 00;38;2;139;233;253
# https://wiki.xiph.org/MIME_Types_and_File_Extensions
.oga 00;38;2;139;233;253
.opus 00;38;2;139;233;253
.spx 00;38;2;139;233;253
.xspf 00;38;2;139;233;253
# backup files
*~ 00;38;2;98;114;164
*# 00;38;2;98;114;164
.bak 00;38;2;98;114;164
.crdownload 00;38;2;98;114;164
.dpkg-dist 00;38;2;98;114;164
.dpkg-new 00;38;2;98;114;164
.dpkg-old 00;38;2;98;114;164
.dpkg-tmp 00;38;2;98;114;164
.old 00;38;2;98;114;164
.orig 00;38;2;98;114;164
.part 00;38;2;98;114;164
.rej 00;38;2;98;114;164
.rpmnew 00;38;2;98;114;164
.rpmorig 00;38;2;98;114;164
.rpmsave 00;38;2;98;114;164
.swp 00;38;2;98;114;164
.tmp 00;38;2;98;114;164
.ucf-dist 00;38;2;98;114;164
.ucf-new 00;38;2;98;114;164
.ucf-old 00;38;2;98;114;164
#
# Subsequent TERM or COLORTERM entries, can be used to add / override
# config specific to those matching environment variables.

View File

@@ -1,2 +0,0 @@
colorscheme elflord
set guifont=Monospace\ 11

View File

@@ -3,6 +3,7 @@ curl
wget
tcpdump
iotop
nmap
lsof
netcat
mc
@@ -11,7 +12,7 @@ vim
htop
jq
mosh
ssh
openssh-client
powertop
hwinfo
sshfs

View File

@@ -30,7 +30,7 @@ set scrolloff=0
" svetle modry komentar
highlight Normal guibg=black guifg=white ctermbg=black ctermfg=white
" mapuje v prikazovem rezimu klavesy na jine kvuli spatne klavesnici
set langmap=ì2,¹3,è4,ø5,¾6,ý7,á8,í9,é0,\":,-/,_?
" set langmap=<EFBFBD>2,<EFBFBD>3,<EFBFBD>4,<EFBFBD>5,<EFBFBD>6,<EFBFBD>7,<EFBFBD>8,<EFBFBD>9,<EFBFBD>0,\":,-/,_?
" editovany soubor se pri kazde prilezitosti uklada
set autowrite
" vytvaret zalohy souboru
@@ -44,7 +44,7 @@ set confirm
" kolik se ma zachovavat informaci do dalsiho spusteni
set viminfo='50,\"500
" pamatuje si pozici kurzoru z posledni editace
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal g'\"z." | endif
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal g'\"z." | endif
" neposkakuje v textu pri zapisu hledaneho slova
set noincsearch
" zapni zvyrazneni hledanych slov
@@ -83,12 +83,12 @@ set backspace=2
" Prevod na taby
" :set noexpandtab
" :retab
"
"
" Zobraz taby a konce radku
" :set list
" Zobraz cisla radek
" :set number
"
"
" Docasne zrusi zvyrazneni vyhledavani
" :nohls
"
@@ -96,5 +96,5 @@ set backspace=2
" napise <STRONG></STRONG> a kurzor umisti doprostred
" makro se aktivuje napsanim ,bb v editacnim rezimu
" imap ,bb <STRONG></STRONG><Esc>F<i
"
"

15
conf/vim/vimrc Normal file
View File

@@ -0,0 +1,15 @@
" Add to ~/.vimrc:
" source $LWS/conf/vim/vimrc
function! SourceLws(filename)
let conf = $LWS . "/" . a:filename
" echo conf
let command = "source " . conf
" echo command
exec command
endfunction
call SourceLws('conf/vim/pivo.vimrc')
colorscheme elflord
set guifont=Monospace\ 11

21
conf/wsl.conf Normal file
View File

@@ -0,0 +1,21 @@
# https://learn.microsoft.com/en-us/windows/wsl/wsl-config
[boot]
systemd=false
[user]
default=lachtan
[automount]
enabled = true
[network]
generateHosts = true
generateResolvConf = false
[interop]
enabled = false
appendWindowsPath = false
[gpu]
enabled = true

11
fishrc Normal file
View File

@@ -0,0 +1,11 @@
# ~/.config/fish/config.fish
# echo "source $LWS/fishrc" > $__fish_config_dir/conf.d/lws.fish
# $__fish_config_dir/conf.d (by default, ~/.config/fish/conf.d/)
# $__fish_sysconf_dir/conf.d (by default, /etc/fish/conf.d/)
set -gx PAGER less
set -g fish_prompt_pwd_dir_length 0
# set -g fish_autosuggestion_enabled 0
# fish_config theme choose "fish default"

View File

@@ -1,5 +1,17 @@
# Linux Workspace Functions
if [ -z "$time_ms" ]; then
readonly time_ms='date +%s%3N'
fi
function is_fast_init() {
(( $LWS_FAST ))
}
function is_slow_init() {
! is_fast_init
}
function xlog() {
if true_false "$LWS_DEBUG"; then
echo "$@"
@@ -66,7 +78,7 @@ function remove_path() {
}
function uniq_path() {
echo "$PATH" | tr ":" "\n" | awk '!seen[$0]++' | tr "\n" ":" | sed -r 's/:+/:/g' | sed -r 's/^:|:$//g'
path | awk '!seen[$0]++' | tr "\n" ":" | sed -r 's/:+/:/g' | sed -r 's/^:|:$//g'
}
function set_uniq_path() {
@@ -84,10 +96,17 @@ function can_run() {
function source_directory() {
local mask="$1"
xlog "LOAD DIR $mask"
for file in $mask; do
if [[ -e "$file" ]]; then
xlog "LOAD $file"
source "$file"
if (( $LWS_DEBUG )); then
start=$($time_ms)
source "$file"
stop=$($time_ms)
echo "LOAD FILE $file $((stop - start)) ms"
else
source "$file"
fi
fi
done
}
@@ -116,3 +135,6 @@ function true_false() {
[[ "${1@L}" =~ ^(1|true|yes)$ ]]
}
function is_wsl() {
grep -q -i wsl /proc/version
}

30
install.sh Executable file
View File

@@ -0,0 +1,30 @@
#!/usr/bin/env bash
set -E -o errexit -o nounset -o pipefail
function install_lws() {
local LWS_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
if grep -q -e "source.*$LWS_DIR/bashrc" $HOME/.bashrc; then
echo "SKIP: Linux Workspace configuration already exists in $HOME/.bashrc !"
else
echo "Adding to $HOME/.bashrc"
echo "source '$LWS_DIR/bashrc'" >> "$HOME/.bashrc"
fi
local FISH_CONF_DIR="$HOME/.config/fish"
local FISH_CONF_LWS="$FISH_CONF_DIR/conf.d/lws.fish"
if [[ -d "$FISH_CONF_DIR" ]]; then
if [[ -f "$FISH_CONF_LWS" ]]; then
echo "SKIP: Linux Workspace configuration already exists in $FISH_CONF_LWS !"
else
echo "Adding to $FISH_CONF_LWS"
echo "source $LWS_DIR/fishrc" > "$FISH_CONF_LWS"
fi
else
echo "Fish configuration directory not found, skipping fish setup."
fi
}
install_lws

4
install/docker-ce.sh Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/bash
set -x -e
curl -fsSL https://get.docker.com -o get-docker.sh | sudo bash

0
scripts/enhancd-install.sh → install/enhancd.sh Normal file → Executable file
View File

View File

@@ -1,7 +1,9 @@
#!/bin/bash
set -E -o errexit -o nounset -o pipefail
set -x
set -u
GIT_PROMPT_PATH=${GIT_PROMPT_PATH:-$LWS/opt/bash-git-prompt}
readonly REPO="https://github.com/magicmonty/bash-git-prompt.git"

5
install/homebrew.sh Executable file
View File

@@ -0,0 +1,5 @@
#!/bin/bash
# https://docs.brew.sh/Homebrew-on-Linux
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh | bash

10
install/lazygit.sh Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/bash
set -x
LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | \grep -Po '"tag_name": *"v\K[^"]*')
curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/download/v${LAZYGIT_VERSION}/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz"
tar xf lazygit.tar.gz lazygit
install lazygit -D -t $HOME/.local/bin/
rm lazygit.tar.gz
rm lazygit

View File

@@ -1,5 +1,6 @@
#!/bin/bash
# mdr : MarkDown Renderer
# git clone https://github.com/MichaelMure/mdr.git ~/src/others/
set -o nounset

5
install/packages.sh Executable file
View File

@@ -0,0 +1,5 @@
#!/bin/bash
set -E -o errexit -o nounset -o pipefail
cat $LWS/conf/packages.txt | grep -v '^\s*#' | sudo xargs apt-get install -y

View File

@@ -5,18 +5,21 @@ set -x
function pwsh_install_dotnet() {
# https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux#install-as-a-net-global-tool
dotnet tool install --global PowerShell
dotnet tool update --global PowerShell
}
function pwsh_install_apt() {
# https://learn.microsoft.com/en-us/powershell/scripting/install/install-ubuntu
# https://learn.microsoft.com/en-us/powershell/scripting/install/install-debian
deb=/tmp/packages-microsoft-prod.deb
sudo apt-get update
sudo apt-get install -y wget apt-transport-https software-properties-common
wget -O /tmp/packages-microsoft-prod.deb "https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb"
sudo dpkg -i /tmp/packages-microsoft-prod.deb
rm /tmp/packages-microsoft-prod.deb
source /etc/os-release
wget -O $deb "https://packages.microsoft.com/config/debian/$VERSION_ID/packages-microsoft-prod.deb"
sudo dpkg -i $deb
rm $deb
sudo apt-get update
sudo apt-get install -y powershell
}

10
install/rust.sh Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/bash
# https://www.rust-lang.org/tools/install
set -E -o errexit -o nounset -o pipefail
sudo apt install curl -y
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"
rustup update

View File

@@ -3,6 +3,3 @@
# https://sdkman.io/install
curl -s "https://get.sdkman.io" | bash
# todo pridat do .bashrc
source "/home/lachtan/.sdkman/bin/sdkman-init.sh"

8
install/uv.sh Executable file
View File

@@ -0,0 +1,8 @@
#!/bin/bash
set -E -o errexit -o nounset -o pipefail
set -x
curl -LsSf https://astral.sh/uv/install.sh | sh
source "$HOME/.cargo/env"
uv --version

19
rc.available/go-env.sh Normal file
View File

@@ -0,0 +1,19 @@
# Use user defined Go version
# GOPATH and GOROOT must be already set in $HOME/.bashrc
_GO_BIN_DIR="$HOME/go/bin"
if [[ -d "$_GO_BIN_DIR"]]; then
prepend_path_try "$_GO_BIN_DIR"
if can_run go; then
export GOROOT=$(go env GOROOT)
fi
fi
if [[ ! -z "$GOPATH" ]]; then
prepend_path "$GOPATH/bin"
fi
if [[ ! -z "$GOROOT" ]]; then
prepend_path "$GOROOT/bin"
fi

View File

@@ -1,3 +0,0 @@
nop ${GIT_PROMPT_INIT:="$HOME/.bash-git-prompt/gitprompt.sh"}
nop ${GIT_PROMPT_ONLY_IN_REPO:=1}
source_try "$GIT_PROMPT_INIT"

View File

@@ -1,4 +0,0 @@
prepend_path_try "$HOME/go/bin"
if can_run go; then
export GOROOT=$(go env GOROOT)
fi

View File

@@ -1,6 +0,0 @@
# Initializae pyenv
if can_run pyenv; then
export PYENV_ROOT=${PYENV_ROOT:-$HOME/.pyenv}
eval "$(pyenv init -)"
fi

View File

@@ -1,3 +0,0 @@
nop "${SDKMAN_DIR:=$HOME/.sdkman}"
export SDKMAN_DIR
source_try "$SDKMAN_DIR/bin/sdkman-init.sh"

View File

@@ -1,3 +0,0 @@
prepend_path_try "$HOME/.local/bin"
append_path_try "$HOME/.arkade/bin"
append_path_try "$HOME/.cargo/bin"

0
rc/01-init.fish Normal file
View File

2
rc/01-path.sh Normal file
View File

@@ -0,0 +1,2 @@
prepend_path_try "$HOME/.local/bin"
prepend_path_try "$HOME/bin"

View File

@@ -51,3 +51,13 @@ alias cs='. $LWS/bin/cs.sh'
alias fp="fzf --preview '~/bin/bat {} --color=always'"
alias mp=multipass
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
# Spotifi HiDPI
# alias spotify="/snap/bin/spotify --force-device-scale-factor=2"
# Zoom HiDPI
# alias zoom='export QT_DEVICE_PIXEL_RATIO=2; /usr/bin/zoom'

26
rc/bash-prompt.sh Normal file
View File

@@ -0,0 +1,26 @@
# Inspired by
# https://www.cyberciti.biz/faq/bash-shell-change-the-color-of-my-shell-prompt-under-linux-or-unix/
# https://linux.101hacks.com/ps1-examples/prompt-color-using-tput/
RED=$(tput setaf 1)
GREEN=$(tput setaf 2)
CYAN=$(tput setaf 6)
COLOR_RESET=$(tput sgr0)
function get_ps1_prompt()
{
local username='\u'
local hostname='\h'
local workdir='\w'
local user_type='\$'
echo "${debian_chroot:+($debian_chroot)}${GREEN}${username}@${hostname}${COLOR_RESET}:${CYAN}${workdir}${COLOR_RESET}${user_type} "
}
function set_ps1_prompt()
{
PS1="$(get_ps1_prompt)"
export PS1
}
set_ps1_prompt

1
rc/cargo.sh Normal file
View File

@@ -0,0 +1 @@
source_try "$HOME/.cargo/env"

15
rc/dircolors.sh Normal file
View File

@@ -0,0 +1,15 @@
# Better colors for dark themes
# https://dev.to/fernand0/better-colors-for-ls-in-dark-terminals-3d6
# https://github.com/seebi/dircolors-solarized
#COLORS_FILE="$LWS/conf/dircolors/ansi-light.dircolors"
COLORS_FILE="$LWS/conf/dircolors/dracula.dircolors"
if [[ -f "$COLORS_FILE" ]]; then
xlog "Loading colors $COLORS_FILE"
eval "$(dircolors "$COLORS_FILE")"
else
xlog "Colors $COLORS_FILE not found"
fi
unset COLORS_FILE

View File

@@ -1,5 +1,5 @@
# Loading direnv bash hook
if command -v direnv > /dev/null; then
if can_run direnv; then
eval "$(direnv hook bash)"
fi

View File

@@ -1,5 +1,7 @@
if [[ -f WORKSPAACE/opt/enhancd/init.sh ]]; then
source $WORKSPACE/opt/enhancd/init.sh
_INIT_FILE=$WORKSPACE/opt/enhancd/init.sh
if [[ -f $_INIT_FILE ]]; then
source $_INIT_FILE
unalias cd
alias ecd="__enhancd::cd"
fi

View File

@@ -1,8 +1,8 @@
export PAGER=less
export EDITOR=vim
# https://docs.microsoft.com/en-us/dotnet/core/tools/telemetry
export DOTNET_CLI_TELEMETRY_OPTOUT=1
source_try "$HOME/.local/bin/env"
prepend_path_try "$HOME/.local/bin"
if can_run bat && ! is_alias bat; then
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
@@ -11,4 +11,3 @@ fi
if ! can_run bat && can_run batcat; then
alias bat=batcat
fi

View File

@@ -1,7 +1,13 @@
export GIT_PROMPT_PATH="$LWS/opt/bash-git-prompt"
if [ -d "$HOME/.bash-git-prompt" ]; then
GIT_PROMPT_PATH="$HOME/.bash-git-prompt"
else
GIT_PROMPT_PATH="$LWS/opt/bash-git-prompt"
fi
GIT_PROMPT_INIT="$GIT_PROMPT_PATH/gitprompt.sh"
if [ -f "$GIT_PROMPT_INIT" ]; then
export GIT_PROMPT_PATH
GIT_PROMPT_ONLY_IN_REPO=1
source "$GIT_PROMPT_INIT"
fi

View File

@@ -1,11 +0,0 @@
# Use user defined Go version
# GOPATH and GOROOT must be already set in $HOME/.bashrc
if [[ ! -z "$GOPATH" ]]; then
prepend_path "$GOPATH/bin"
fi
if [[ ! -z "$GOROOT" ]]; then
prepend_path "$GOROOT/bin"
fi

8
rc/nvm.sh Normal file
View File

@@ -0,0 +1,8 @@
NVM_DIR="$HOME/.nvm"
if [ -d "$NVM_DIR" ]; then
export NVM_DIR
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
else
unset NVM_DIR
fi

View File

@@ -1,3 +0,0 @@
export PGHOST=localhost
export PGUSER=postgres
export PGPASSWORD=passw0rd

13
rc/pyenv.sh Normal file
View File

@@ -0,0 +1,13 @@
# Initialize pyenv
if is_slow_init; then
PYENV_ROOT="${PYENV_ROOT:-$HOME/.pyenv}"
if [[ -d "$PYENV_ROOT" ]]; then
export PYENV_ROOT
if ! can_run pyenv; then
append_path "$PYENV_ROOT/bin"
fi
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
fi
fi

5
rc/sdkman.sh Normal file
View File

@@ -0,0 +1,5 @@
nop "${SDKMAN_DIR:=$HOME/.sdkman}"
if [[ -d $SDKMAN_DIR ]]; then
export SDKMAN_DIR
source_try "$SDKMAN_DIR/bin/sdkman-init.sh"
fi

View File

@@ -1,9 +1,51 @@
# Start ssh agent for private key
function _log() {
xlog "[ssh-agent] $*"
}
_SSH_AGENT_NO_KEYS=1
_SSH_AGENT_NOT_RUNNING=2
for key in id_ecdsa id_rsa; do
key_filename="$HOME/.ssh/$key"
if [ -f $key_filename ]; then
eval $(keychain --eval --quiet --agents ssh $key)
if [ -f "$key_filename" ]; then
_log "SSH key: $key_filename"
if is_wsl; then
_log "WSL ON"
if [ -z "$SSH_AUTH_SOCK" ]; then
export SSH_AUTH_SOCK=$HOME/.ssh/ssh-agent.sock
fi
_log "SSH_AUTH_SOCK: $SSH_AUTH_SOCK"
ssh-add -L &> /dev/null
ssh_add_status=$?
if [[ -S "$SSH_AUTH_SOCK" && $ssh_add_status -eq $_SSH_AGENT_NOT_RUNNING ]]; then
_log "SSH agent does not running, delete $SSH_AUTH_SOCK"
rm -f "$SSH_AUTH_SOCK"
fi
if [[ ! -S "$SSH_AUTH_SOCK" || $ssh_add_status -eq $_SSH_AGENT_NOT_RUNNING ]]; then
_log "Starting ssh-agent"
eval "$(ssh-agent -s -a "$SSH_AUTH_SOCK")"
fi
ssh-add -L &> /dev/null
ssh_add_status=$?
if [[ $ssh_add_status -eq $_SSH_AGENT_NO_KEYS ]]; then
_log "Adding SSH key to agent"
ssh-add "$key_filename"
fi
else
eval "$(keychain --eval --quiet --agents ssh $key)"
fi
break
fi
done

View File

@@ -1,6 +1,3 @@
if [[ -z "$LWS_FAST" ]]; then
if type thefuck > /dev/null; then
eval "$(thefuck --alias)"
fi
if is_slow_init && can_run thefuck; then
eval "$(thefuck --alias)"
fi

View File

@@ -1 +0,0 @@
alias turl='curl -H "Authorization: Bearer $API_TOKEN"'

View File

@@ -1,5 +0,0 @@
# Load user locals bashrc
source_directory_sh "$LWS/rc.local"
# user operations are in the end to have change to change everyting/anything
source_directory_sh "$HOME/.bashrc.d"

View File

@@ -1,10 +0,0 @@
# Spotifi HiDPI
#alias spotify="/snap/bin/spotify --force-device-scale-factor=2"
# Zoom HiDPI
alias zoom='export QT_DEVICE_PIXEL_RATIO=2; /usr/bin/zoom'
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'

4
scripts/detect-x.sh Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/bash
echo $XDG_SESSION_TYPE

View File

@@ -1,2 +0,0 @@
sudo snap install --classic kotlin

View File

@@ -1,18 +0,0 @@
#!/bin/bash
# https://docs.docker.com/engine/install/ubuntu/
set -x
set -e
sudo apt-get remove -y --ignore-missing docker docker.io containerd runc
sudo apt-get update
sudo apt-get install -y ca-certificates curl gnupg lsb-release
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose docker-compose-plugin

View File

@@ -40,7 +40,7 @@ function git_unalias() {
function git_set() {
local name="$1"
local value="$2"
run git config --global "$name" "$value"
run git config --global --replace-all "$name" "$value"
}
function git_unset() {
@@ -107,6 +107,9 @@ function unset_colors() {
}
git_set core.editor vim
git_set submodule.recurse true
git_set push.autoSetupRemote true
git_set pull.ff only
git_alias st status
@@ -121,6 +124,7 @@ git_alias copy 'branch --copy'
git_alias co checkout
git_alias cob "checkout -b"
git_alias sw switch
git_alias swm "switch master"
git_alias mr $'!sh -c \'git fetch $1 merge-requests/$2/head:mr-$1-$2 && git checkout mr-$1-$2\' -'
git_alias pr $'!sh -c \'git fetch $1 pull/$2/head:pr-$1-$2 && git checkout pr-$1-$2\' -'

View File

@@ -1,6 +0,0 @@
#!/bin/bash
# https://docs.brew.sh/Homebrew-on-Linux
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

View File

@@ -1,12 +0,0 @@
#!/bin/bash
cat <<EOT
# STEPS
sudo snap install go
cd ~/src/others/
git clone https://github.com/MichaelMure/mdr
cd mdr
make
cp mdr ~/bin/
EOT

14
scripts/sudo-user.sh Executable file
View File

@@ -0,0 +1,14 @@
#!/bin/bash
# oneliner for quick copy
# echo "$USER ALL=(ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/$USER
set -E -o errexit -o nounset -o pipefail
USER_FILE="/etc/sudoers.d/$USER"
if [[ -f $USER_FILE ]]; then
echo "Sudo file $USER_FILE already exists!"
exit 1
fi
echo "$USER ALL=(ALL) NOPASSWD:ALL" | sudo tee $USER_FILE

View File

@@ -1,9 +1,8 @@
# defaults
[*]
charset=utf-8
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line=lf
end_of_line = lf
indent_size = 4
indent_style = space
@@ -13,20 +12,14 @@ indent_style = tab
[*.xml]
continuation_indent_size = 8
# YAML
# http://yaml.org/spec/1.2/2009-07-21/spec.html#id2576668
[*.{yaml,yml}]
indent_size = 2
# Shell
# https://google.github.io/styleguide/shell.xml#Indentation
[*.{bash,sh,zsh}]
indent_size = 2
# HTML
# https://google.github.io/styleguide/htmlcssguide.xml#General_Formatting_Rules
[*.{htm,html}]
indent_size = 2
[*.json]
indent_size=2
indent_size = 2