Update dotfiles 20230307

This commit is contained in:
Saci 2023-03-07 18:52:37 -03:00
parent a7ce8e4c37
commit 4599e6652d
30 changed files with 686 additions and 1148 deletions

8
bash/.bash_profile Normal file
View File

@ -0,0 +1,8 @@
#
# ~/.bash_profile
#
[[ -f ~/.bashrc ]] && . ~/.bashrc
PATH=$PATH:$HOME/.emacs.d/bin:$HOME/.local/bin
export PATH

104
bash/.bashrc Normal file
View File

@ -0,0 +1,104 @@
# Path to your oh-my-bash installation.
export OSH=/home/saci/.oh-my-bash
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-bash is loaded.
OSH_THEME="powerline-multiline"
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
# Uncomment the following line to use hyphen-insensitive completion. Case
# sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"
# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"
# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_OSH_DAYS=13
# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"
# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
# COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# HIST_STAMPS="mm/dd/yyyy"
# Would you like to use another custom folder than $OSH/custom?
# OSH_CUSTOM=/path/to/new-custom-folder
# Which completions would you like to load? (completions can be found in ~/.oh-my-bash/completions/*)
# Custom completions may be added to ~/.oh-my-bash/custom/completions/
# Example format: completions=(ssh git bundler gem pip pip3)
# Add wisely, as too many completions slow down shell startup.
completions=(
git
composer
ssh
)
# Which aliases would you like to load? (aliases can be found in ~/.oh-my-bash/aliases/*)
# Custom aliases may be added to ~/.oh-my-bash/custom/aliases/
# Example format: aliases=(vagrant composer git-avh)
# Add wisely, as too many aliases slow down shell startup.
aliases=(
general
dir
)
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-bash/plugins/*)
# Custom plugins may be added to ~/.oh-my-bash/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(
git
bashmarks
)
source $OSH/oh-my-bash.sh
# User configuration
# export MANPATH="/usr/local/man:$MANPATH"
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# ssh
# export SSH_KEY_PATH="~/.ssh/rsa_id"
# Set personal aliases, overriding those provided by oh-my-bash libs,
# plugins, and themes. Aliases can be placed here, though oh-my-bash
# users are encouraged to define aliases within the OSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias bashconfig="mate ~/.bashrc"
# alias ohmybash="mate ~/.oh-my-bash"
export PATH=$PATH:$HOME/.emacs.d/bin:$HOME/.local/bin

27
bash/.profile Normal file
View File

@ -0,0 +1,27 @@
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
PATH="$HOME/.local/bin:$PATH"
fi

View File

@ -1,502 +0,0 @@
#!/bin/sh
set -e
# Docker CE for Linux installation script
#
# See https://docs.docker.com/install/ for the installation steps.
#
# This script is meant for quick & easy install via:
# $ curl -fsSL https://get.docker.com -o get-docker.sh
# $ sh get-docker.sh
#
# For test builds (ie. release candidates):
# $ curl -fsSL https://test.docker.com -o test-docker.sh
# $ sh test-docker.sh
#
# NOTE: Make sure to verify the contents of the script
# you downloaded matches the contents of install.sh
# located at https://github.com/docker/docker-install
# before executing.
#
# Git commit from https://github.com/docker/docker-install when
# the script was uploaded (Should only be modified by upload job):
SCRIPT_COMMIT_SHA="26ff363bcf3b3f5a00498ac43694bf1c7d9ce16c"
# The channel to install from:
# * nightly
# * test
# * stable
# * edge (deprecated)
DEFAULT_CHANNEL_VALUE="stable"
if [ -z "$CHANNEL" ]; then
CHANNEL=$DEFAULT_CHANNEL_VALUE
fi
DEFAULT_DOWNLOAD_URL="https://download.docker.com"
if [ -z "$DOWNLOAD_URL" ]; then
DOWNLOAD_URL=$DEFAULT_DOWNLOAD_URL
fi
DEFAULT_REPO_FILE="docker-ce.repo"
if [ -z "$REPO_FILE" ]; then
REPO_FILE="$DEFAULT_REPO_FILE"
fi
mirror=''
DRY_RUN=${DRY_RUN:-}
while [ $# -gt 0 ]; do
case "$1" in
--mirror)
mirror="$2"
shift
;;
--dry-run)
DRY_RUN=1
;;
--*)
echo "Illegal option $1"
;;
esac
shift $(( $# > 0 ? 1 : 0 ))
done
case "$mirror" in
Aliyun)
DOWNLOAD_URL="https://mirrors.aliyun.com/docker-ce"
;;
AzureChinaCloud)
DOWNLOAD_URL="https://mirror.azure.cn/docker-ce"
;;
esac
command_exists() {
command -v "$@" > /dev/null 2>&1
}
is_dry_run() {
if [ -z "$DRY_RUN" ]; then
return 1
else
return 0
fi
}
is_wsl() {
case "$(uname -r)" in
*microsoft* ) true ;; # WSL 2
*Microsoft* ) true ;; # WSL 1
* ) false;;
esac
}
is_darwin() {
case "$(uname -s)" in
*darwin* ) true ;;
*Darwin* ) true ;;
* ) false;;
esac
}
deprecation_notice() {
distro=$1
date=$2
echo
echo "DEPRECATION WARNING:"
echo " The distribution, $distro, will no longer be supported in this script as of $date."
echo " If you feel this is a mistake please submit an issue at https://github.com/docker/docker-install/issues/new"
echo
sleep 10
}
get_distribution() {
lsb_dist=""
# Every system that we officially support has /etc/os-release
if [ -r /etc/os-release ]; then
lsb_dist="$(. /etc/os-release && echo "$ID")"
fi
# Returning an empty string here should be alright since the
# case statements don't act unless you provide an actual value
echo "$lsb_dist"
}
add_debian_backport_repo() {
debian_version="$1"
backports="deb http://ftp.debian.org/debian $debian_version-backports main"
if ! grep -Fxq "$backports" /etc/apt/sources.list; then
(set -x; $sh_c "echo \"$backports\" >> /etc/apt/sources.list")
fi
}
echo_docker_as_nonroot() {
if is_dry_run; then
return
fi
if command_exists docker && [ -e /var/run/docker.sock ]; then
(
set -x
$sh_c 'docker version'
) || true
fi
your_user=your-user
[ "$user" != 'root' ] && your_user="$user"
# intentionally mixed spaces and tabs here -- tabs are stripped by "<<-EOF", spaces are kept in the output
echo "If you would like to use Docker as a non-root user, you should now consider"
echo "adding your user to the \"docker\" group with something like:"
echo
echo " sudo usermod -aG docker $your_user"
echo
echo "Remember that you will have to log out and back in for this to take effect!"
echo
echo "WARNING: Adding a user to the \"docker\" group will grant the ability to run"
echo " containers which can be used to obtain root privileges on the"
echo " docker host."
echo " Refer to https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface"
echo " for more information."
}
# Check if this is a forked Linux distro
check_forked() {
# Check for lsb_release command existence, it usually exists in forked distros
if command_exists lsb_release; then
# Check if the `-u` option is supported
set +e
lsb_release -a -u > /dev/null 2>&1
lsb_release_exit_code=$?
set -e
# Check if the command has exited successfully, it means we're in a forked distro
if [ "$lsb_release_exit_code" = "0" ]; then
# Print info about current distro
cat <<-EOF
You're using '$lsb_dist' version '$dist_version'.
EOF
# Get the upstream release info
lsb_dist=$(lsb_release -a -u 2>&1 | tr '[:upper:]' '[:lower:]' | grep -E 'id' | cut -d ':' -f 2 | tr -d '[:space:]')
dist_version=$(lsb_release -a -u 2>&1 | tr '[:upper:]' '[:lower:]' | grep -E 'codename' | cut -d ':' -f 2 | tr -d '[:space:]')
# Print info about upstream distro
cat <<-EOF
Upstream release is '$lsb_dist' version '$dist_version'.
EOF
else
if [ -r /etc/debian_version ] && [ "$lsb_dist" != "ubuntu" ] && [ "$lsb_dist" != "raspbian" ]; then
if [ "$lsb_dist" = "osmc" ]; then
# OSMC runs Raspbian
lsb_dist=raspbian
else
# We're Debian and don't even know it!
lsb_dist=debian
fi
dist_version="$(sed 's/\/.*//' /etc/debian_version | sed 's/\..*//')"
case "$dist_version" in
10)
dist_version="buster"
;;
9)
dist_version="stretch"
;;
8|'Kali Linux 2')
dist_version="jessie"
;;
esac
fi
fi
fi
}
semverParse() {
major="${1%%.*}"
minor="${1#$major.}"
minor="${minor%%.*}"
patch="${1#$major.$minor.}"
patch="${patch%%[-.]*}"
}
do_install() {
echo "# Executing docker install script, commit: $SCRIPT_COMMIT_SHA"
if command_exists docker; then
docker_version="$(docker -v | cut -d ' ' -f3 | cut -d ',' -f1)"
MAJOR_W=1
MINOR_W=10
semverParse "$docker_version"
shouldWarn=0
if [ "$major" -lt "$MAJOR_W" ]; then
shouldWarn=1
fi
if [ "$major" -le "$MAJOR_W" ] && [ "$minor" -lt "$MINOR_W" ]; then
shouldWarn=1
fi
cat >&2 <<-'EOF'
Warning: the "docker" command appears to already exist on this system.
If you already have Docker installed, this script can cause trouble, which is
why we're displaying this warning and provide the opportunity to cancel the
installation.
If you installed the current Docker package using this script and are using it
EOF
if [ $shouldWarn -eq 1 ]; then
cat >&2 <<-'EOF'
again to update Docker, we urge you to migrate your image store before upgrading
to v1.10+.
You can find instructions for this here:
https://github.com/docker/docker/wiki/Engine-v1.10.0-content-addressability-migration
EOF
else
cat >&2 <<-'EOF'
again to update Docker, you can safely ignore this message.
EOF
fi
cat >&2 <<-'EOF'
You may press Ctrl+C now to abort this script.
EOF
( set -x; sleep 20 )
fi
user="$(id -un 2>/dev/null || true)"
sh_c='sh -c'
if [ "$user" != 'root' ]; then
if command_exists sudo; then
sh_c='sudo -E sh -c'
elif command_exists su; then
sh_c='su -c'
else
cat >&2 <<-'EOF'
Error: this installer needs the ability to run commands as root.
We are unable to find either "sudo" or "su" available to make this happen.
EOF
exit 1
fi
fi
if is_dry_run; then
sh_c="echo"
fi
# perform some very rudimentary platform detection
lsb_dist=$( get_distribution )
lsb_dist="$(echo "$lsb_dist" | tr '[:upper:]' '[:lower:]')"
if is_wsl; then
echo
echo "WSL DETECTED: We recommend using Docker Desktop for Windows."
echo "Please get Docker Desktop from https://www.docker.com/products/docker-desktop"
echo
cat >&2 <<-'EOF'
You may press Ctrl+C now to abort this script.
EOF
( set -x; sleep 20 )
fi
case "$lsb_dist" in
ubuntu)
if command_exists lsb_release; then
dist_version="$(lsb_release --codename | cut -f2)"
fi
if [ -z "$dist_version" ] && [ -r /etc/lsb-release ]; then
dist_version="$(. /etc/lsb-release && echo "$DISTRIB_CODENAME")"
fi
;;
debian|raspbian)
dist_version="$(sed 's/\/.*//' /etc/debian_version | sed 's/\..*//')"
case "$dist_version" in
10)
dist_version="buster"
;;
9)
dist_version="stretch"
;;
8)
dist_version="jessie"
;;
esac
;;
centos|rhel)
if [ -z "$dist_version" ] && [ -r /etc/os-release ]; then
dist_version="$(. /etc/os-release && echo "$VERSION_ID")"
fi
;;
*)
if command_exists lsb_release; then
dist_version="$(lsb_release --release | cut -f2)"
fi
if [ -z "$dist_version" ] && [ -r /etc/os-release ]; then
dist_version="$(. /etc/os-release && echo "$VERSION_ID")"
fi
;;
esac
# Check if this is a forked Linux distro
check_forked
# Run setup for each distro accordingly
case "$lsb_dist" in
ubuntu|debian|raspbian)
pre_reqs="apt-transport-https ca-certificates curl"
if [ "$lsb_dist" = "debian" ]; then
# libseccomp2 does not exist for debian jessie main repos for aarch64
if [ "$(uname -m)" = "aarch64" ] && [ "$dist_version" = "jessie" ]; then
add_debian_backport_repo "$dist_version"
fi
fi
if ! command -v gpg > /dev/null; then
pre_reqs="$pre_reqs gnupg"
fi
apt_repo="deb [arch=$(dpkg --print-architecture)] $DOWNLOAD_URL/linux/$lsb_dist $dist_version $CHANNEL"
(
if ! is_dry_run; then
set -x
fi
$sh_c 'apt-get update -qq >/dev/null'
$sh_c "DEBIAN_FRONTEND=noninteractive apt-get install -y -qq $pre_reqs >/dev/null"
$sh_c "curl -fsSL \"$DOWNLOAD_URL/linux/$lsb_dist/gpg\" | apt-key add -qq - >/dev/null"
$sh_c "echo \"$apt_repo\" > /etc/apt/sources.list.d/docker.list"
$sh_c 'apt-get update -qq >/dev/null'
)
pkg_version=""
if [ -n "$VERSION" ]; then
if is_dry_run; then
echo "# WARNING: VERSION pinning is not supported in DRY_RUN"
else
# Will work for incomplete versions IE (17.12), but may not actually grab the "latest" if in the test channel
pkg_pattern="$(echo "$VERSION" | sed "s/-ce-/~ce~.*/g" | sed "s/-/.*/g").*-0~$lsb_dist"
search_command="apt-cache madison 'docker-ce' | grep '$pkg_pattern' | head -1 | awk '{\$1=\$1};1' | cut -d' ' -f 3"
pkg_version="$($sh_c "$search_command")"
echo "INFO: Searching repository for VERSION '$VERSION'"
echo "INFO: $search_command"
if [ -z "$pkg_version" ]; then
echo
echo "ERROR: '$VERSION' not found amongst apt-cache madison results"
echo
exit 1
fi
search_command="apt-cache madison 'docker-ce-cli' | grep '$pkg_pattern' | head -1 | awk '{\$1=\$1};1' | cut -d' ' -f 3"
# Don't insert an = for cli_pkg_version, we'll just include it later
cli_pkg_version="$($sh_c "$search_command")"
pkg_version="=$pkg_version"
fi
fi
(
if ! is_dry_run; then
set -x
fi
if [ -n "$cli_pkg_version" ]; then
$sh_c "apt-get install -y -qq --no-install-recommends docker-ce-cli=$cli_pkg_version >/dev/null"
fi
$sh_c "apt-get install -y -qq --no-install-recommends docker-ce$pkg_version >/dev/null"
)
echo_docker_as_nonroot
exit 0
;;
centos|fedora|rhel)
yum_repo="$DOWNLOAD_URL/linux/$lsb_dist/$REPO_FILE"
if ! curl -Ifs "$yum_repo" > /dev/null; then
echo "Error: Unable to curl repository file $yum_repo, is it valid?"
exit 1
fi
if [ "$lsb_dist" = "fedora" ]; then
pkg_manager="dnf"
config_manager="dnf config-manager"
enable_channel_flag="--set-enabled"
disable_channel_flag="--set-disabled"
pre_reqs="dnf-plugins-core"
pkg_suffix="fc$dist_version"
else
pkg_manager="yum"
config_manager="yum-config-manager"
enable_channel_flag="--enable"
disable_channel_flag="--disable"
pre_reqs="yum-utils"
pkg_suffix="el"
fi
(
if ! is_dry_run; then
set -x
fi
$sh_c "$pkg_manager install -y -q $pre_reqs"
$sh_c "$config_manager --add-repo $yum_repo"
if [ "$CHANNEL" != "stable" ]; then
$sh_c "$config_manager $disable_channel_flag docker-ce-*"
$sh_c "$config_manager $enable_channel_flag docker-ce-$CHANNEL"
fi
$sh_c "$pkg_manager makecache"
)
pkg_version=""
if [ -n "$VERSION" ]; then
if is_dry_run; then
echo "# WARNING: VERSION pinning is not supported in DRY_RUN"
else
pkg_pattern="$(echo "$VERSION" | sed "s/-ce-/\\\\.ce.*/g" | sed "s/-/.*/g").*$pkg_suffix"
search_command="$pkg_manager list --showduplicates 'docker-ce' | grep '$pkg_pattern' | tail -1 | awk '{print \$2}'"
pkg_version="$($sh_c "$search_command")"
echo "INFO: Searching repository for VERSION '$VERSION'"
echo "INFO: $search_command"
if [ -z "$pkg_version" ]; then
echo
echo "ERROR: '$VERSION' not found amongst $pkg_manager list results"
echo
exit 1
fi
search_command="$pkg_manager list --showduplicates 'docker-ce-cli' | grep '$pkg_pattern' | tail -1 | awk '{print \$2}'"
# It's okay for cli_pkg_version to be blank, since older versions don't support a cli package
cli_pkg_version="$($sh_c "$search_command" | cut -d':' -f 2)"
# Cut out the epoch and prefix with a '-'
pkg_version="-$(echo "$pkg_version" | cut -d':' -f 2)"
fi
fi
(
if ! is_dry_run; then
set -x
fi
# install the correct cli version first
if [ -n "$cli_pkg_version" ]; then
$sh_c "$pkg_manager install -y -q docker-ce-cli-$cli_pkg_version"
fi
$sh_c "$pkg_manager install -y -q docker-ce$pkg_version"
)
echo_docker_as_nonroot
exit 0
;;
*)
if [ -z "$lsb_dist" ]; then
if is_darwin; then
echo
echo "ERROR: Unsupported operating system 'macOS'"
echo "Please get Docker Desktop from https://www.docker.com/products/docker-desktop"
echo
exit 1
fi
fi
echo
echo "ERROR: Unsupported distribution '$lsb_dist'"
echo
exit 1
;;
esac
exit 1
}
# wrapped up in a function so that we have some protection against only getting
# half the file during "curl | sh"
do_install

1
emacs/custom.el Normal file
View File

@ -0,0 +1 @@
(put 'customize-variable 'disabled nil)

View File

@ -1,61 +0,0 @@
;; Emacs initialization file
;;;; Package Initialization
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(package-initialize)
(eval-when-compile
(require 'use-package))
(add-to-list 'load-path "~/.emacs.d/mpackages/")
(use-package pack-tools)
(use-package pack-appareance)
(use-package pack-keybindings)
(use-package pack-tweaks)
(use-package pack-org)
(use-package pack-projectile)
(use-package pack-py)
(add-to-list 'auto-mode-alist '("\\.epub\\'" . nov-mode))
;;; Org-calDav integration
;(setq org-caldav-url "https://cloud.disroot.org/remote.php/dav/calendars/saci")
;(setq org-caldav-calendar-id "sync_emacs")
;(setq org-caldav-inbox "/home/saci/Documentos/org/disroot.org")
;(setq org-caldav-files '("/home/saci/Documentos/org/pessoal.org"
; "/home/saci/Documentos/org/ec.org"
; "/home/saci/Documentos/org/radio.org"
; "/home/saci/Documentos/org/orcamento_arretado.org))
;(setq org-icalendar-timezone "UTC")
;(setq org-icalendar-include-todo t)
;;; SETs
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(blink-cursor-mode nil)
'(column-number-mode t)
'(custom-safe-themes
'("ca849ae0c889eb918785cdc75452b1e11a00848a5128a95a23872e0119ccc8f4" "fa3bdd59ea708164e7821574822ab82a3c51e262d419df941f26d64d015c90ee" "2f5034120826e047160aca97575c21e692e7ec7ec23c53d9832006fbeb7a91d8" "4daff0f7fb02c7a4d5766a6a3e0931474e7c4fd7da58687899485837d6943b78" "229c5cf9c9bd4012be621d271320036c69a14758f70e60385e87880b46d60780" "5a45c8bf60607dfa077b3e23edfb8df0f37c4759356682adf7ab762ba6b10600" "bdb4509c123230a059d89fc837c40defdecee8279c741b7f060196b343b2d18d" "ed17fef69db375ae1ced71fdc12e543448827aac5eb7166d2fd05f4c95a7be71" default))
'(menu-bar-mode nil)
'(org-agenda-files '("/home/saci/org/"))
'(package-install-selected-packages
'(elpy hide-mode-line org-caldav company powerline-evil centaur-tabs auctex evil org-bullets doom-themes doom-modeline all-the-icons dumb-jump dashboard magit use-package powerline neotree multiple-cursors))
'(package-selected-packages
'(jedi projectile nofrils-acme-theme ein nov pdf-tools helm-bibtex markdown-mode elpy use-package powerline-evil org-caldav org-bullets neotree multiple-cursors magit hide-mode-line dumb-jump doom-themes doom-modeline dashboard company centaur-tabs auctex))
'(scroll-bar-mode nil)
'(show-paren-mode t)
'(tool-bar-mode nil))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)

View File

@ -1,59 +0,0 @@
;;; This is a minimal emacs configuration that I use with
;;; `emacs -nw -Q --load minimal.el' when I want to quickly edit something in
;;; the terminal without having to load all my configs, but still want some
;;; keybindings and stuff
(custom-set-variables
'(custom-enabled-themes (quote (wombat)))
'(blink-cursor-mode nil)
'(scroll-bar-mode nil)
'(show-paren-mode t)
'(tool-bar-mode nil))
(set-face-attribute 'default nil
:height 105)
;; disable backup
(setq backup-inhibited t)
;; disable auto save
(setq auto-save-default nil)
;; scrolling line by line
(setq scroll-conservatively 1)
;; no startup
(setq inhibit-startup-screen t)
;; dired wont open a buffer for each directory
(require 'dired)
(put 'dired-find-alternate-file 'disabled nil)
(define-key dired-mode-map (kbd "RET") 'dired-find-alternate-file)
;; default coding style
(setq c-default-style "k&r"
c-basic-offset 4)
;; highlight trailing and tabs that are not spaces
(setq whitespace-style '(face tabs tab-mark lines-tail trailing))
(setq whitespace-display-mappings '((tab-mark 9 [126 9])))
(global-whitespace-mode)
;; moving arround
(defun move-line-up () "Move up the current line" (interactive)
(transpose-lines 1) (forward-line -2) (indent-according-to-mode))
(defun move-line-down () "Move down the current line" (interactive)
(forward-line 1) (transpose-lines 1) (forward-line -1)
(indent-according-to-mode))
(global-set-key [(meta up)] 'move-line-up)
(global-set-key [(meta down)] 'move-line-down)
(global-set-key (kbd "<s-up>") 'windmove-up)
(global-set-key (kbd "<s-down>") 'windmove-down)
(global-set-key (kbd "<s-left>") 'windmove-left)
(global-set-key (kbd "<s-right>") 'windmove-right)
(global-set-key (kbd "<C-s-right>") 'next-buffer)
(global-set-key (kbd "<C-s-left>") 'previous-buffer)

View File

@ -1,25 +0,0 @@
* Packages
The packages I use come mainly from Guix. When it is not available there I use
it from Melpa.
** Guix Packages
+ emacs-all-the-icons
+ emacs-htmlize
+ emacs-markdown-mode
+ emacs-magit
+ emacs-neotree
+ emacs-org
+ emacs-origami-el
+ emacs-dashboard
+ emacs-company
+ emacs-use-package
+ emacs-dumb-jump
+ emacs-ag
+ the-silver-searcher
** Melpa
+ doom-themes
+ doom-modeline
+ org-bullets
+ evil
+ auctex

View File

@ -1,64 +0,0 @@
;;; Appareance package'
;; is this the best way to do this?
(custom-set-variables
'(blink-cursor-mode nil)
'(column-number-mode t)
'(menu-bar-mode nil)
'(scroll-bar-mode nil)
'(show-paren-mode t)
'(tool-bar-mode nil)
)
(set-face-attribute 'default nil
:family "Source Code Pro"
:foundry "ADBO"
:height 112
:slant 'normal
:weight 'normal
:width 'normal)
(use-package all-the-icons)
(use-package doom-modeline
:config
(doom-modeline-mode 1))
(use-package doom-themes
:config
(load-theme 'doom-dracula t)
(doom-themes-org-config))
(use-package hide-mode-line
:hook
((neotree-mode shell-mode) . hide-mode-line-mode))
(use-package display-line-numbers
:hook
(prog-mode . display-line-numbers-mode))
(use-package centaur-tabs
:hook
((dired-mode
shell-mode
neotree-mode
org-agenda-mode
dashboard-mode
messages-buffer-mode)
. centaur-tabs-local-mode)
(after-init . centaur-tabs-mode)
:config
(setq centaur-tabs-style "bar")
(setq centaur-tabs-height 35)
(setq centaur-tabs-set-icons t)
(setq centaur-tabs-set-bar 'under)
(setq x-underline-at-descent-line t)
(setq centaur-tabs-cycle-scope 'tabs))
;; highlight trailing and tabs that are not spaces
(setq whitespace-style '(face tabs tab-mark lines-tail trailing)
whitespace-display-mappings '((tab-mark 9 [126 9])))
(global-whitespace-mode)
(provide 'pack-appareance)

View File

@ -1,65 +0,0 @@
;;; My personal keybindings
(defun move-line-up () "Move up the current line" (interactive)
(transpose-lines 1) (forward-line -2) (indent-according-to-mode))
(defun move-line-down () "Move down the current line" (interactive)
(forward-line 1) (transpose-lines 1) (forward-line -1)
(indent-according-to-mode))
(global-set-key (kbd "M-p") 'move-line-up)
(global-set-key (kbd "M-n") 'move-line-down)
(global-set-key (kbd "C-x g") 'magit-status)
(global-set-key (kbd "C-c t") 'neotree-toggle)
;; all of my "personal" keybindings for calling packages start with C-=
(global-set-key (kbd "C-= c") 'company-mode)
(global-set-key (kbd "C-= r") 'revert-buffer)
(global-set-key (kbd "C-= s") 'flyspell-mode)
(global-set-key (kbd "C-= d") 'ispell-change-dictionary)
(global-set-key (kbd "C-= a") 'org-agenda)
(global-set-key (kbd "C-= l") 'org-store-link)
(global-set-key (kbd "C-= o") 'origami-mode)
(global-set-key (kbd "C-= C-l") 'org-toggle-link-display)
(global-set-key (kbd "C-= C-o r") 'origami-close-all-nodes)
(global-set-key (kbd "C-= C-o m") 'origami-open-all-nodes)
(global-set-key (kbd "C-= C-o c") 'origami-close-node-recursively)
(global-set-key (kbd "C-= C-o o") 'origami-open-node-recursively)
(global-set-key (kbd "C-= C-o C-o") 'origami-open-node)
(global-set-key (kbd "C-= t") 'centaur-tabs-local-mode)
(global-set-key (kbd "C-= C-m r") 'mc/mark-all-like-this)
(global-set-key (kbd "C-s-<mouse-1>") 'mc/add-cursor-on-click)
(global-set-key (kbd "C-s-p") 'mc/mark-previous-like-this)
(global-set-key (kbd "C-s-n") 'mc/mark-next-like-this)
;; moving arround
;;;; windows
(global-set-key (kbd "<s-up>") 'windmove-up)
(global-set-key (kbd "<s-down>") 'windmove-down)
(global-set-key (kbd "<s-left>") 'windmove-left)
(global-set-key (kbd "<s-right>") 'windmove-right)
;;;; buffer
(global-set-key (kbd "<C-s-right>") 'next-buffer)
(global-set-key (kbd "<C-s-left>") 'previous-buffer)
;;;; Tabs
(global-set-key (kbd "M-s-b")
'centaur-tabs-move-current-tab-to-left)
(global-set-key (kbd "M-s-f")
'centaur-tabs-move-current-tab-to-right)
(global-set-key (kbd "C-s-b")
'centaur-tabs-backward)
(global-set-key (kbd "C-s-f")
'centaur-tabs-forward)
;;;; Python
(global-set-key (kbd "M-;")
'elpy-goto-assignment)
(global-set-key (kbd "C-n")
'elpy-nav-forward-block)
(global-set-key (kbd "C-p")
'elpy-nav-backward-block)
(provide 'pack-keybindings)

View File

@ -1,41 +0,0 @@
;;; Org Configuration
(require 'org)
(require 'ox-md)
(require 'ox-beamer)
(require 'ox-latex)
(require 'org-bullets)
;;;; bullets customization
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
(setq org-bullets-bullet-list '("" "" "" ""))
;;;; agenda
(setq org-src-tab-acts-natively t)
(setq org-agenda-start-on-weekday 0)
(setq org-agenda-include-deadlines nil)
(setq org-log-done t)
(setq org-todo-keywords
'((sequence "TODO(t)" "PROX(p)" "ABERTO(a)" "ESPERANDO(e)" "|" "FEITO(f)" "CANCELADO(c)")))
(setq org-agenda-files '("~/org/"))
;;;; pdf exporting
;; open mupdf when exporting to pdf
(add-hook 'org-mode-hook
'(lambda ()
(delete '("\\.pdf\\'" . default) org-file-apps)
(add-to-list 'org-file-apps
'("\\.pdf\\'" . "mupdf-gl -B 282C34 -C C4CCDB %s"))))
;; use minted code highlighting
(setq org-latex-listings 'minted
org-latex-packages-alist '(("" "minted"))
org-latex-minted-options '(("breaklines" "true")
("breakanywhere" "true")
("linenos" "true"))
org-latex-pdf-process
'("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
"pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"))
(provide 'pack-org)

View File

@ -1,14 +0,0 @@
(require 'projectile)
(projectile-mode +1)
(define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map)
(setq projectile-project-search-path '(
"~/hd/projetos/"
"~/hd/aprender/"
))
(setq projectile-sort-order 'recently-active)
(setq projectile-indexing-method 'alien)
(provide 'pack-projectile)

View File

@ -1,12 +0,0 @@
;;; Configuração para transformar EMACS num SDK de Python
(use-package elpy
:ensure t
:init
(elpy-enable))
(add-hook 'python-mode-hook 'jedi:setup)
(setq jedi:complete-on-dot t)
(provide 'pack-py)

View File

@ -1,50 +0,0 @@
;;; Tools package
(use-package multiple-cursors)
(use-package magit)
(use-package dashboard
:config
(dashboard-setup-startup-hook)
(setq dashboard-startup-banner 'logo
show-week-agenda-p t
dashboard-center-content t
dashboard-set-heading-icons t
dashboard-set-file-icons t
dashboard-items '(
(projects . 5)
(agenda . 5)
;; (recents . 5)
)))
(use-package dired
:config
(put 'dired-find-alternate-file 'disabled nil)
:bind
;; dired wont open a buffer for each directory
(:map dired-mode-map
("RET" . dired-find-alternate-file)))
(use-package dumb-jump
:config
(dumb-jump-mode))
(use-package neotree
:config
(setq neo-theme 'icons)
(setq neo-autorefresh t)
(setq neo-window-fixed-size nil))
(use-package company
:hook
(after-init . global-company-mode))
(use-package auctex
:config
(font-latex-fontify-script nil)
:hook
(LaTeX-mode . LaTeX-math-mode))
(provide 'pack-tools)

View File

@ -1,27 +0,0 @@
;;; Simple tweaks
;; disable backup
(setq backup-inhibited t)
;; disable auto save
(setq auto-save-default nil)
;; scrolling line by line
(setq scroll-conservatively 1)
;; no startup
(setq inhibit-startup-screen t)
;; tabs are evil
(setq-default indent-tabs-mode nil)
;; tex quick view
(setq TeX-view-program-list
'(("Evince" "~/.local/bin/mupdf-gl -B 282C34 -C C4CCDB %o")))
;; default coding style
(setq c-default-style "k&r"
c-basic-offset 4)
(provide 'pack-tweaks)

188
emacs/init.el Normal file
View File

@ -0,0 +1,188 @@
;;; init.el -*- lexical-binding: t; -*-
;; This file controls what Doom modules are enabled and what order they load
;; in. Remember to run 'doom sync' after modifying it!
;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's
;; documentation. There you'll find a "Module Index" link where you'll find
;; a comprehensive list of Doom's modules and what flags they support.
;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or
;; 'C-c c k' for non-vim users) to view its documentation. This works on
;; flags as well (those symbols that start with a plus).
;;
;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its
;; directory (for easy access to its source code).
(doom! :input
;;chinese
;;japanese
;;layout ; auie,ctsrnm is the superior home row
:completion
company ; the ultimate code completion backend
;;helm ; the *other* search engine for love and life
;;ido ; the other *other* search engine...
ivy ; a search engine for love and life
:ui
;;deft ; notational velocity for Emacs
doom ; what makes DOOM look the way it does
doom-dashboard ; a nifty splash screen for Emacs
doom-quit ; DOOM quit-message prompts when you quit Emacs
;;(emoji +unicode) ; 🙂
;;fill-column ; a `fill-column' indicator
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
;;hydra
;;indent-guides ; highlighted indent columns
;;ligatures ; ligatures and symbols to make your code pretty again
;;minimap ; show a map of the code on the side
modeline ; snazzy, Atom-inspired modeline, plus API
;;nav-flash ; blink cursor line after big motions
;;neotree ; a project drawer, like NERDTree for vim
ophints ; highlight the region an operation acts on
(popup +defaults) ; tame sudden yet inevitable temporary windows
tabs ; a tab bar for Emacs
treemacs ; a project drawer, like neotree but cooler
;;unicode ; extended unicode support for various languages
vc-gutter ; vcs diff in the fringe
vi-tilde-fringe ; fringe tildes to mark beyond EOB
;;window-select ; visually switch windows
workspaces ; tab emulation, persistence & separate workspaces
;;zen ; distraction-free coding or writing
:editor
;;(evil +everywhere); come to the dark side, we have cookies
file-templates ; auto-snippets for empty files
fold ; (nigh) universal code folding
(format +onsave) ; automated prettiness
;;god ; run Emacs commands without modifier keys
;;lispy ; vim for lisp, for people who don't like vim
multiple-cursors ; editing in many places at once
;;objed ; text object editing for the innocent
;;parinfer ; turn lisp into python, sort of
;;rotate-text ; cycle region at point between text candidates
snippets ; my elves. They type so I don't have to
;;word-wrap ; soft wrapping with language-aware indent
:emacs
dired ; making dired pretty [functional]
electric ; smarter, keyword-based electric-indent
;;ibuffer ; interactive buffer management
undo ; persistent, smarter undo for your inevitable mistakes
vc ; version-control and Emacs, sitting in a tree
:term
;;eshell ; the elisp shell that works everywhere
;;shell ; simple shell REPL for Emacs
;;term ; basic terminal emulator for Emacs
;;vterm ; the best terminal emulation in Emacs
:checkers
syntax ; tasing you for every semicolon you forget
(spell +flyspell) ; tasing you for misspelling mispelling
grammar ; tasing grammar mistake every you make
:tools
;;ansible
;;debugger ; FIXME stepping through code, to help you add bugs
;;direnv
;;docker
;;editorconfig ; let someone else argue about tabs vs spaces
ein ; tame Jupyter notebooks with emacs
(eval +overlay) ; run code, run (also, repls)
;;gist ; interacting with github gists
lookup ; navigate your code and its documentation
lsp
magit ; a git porcelain for Emacs
;;make ; run make tasks from Emacs
;;pass ; password manager for nerds
pdf ; pdf enhancements
;;prodigy ; FIXME managing external services & code builders
;;rgb ; creating color strings
;;taskrunner ; taskrunner for all your projects
;;terraform ; infrastructure as code
;;tmux ; an API for interacting with tmux
;;upload ; map local to remote projects via ssh/ftp
:os
(:if IS-MAC macos) ; improve compatibility with macOS
;;tty ; improve the terminal Emacs experience
:lang
;;agda ; types of types of types of types...
;;beancount ; mind the GAAP
;;cc ; C > C++ == 1
;;clojure ; java with a lisp
;;common-lisp ; if you've seen one lisp, you've seen them all
;;coq ; proofs-as-programs
;;crystal ; ruby at the speed of c
;;csharp ; unity, .NET, and mono shenanigans
;;data ; config/data formats
;;(dart +flutter) ; paint ui and not much else
;;elixir ; erlang done right
;;elm ; care for a cup of TEA?
emacs-lisp ; drown in parentheses
;;erlang ; an elegant language for a more civilized age
;;ess ; emacs speaks statistics
;;factor
;;faust ; dsp, but you get to keep your soul
;;fsharp ; ML stands for Microsoft's Language
;;fstar ; (dependent) types and (monadic) effects and Z3
;;gdscript ; the language you waited for
;;(go +lsp) ; the hipster dialect
;;(haskell +dante) ; a language that's lazier than I am
;;hy ; readability of scheme w/ speed of python
;;idris ; a language you can depend on
;;json ; At least it ain't XML
;;(java +meghanada) ; the poster child for carpal tunnel syndrome
;;javascript ; all(hope(abandon(ye(who(enter(here))))))
;;julia ; a better, faster MATLAB
;;kotlin ; a better, slicker Java(Script)
(latex +pdf-tools +lsp) ; writing papers in Emacs has never been so fun
;;lean ; for folks with too much to prove
;;ledger ; be audit you can be
;;lua ; one-based indices? one-based indices
markdown ; writing docs for people to ignore
;;nim ; python + lisp at the speed of c
;;nix ; I hereby declare "nix geht mehr!"
;;ocaml ; an objective camel
(org +pomodoro) ; organize your plain life in plain text
;;php ; perl's insecure younger brother
;;plantuml ; diagrams for confusing people more
;;purescript ; javascript, but functional
(python +poetry +lsp) ; beautiful is better than ugly
;;qt ; the 'cutest' gui framework ever
;;racket ; a DSL for DSLs
;;raku ; the artist formerly known as perl6
;;rest ; Emacs as a REST client
;;rst ; ReST in peace
;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
(scala +lsp) ; java, but good
;;(scheme +guile) ; a fully conniving family of lisps
sh ; she sells {ba,z,fi}sh shells on the C xor
;;sml
;;solidity ; do you need a blockchain? No.
;;swift ; who asked for emoji variables?
;;terra ; Earth and Moon in alignment for performance.
;;web ; the tubes
yaml ; JSON, but readable
;;zig ; C, but simpler
:email
;;(mu4e +gmail)
;;notmuch
;;(wanderlust +gmail)
:app
;;calendar
;;emms
;;everywhere ; *leave* Emacs!? You must be joking
;;irc ; how neckbeards socialize
;;(rss +org) ; emacs as an RSS reader
;;twitter ; twitter client https://twitter.com/vnought
:config
;;literate
(default +bindings +smartparens))

70
emacs/packages.el Normal file
View File

@ -0,0 +1,70 @@
;; -*- no-byte-compile: t; -*-
;;; $DOOMDIR/packages.el
;; To install a package with Doom you must declare them here and run 'doom sync'
;; on the command line, then restart Emacs for the changes to take effect -- or
;; use 'M-x doom/reload'.
;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror:
;(package! some-package)
(package! flymake-shellcheck)
(package! markdown-mode)
(package! markdown-preview-mode)
(package! elpy)
(package! auctex)
(package! lsp-python-ms :disable t)
(package! gitlab-ci-mode)
(package! forge)
;; Py LSP plugins
;; (package! flycheck-mypy)
;; (package! flymake-python-pyflakes)
;; pyls-flake8: Error checking using flake8. - N
;; mypy-ls: MyPy type checking for Python 3. - flycheck-mypy
;; pyls-isort: code formatting using isort (automatic import sorting) - N ?flymake-python-pyflakes?
;; python-lsp-black: code formatting using Black.
;; pyls-memestra: detecting the use of deprecated APIs.
;; To install a package directly from a remote git repo, you must specify a
;; `:recipe'. You'll find documentation on what `:recipe' accepts here:
;; https://github.com/raxod502/straight.el#the-recipe-format
;(package! another-package
; :recipe (:host github :repo "username/repo"))
;; If the package you are trying to install does not contain a PACKAGENAME.el
;; file, or is located in a subdirectory of the repo, you'll need to specify
;; `:files' in the `:recipe':
;(package! this-package
; :recipe (:host github :repo "username/repo"
; :files ("some-file.el" "src/lisp/*.el")))
;; If you'd like to disable a package included with Doom, you can do so here
;; with the `:disable' property:
;(package! builtin-package :disable t)
;; You can override the recipe of a built in package without having to specify
;; all the properties for `:recipe'. These will inherit the rest of its recipe
;; from Doom or MELPA/ELPA/Emacsmirror:
;(package! builtin-package :recipe (:nonrecursive t))
;(package! builtin-package-2 :recipe (:repo "myfork/package"))
;; Specify a `:branch' to install a package from a particular branch or tag.
;; This is required for some packages whose default branch isn't 'master' (which
;; our package manager can't deal with; see raxod502/straight.el#279)
;(package! builtin-package :recipe (:branch "develop"))
;; Use `:pin' to specify a particular commit to install.
;(package! builtin-package :pin "1a2b3c4d5e")
;; Doom's packages are pinned to a specific commit and updated from release to
;; release. The `unpin!' macro allows you to unpin single packages...
;(unpin! pinned-package)
;; ...or multiple packages
;(unpin! pinned-package another-pinned-package)
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
;(unpin! t)

5
git/.gitconfig Normal file
View File

@ -0,0 +1,5 @@
[user]
name = Saci
email = saciperere@riseup.net
[init]
defaultBranch = raiz

246
i3/i3/config Normal file
View File

@ -0,0 +1,246 @@
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod4
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:monospace 9
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8
# The combination of xss-lock, nm-applet and pactl is a popular choice, so
# they are included here as an example. Modify as you see fit.
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
# screen before suspend. Use loginctl lock-session to lock your screen.
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
# NetworkManager is the most popular way to manage wireless networks on Linux,
# and nm-applet is a desktop environment-independent system tray GUI for it.
exec --no-startup-id nm-applet
exec --no-startup-id xfce4-power-manager
exec nextcloud
exec --no-startup-id bash .screenlayout/notebook-hdmi.sh
workspace 1 output eDP-1
workspace 2 output HDMI-1
workspace 3 output HDMI-1
# Use pactl to adjust volume in PulseAudio.
set $refresh_i3status killall -SIGUSR1 i3status
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
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 Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
bindsym $mod+Return exec i3-sensible-terminal
# kill focused window
bindsym $mod+Shift+q kill
# start dmenu (a program launcher)
# bindsym $mod+d exec --no-startup-id dmenu_run
bindsym $mod+d exec "rofi -modi drun,run -show drun"
# A more modern dmenu replacement is rofi:
# bindcode $mod+40 exec "rofi -modi drun,run -show drun"
# There also is i3-dmenu-desktop which only displays applications shipping a
# .desktop file. It is a wrapper around dmenu, so you need that installed.
# bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop
# change focus
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+ccedilla focus right
# alternatively, you can use the cursor keys:
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# move focused window
bindsym $mod+Shift+j move left
bindsym $mod+Shift+k move down
bindsym $mod+Shift+l move up
bindsym $mod+Shift+ccedilla move right
# alternatively, you can use the cursor keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# split in horizontal orientation
bindsym $mod+h split h
# split in vertical orientation
bindsym $mod+v split v
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# toggle tiling / floating
bindsym $mod+Shift+space floating toggle
# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle
# focus the parent container
bindsym $mod+a focus parent
# focus the child container
#bindsym $mod+d 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"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
set $ws10 "10"
# switch to workspace
bindsym $mod+1 workspace number $ws1
bindsym $mod+2 workspace number $ws2
bindsym $mod+3 workspace number $ws3
bindsym $mod+4 workspace number $ws4
bindsym $mod+5 workspace number $ws5
bindsym $mod+6 workspace number $ws6
bindsym $mod+7 workspace number $ws7
bindsym $mod+8 workspace number $ws8
bindsym $mod+9 workspace number $ws9
bindsym $mod+0 workspace number $ws10
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number $ws1
bindsym $mod+Shift+2 move container to workspace number $ws2
bindsym $mod+Shift+3 move container to workspace number $ws3
bindsym $mod+Shift+4 move container to workspace number $ws4
bindsym $mod+Shift+5 move container to workspace number $ws5
bindsym $mod+Shift+6 move container to workspace number $ws6
bindsym $mod+Shift+7 move container to workspace number $ws7
bindsym $mod+Shift+8 move container to workspace number $ws8
bindsym $mod+Shift+9 move container to workspace number $ws9
bindsym $mod+Shift+0 move container to workspace number $ws10
# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
# resize window (you can also use the mousefor that)
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the windows width.
# Pressing right will grow the windows width.
# Pressing up will shrink the windows height.
# Pressing down will grow the windows height.
bindsym j resize shrink width 10 px or 10 ppt
bindsym k resize grow height 10 px or 10 ppt
bindsym l resize shrink height 10 px or 10 ppt
bindsym ccedilla resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Down resize grow height 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
# back to normal: Enter or Escape or $mod+r
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+r mode "default"
}
bindsym $mod+r mode "resize"
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
status_command i3status
}
#######My Configs#######
focus_follows_mouse no
mode "apps" {
bindsym f exec "firefox"
bindsym b exec "signal-desktop"
bindsym n exec "telegram-desktop"
bindsym m exec "thunderbird"
bindzym z exec "zulip"
bindsym e exec "emacs"
bindsym g exec "gpodder"
bindsym k exec "keepassxc"
bindsym t exec "thunar"
# back to normal: Enter or Escape or $mod+r
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+Alt_L mode "default"
}
bindsym $mod+slash mode "apps"
bindsym $mod+p exec "firefox --private-window"
bindsym $mod+o exec "firefox"
bindsym Print exec "xfce4-screenshooter -r"
bindsym $mod+Print exec "xfce4-screenshooter -f"
bindsym XF86AudioPlay exec "clementine"
bindsym $mod+semicolon exec "emacs"
# Use `xprop` to get class and instance
#assign [class="KeePassXC"] 1
assign [class="TelegramDesktop"] 2
assign [class="Signal"] 2
assign [class="Element"] 2
assign [class="thunderbird"] 3
# assign [class="Zulip"] 2
exec "signal-desktop"
exec "telegram-desktop"
exec "thunderbird"
exec "element-desktop"
# exec "zulip"
exec --no-startup-id i3-msg "workspace 1; exec keepassxc"
#-eval \\'(org-batch-agenda \\"a\\")\\'
###2####

1
oh-my-bash Submodule

@ -0,0 +1 @@
Subproject commit 4db7436384e0ddfa62911a101b69dd03a0df53fe

View File

@ -1,102 +0,0 @@
#!/usr/bin/env bash
main() {
# Use colors, but only if connected to a terminal, and that terminal
# supports them.
if which tput >/dev/null 2>&1; then
ncolors=$(tput colors)
fi
if [ -t 1 ] && [ -n "$ncolors" ] && [ "$ncolors" -ge 8 ]; then
RED="$(tput setaf 1)"
GREEN="$(tput setaf 2)"
YELLOW="$(tput setaf 3)"
BLUE="$(tput setaf 4)"
BOLD="$(tput bold)"
NORMAL="$(tput sgr0)"
else
RED=""
GREEN=""
YELLOW=""
BLUE=""
BOLD=""
NORMAL=""
fi
# Only enable exit-on-error after the non-critical colorization stuff,
# which may fail on systems lacking tput or terminfo
set -e
# Checks the minium version of bash (v4) installed,
# stops the installation if check fails
if [ -n $BASH_VERSION ]; then
bash_major_version=$(echo $BASH_VERSION | cut -d '.' -f 1)
if [ "${bash_major_version}" -lt "4" ]; then
printf "Error: Bash 4 required for Oh My Bash.\n"
printf "Error: Upgrade Bash and try again.\n"
exit 1
fi
fi
if [ ! -n "$OSH" ]; then
OSH=$HOME/.oh-my-bash
fi
if [ -d "$OSH" ]; then
printf "${YELLOW}You already have Oh My Bash installed.${NORMAL}\n"
printf "You'll need to remove $OSH if you want to re-install.\n"
exit
fi
# Prevent the cloned repository from having insecure permissions. Failing to do
# so causes compinit() calls to fail with "command not found: compdef" errors
# for users with insecure umasks (e.g., "002", allowing group writability). Note
# that this will be ignored under Cygwin by default, as Windows ACLs take
# precedence over umasks except for filesystems mounted with option "noacl".
umask g-w,o-w
printf "${BLUE}Cloning Oh My Bash...${NORMAL}\n"
hash git >/dev/null 2>&1 || {
echo "Error: git is not installed"
exit 1
}
# The Windows (MSYS) Git is not compatible with normal use on cygwin
if [ "$OSTYPE" = cygwin ]; then
if git --version | grep msysgit > /dev/null; then
echo "Error: Windows/MSYS Git is not supported on Cygwin"
echo "Error: Make sure the Cygwin git package is installed and is first on the path"
exit 1
fi
fi
env git clone --depth=1 https://github.com/ohmybash/oh-my-bash.git $OSH || {
printf "Error: git clone of oh-my-bash repo failed\n"
exit 1
}
printf "${BLUE}Looking for an existing bash config...${NORMAL}\n"
if [ -f $HOME/.bashrc ] || [ -h $HOME/.bashrc ]; then
printf "${YELLOW}Found ~/.bashrc.${NORMAL} ${GREEN}Backing up to ~/.bashrc.pre-oh-my-bash${NORMAL}\n";
mv $HOME/.bashrc $HOME/.bashrc.pre-oh-my-bash;
fi
printf "${BLUE}Using the Oh My Bash template file and adding it to ~/.bashrc${NORMAL}\n"
cp $OSH/templates/bashrc.osh-template $HOME/.bashrc
sed "/^export OSH=/ c\\
export OSH=$OSH
" $HOME/.bashrc > $HOME/.bashrc-ombtemp
mv -f $HOME/.bashrc-ombtemp $HOME/.bashrc
# MOTD message :)
printf '%s' "$GREEN"
printf '%s\n' ' __ __ __ '
printf '%s\n' ' ____ / /_ ____ ___ __ __ / /_ ____ ______/ /_ '
printf '%s\n' ' / __ \/ __ \ / __ `__ \/ / / / / __ \/ __ `/ ___/ __ \'
printf '%s\n' '/ /_/ / / / / / / / / / / /_/ / / /_/ / /_/ (__ ) / / /'
printf '%s\n' '\____/_/ /_/ /_/ /_/ /_/\__, / /_.___/\__,_/____/_/ /_/ '
printf '%s\n' ' /____/ .... is now installed!'
printf "%s\n" "Please look over the ~/.bashrc file to select plugins, themes, and options"
printf "${BLUE}${BOLD}%s${NORMAL}\n" "To keep up on the latest news and updates, follow us on GitHub: https://github.com/ohmybash/oh-my-bash"
exec bash; source $HOME/.bashrc
}
main

View File

@ -1,2 +0,0 @@
sh -c "$(wget https://raw.github.com/ohmybash/oh-my-bash/master/tools/install.sh -O -)"
sh -c "$(curl -fsSL https://raw.github.com/ohmybash/oh-my-bash/master/tools/install.sh)"

View File

@ -0,0 +1,2 @@
#!/bin/sh
xrandr --output eDP-1 --primary --mode 1366x768 --pos 2560x0 --rotate normal --output HDMI-1 --off --output DP-1 --mode 2560x1080 --pos 0x0 --rotate normal --output HDMI-2 --off

View File

@ -0,0 +1,2 @@
#!/bin/sh
xrandr --output eDP-1 --mode 1366x768 --pos 0x0 --rotate normal --output HDMI-1 --primary --mode 2560x1080 --pos 1366x0 --rotate normal --output DP-1 --off --output HDMI-2 --off

View File

@ -0,0 +1,2 @@
#!/bin/sh
xrandr --output eDP-1 --off --output HDMI-1 --primary --mode 2560x1080 --pos 0x0 --rotate normal --output DP-1 --off --output HDMI-2 --off

View File

@ -0,0 +1,2 @@
#!/bin/sh
xrandr --output eDP-1 --primary --mode 1366x768 --pos 0x0 --rotate normal --output HDMI-1 --off --output DP-1 --off --output HDMI-2 --off

28
scripts/rsync.sh Normal file
View File

@ -0,0 +1,28 @@
#!/bin/bash
echo "Sync Oh My Bash!"
mkdir -p oh-my-bash
rsync -av $HOME/.oh-my-bash oh-my-bash
echo "Sync Doom Emacs!"
mkdir -p emacs
rsync -av $HOME/.doom.d/ emacs/
echo "Sync i3!"
mkdir -p i3
rsync -av $HOME/.config/i3 i3
echo "Sync Bash!"
mkdir -p screenlayout
rsync -av $HOME/.screenlayout screenlayout
echo "Sync Bash!"
mkdir -p git
rsync -av $HOME/.gitconfig git/
echo "Sync Bash!"
mkdir -p bash
rsync -av $HOME/.bashrc bash/
rsync -av $HOME/.bash_profile bash/
rsync -av $HOME/.profile bash/

View File

@ -1,96 +0,0 @@
;;; Positions
(setf *message-window-gravity* :center)
(setf *input-window-gravity* :center)
(setf *window-name-source* :class)
(setf *window-border-style* :thin)
(set-focus-color "#000000")
(set-unfocus-color "#000000")
;;; mode-line
(setf *screen-mode-line-format*
(list "^B[%n] ^>"
'("^B"
(:eval (stumpwm:run-shell-command "~/.stumpwm/modeline.sh" t)))
">>>>>>>>> ^B%w "))
(setf *mode-line-timeout* 30)
(setf stumpwm:*mode-line-background-color* "#691b1b")
(setf stumpwm:*mode-line-foreground-color* "#f4b63f")
(setf stumpwm:*mode-line-border-color* "#e8f067")
(setf stumpwm:*hidden-window-color* "^7")
(stumpwm:mode-line)
;;; key bindings
(set-prefix-key (kbd "ISO_Level3_Shift"))
;(set-prefix-key (kbd "C-t"))
;;; Groups keybinds
;;; APPs
(define-key *root-map* (kbd "f") "exec firefox")
(define-key *root-map* (kbd "z") "exec xfce4-terminal")
(define-key *root-map* (kbd "SunPrint_Screen") "exec xfce4-screenshooter -r")
(define-key *root-map* (kbd "t") "exec thunar")
(define-key *root-map* (kbd "m") "exec thunderbird")
(define-key *root-map* (kbd "q") "exec emacs -nw")
(define-key *root-map* (kbd "n") "exec telegram-desktop")
(define-key *root-map* (kbd "x") "exec keepassxc")
(define-key *root-map* (kbd "b") "exec signal-desktop")
(define-key *root-map* (kbd "C-M-h") "exec thunar /home/saci")
(define-key *root-map* (kbd "C-M-r") "exec thunar /home/saci/hd/radio")
(define-key *root-map* (kbd "C-M-s") "exec thunar /home/saci/hd/radio/disroot_rca/sync")
(define-key *root-map* (kbd "C-M-p") "exec thunar /home/saci/hd/projetos")
;;; Stumpwm
(define-key *root-map* (kbd "k") "kill")
(define-key *root-map* (kbd "ESC") "abort")
(define-key *root-map* (kbd "-") "hsplit")
(define-key *root-map* (kbd "_") "vsplit")
(define-key *root-map* (kbd "=") "only")
;(define-key *root-map* (kbd "C-g") "grouplist")
;(define-key *root-map* (kbd "C-w") "windowlist")
(define-key *root-map* (kbd "a") "move-focus left")
(define-key *root-map* (kbd "d") "move-focus right")
(define-key *root-map* (kbd "w") "move-focus up")
(define-key *root-map* (kbd "s") "move-focus down")
(define-key *root-map* (kbd "C-w") "move-window up")
(define-key *root-map* (kbd "C-s") "move-window down")
(define-key *root-map* (kbd "C-a") "move-window left")
(define-key *root-map* (kbd "C-d") "move-window right")
(define-key *root-map* (kbd "C-F1") "gmove 1")
(define-key *root-map* (kbd "C-F2") "gmove 2")
(define-key *root-map* (kbd "C-F3") "gmove 3")
(define-key *root-map* (kbd "C-F4") "gmove 4")
(define-key *root-map* (kbd "C-F5") "gmove 5")
(define-key *root-map* (kbd "C-F6") "gmove 6")
(define-key *root-map* (kbd "C-F7") "gmove 7")
(define-key *root-map* (kbd "C-F8") "gmove 8")
(define-key *root-map* (kbd "C-F9") "gmove 9")
(define-key *root-map* (kbd "C-F10") "gselect")
(define-key *root-map* (kbd "quoteright") "windowlist")
(define-key *root-map* (kbd "\"") "select")
(define-key *root-map* (kbd ".") "next-in-frame")
(define-key *root-map* (kbd ",") "prev-in-frame")
(define-key *root-map* (kbd "\\") "exec")
;;; System
;;; startup commands
(run-commands "gnewbg _2_social"
"gnewbg _3_browser"
"gnewbg _4_tics"
"gnewbg _5_gastosCOVID"
"gnewbg _6_orçamentoArretado"
"gnewbg _7_klh"
"gnewbg _8_radio"
"gnewbg _9_orgs"
"exec seahorse"
"exec nextcloud"
"exec keepassxc"
"exec .screenlayout/dual_casa.sh"
"refresh"
)

View File

@ -1,28 +0,0 @@
#!/bin/bash
NIC=$(nmcli d status | grep 'enp2s0' | tr -s ' ' ':' | cut -d':' -f3)
WIC=$(nmcli d status | grep 'wlp3s0' | grep -v 'p2p' | tr -s ' ' ':' | cut -d':' -f3)
if [ $NIC == 'conectado' ]; then
NET=ETH:UP
elif [ $WIC == 'conectado' ]; then
NET=WLP:UP
else
NET=NET:DW
fi
echo -e "\
[US:$(mpstat -u | grep all | tr -s ' ' ';' | cut -d';' -f3)%]\
[SY:$(mpstat -u | grep all | tr -s ' ' ';' | cut -d';' -f5)%]\
[MEM:$(free -h | awk 'NR==2{printf $3}')]\
[$(echo $NET)]\
[$(date "+%d/%m/%y")]\
[$(date "+%H:%M")]\
[$(acpi -b |\
cut -d' ' -f3,4 |\
sed s/Discharging,\ /-/ |\
sed s/Charging,\ /+/ |\
sed s/Unknown,\ /\#/ |\
sed s/Full,\ // |\
sed s/,//)]"