good update i guess

This commit is contained in:
Clay Gomera 2023-05-26 02:32:03 -04:00
parent 894dd57644
commit 5631794a6e
30 changed files with 324 additions and 1166 deletions

View file

@ -1,8 +1,6 @@
# Drake's Dotfiles
# Drake's Dotfiles (Suckless version)
This is just a personal repository where i store all my dotfiles, you're free
clone them and edit them as you wish. Part of this work was based on other
people's dotfiles (Distrotube for example), and it may contain scripts or
binaries that they made or modify.
![screenshot](./screenshot.gif)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 MiB

View file

@ -14,8 +14,7 @@ then
fi
### ENVIRONMENT VARIABLES
export EDITOR="emacsclient -t -a ''" # $EDITOR use Emacs in terminal
export VISUAL="emacsclient -c -a emacs" # $VISUAL use Emacs in GUI mode
export EDITOR="$HOME/.local/bin/lvim"
export XDG_DATA_HOME="${XDG_DATA_HOME:="$HOME/.local/share"}"
export XDG_CACHE_HOME="${XDG_CACHE_HOME:="$HOME/.cache"}"
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:="$HOME/.config"}"

View file

@ -8,8 +8,7 @@
### EXPORT ###
export TERM="xterm-256color" # getting proper colors
export HISTCONTROL=ignoredups:erasedups # no duplicate entries
export EDITOR="emacsclient -t -a ''" # $EDITOR use Emacs in terminal
export VISUAL="emacsclient -c -a emacs" # $VISUAL use Emacs in GUI mode
export EDITOR="$HOME/.local/bin/lvim" # $EDITOR use lunarvim
### "bat" as manpager
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
@ -21,8 +20,8 @@ export MANPAGER="sh -c 'col -bx | bat -l man -p'"
# if not running interactively, don't do anything
[[ $- != *i* ]] && return
# use emacs for vim if present.
[ -x "$(command -v emacs)" ] && alias vim="emacsclient -t -a ''"
# use lunarvim for vim if present.
[ -x "$(command -v ~/.local/bin/lvim)" ] && alias vim="~/.local/bin/lvim"
### SET VI MODE ###
# Comment this line out to enable default emacs-like bindings
@ -132,11 +131,11 @@ alias \
# Changing "ls" to "exa"
alias \
ls="exa -al --color=always --group-directories-first" \
la="exa -a --color=always --group-directories-first" \
ll="exa -l --color=always --group-directories-first" \
lt="exa -aT --color=always --group-directories-first" \
l.='exa -a | grep -E "^\."'
ls="exa --icons -al --color=always --group-directories-first" \
la="exa --icons -a --color=always --group-directories-first" \
ll="exa --icons -l --color=always --group-directories-first" \
lt="exa --icons -aT --color=always --group-directories-first" \
l.='exa --icons -a | grep -E "^\."'
# function to detect os and assign aliases to package managers
alias \
@ -145,7 +144,7 @@ alias \
pac-rmv="paru -Rcns" \
pac-rmv-sec="paru -R" \
pac-qry="paru -Ss" \
pac-cln="paru -Scc"
pac-cln="paru -Scc && paru -Rns $(pacman -Qtdq)"
# colorize grep output (good for log files)
alias \

View file

@ -0,0 +1,141 @@
--[[
THESE ARE EXAMPLE CONFIGS FEEL FREE TO CHANGE TO WHATEVER YOU WANT
`lvim` is the global options object
]]
-- vim options
vim.opt.shiftwidth = 2
vim.opt.tabstop = 2
vim.opt.relativenumber = true
vim.cmd('autocmd FileType markdown setlocal nospell')
vim.opt.wrap = true -- wrap lines
-- general
vim.opt.spell = false
vim.o.shell = '/usr/bin/fish'
lvim.log.level = "info"
lvim.format_on_save = {
enabled = true,
pattern = "*.lua",
timeout = 1000,
}
-- to disable icons and use a minimalist setup, uncomment the following
-- lvim.use_icons = false
-- keymappings <https://www.lunarvim.org/docs/configuration/keybindings>
lvim.leader = "space"
-- add your own keymapping
lvim.keys.normal_mode["<C-s>"] = ":w<cr>"
-- lvim.keys.normal_mode["<S-l>"] = ":BufferLineCycleNext<CR>"
-- lvim.keys.normal_mode["<S-h>"] = ":BufferLineCyclePrev<CR>"
-- -- Use which-key to add extra bindings with the leader-key prefix
-- lvim.builtin.which_key.mappings["W"] = { "<cmd>noautocmd w<cr>", "Save without formatting" }
-- lvim.builtin.which_key.mappings["P"] = { "<cmd>Telescope projects<CR>", "Projects" }
-- -- Change theme settings
lvim.colorscheme = "gruvbox"
lvim.transparent_window = true
lvim.builtin.alpha.active = true
lvim.builtin.alpha.mode = "dashboard"
lvim.builtin.terminal.active = true
lvim.builtin.nvimtree.setup.view.side = "left"
lvim.builtin.nvimtree.setup.renderer.icons.show.git = false
-- Automatically install missing parsers when entering buffer
lvim.builtin.treesitter.auto_install = true
-- if you don't want all the parsers change this to a table of the ones you want
lvim.builtin.treesitter.ensure_installed = {
"bash",
"c_sharp",
"lua",
"python",
"css",
"latex",
"yaml",
"toml",
}
-- lvim.builtin.treesitter.ignore_install = { "haskell" }
-- -- always installed on startup, useful for parsers without a strict filetype
-- lvim.builtin.treesitter.ensure_installed = { "comment", "markdown_inline", "regex" }
-- -- generic LSP settings <https://www.lunarvim.org/docs/languages#lsp-support>
-- --- disable automatic installation of servers
-- lvim.lsp.installer.setup.automatic_installation = false
-- ---configure a server manually. IMPORTANT: Requires `:LvimCacheReset` to take effect
-- ---see the full default list `:lua =lvim.lsp.automatic_configuration.skipped_servers`
-- vim.list_extend(lvim.lsp.automatic_configuration.skipped_servers, { "pyright" })
-- local opts = {} -- check the lspconfig documentation for a list of all possible options
-- require("lvim.lsp.manager").setup("pyright", opts)
-- ---remove a server from the skipped list, e.g. eslint, or emmet_ls. IMPORTANT: Requires `:LvimCacheReset` to take effect
-- ---`:LvimInfo` lists which server(s) are skipped for the current filetype
-- lvim.lsp.automatic_configuration.skipped_servers = vim.tbl_filter(function(server)
-- return server ~= "emmet_ls"
-- end, lvim.lsp.automatic_configuration.skipped_servers)
-- -- you can set a custom on_attach function that will be used for all the language servers
-- -- See <https://github.com/neovim/nvim-lspconfig#keybindings-and-completion>
-- lvim.lsp.on_attach_callback = function(client, bufnr)
-- local function buf_set_option(...)
-- vim.api.nvim_buf_set_option(bufnr, ...)
-- end
-- --Enable completion triggered by <c-x><c-o>
-- buf_set_option("omnifunc", "v:lua.vim.lsp.omnifunc")
-- end
-- -- linters and formatters <https://www.lunarvim.org/docs/languages#lintingformatting>
-- local formatters = require "lvim.lsp.null-ls.formatters"
-- formatters.setup {
-- { command = "stylua" },
-- {
-- command = "prettier",
-- extra_args = { "--print-width", "100" },
-- filetypes = { "typescript", "typescriptreact" },
-- },
-- }
-- local linters = require "lvim.lsp.null-ls.linters"
-- linters.setup {
-- { command = "flake8", filetypes = { "python" } },
-- {
-- command = "shellcheck",
-- args = { "--severity", "warning" },
-- },
-- }
-- Additional Plugins
lvim.plugins = {
{ "lunarvim/colorschemes" },
{ "ellisonleao/gruvbox.nvim" },
{ "puremourning/vimspector" },
{
"iamcco/markdown-preview.nvim",
build = "cd app && npm install",
ft = "markdown",
config = function()
vim.g.mkdp_auto_start = 1
end,
},
}
-- Plugin options
vim.g.vimspector_enable_mappings = 'HUMAN'
vim.g.vimspector_enable_mappings_for_mode = {
['<leader><leader>'] = { 'n', 'v' },
}
-- -- Autocommands (`:help autocmd`) <https://neovim.io/doc/user/autocmd.html>
-- vim.api.nvim_create_autocmd("FileType", {
-- pattern = "zsh",
-- callback = function()
-- -- let treesitter use bash highlight for zsh files as well
-- require("nvim-treesitter.highlight").attach(0, "bash")
-- end,
-- })

View file

@ -1,779 +0,0 @@
## ____ __
## / __ \_________ _/ /_____
## / / / / ___/ __ `/ //_/ _ \
## / /_/ / / / /_/ / ,< / __/ Clay Gomera (Drake)
## /_____/_/ \__,_/_/|_|\___/ My custom neofetch config
##
print_info() {
prin " "
info "$(color 1) OS " distro
info "$(color 2) VER" kernel
info "$(color 3) UP " uptime
info "$(color 4) PKG" packages
info "$(color 5) DE " de
info "$(color 6) CPU" cpu
info "$(color 7) GPU" gpu
info "$(color 8) MEM" memory
prin "$(color 1) $(color 2) $(color 3) $(color 4) $(color 5) $(color 6) $(color 7) $(color 8)"
}
#### TITLE
# Hide/Show Fully qualified domain name.
# Default: 'off'
# Values: 'on', 'off'
# Flag: --title_fqdn
title_fqdn="off"
#### KERNEL
# Shorten the output of the kernel function.
# Default: 'on'
# Values: 'on', 'off'
# Flag: --kernel_shorthand
# Supports: Everything except *BSDs (except PacBSD and PC-BSD)
# Example:
# on: '4.8.9-1-ARCH'
# off: 'Linux 4.8.9-1-ARCH'
kernel_shorthand="on"
#### DISTRO
# Shorten the output of the distro function
# Default: 'off'
# Values: 'on', 'tiny', 'off'
# Flag: --distro_shorthand
# Supports: Everything except Windows and Haiku
distro_shorthand="off"
# Show/Hide OS Architecture.
# Show 'x86_64', 'x86' and etc in 'Distro:' output.
# Default: 'on'
# Values: 'on', 'off'
# Flag: --os_arch
# Example:
# on: 'Arch Linux x86_64'
# off: 'Arch Linux'
os_arch="on"
#### UPTIME
# Shorten the output of the uptime function
# Default: 'on'
# Values: 'on', 'tiny', 'off'
# Flag: --uptime_shorthand
# Example:
# on: '2 days, 10 hours, 3 mins'
# tiny: '2d 10h 3m'
# off: '2 days, 10 hours, 3 minutes'
uptime_shorthand="on"
#### MEMORY
# Show memory pecentage in output.
# Default: 'off'
# Values: 'on', 'off'
# Flag: --memory_percent
# Example:
# on: '1801MiB / 7881MiB (22%)'
# off: '1801MiB / 7881MiB'
memory_percent="off"
# Change memory output unit.
# Default: 'mib'
# Values: 'kib', 'mib', 'gib'
# Flag: --memory_unit
# Example:
# kib '1020928KiB / 7117824KiB'
# mib '1042MiB / 6951MiB'
# gib: ' 0.98GiB / 6.79GiB'
memory_unit="mib"
#### PACKAGES
# Show/Hide Package Manager names.
# Default: 'tiny'
# Values: 'on', 'tiny' 'off'
# Flag: --package_managers
# Example:
# on: '998 (pacman), 8 (flatpak), 4 (snap)'
# tiny: '908 (pacman, flatpak, snap)'
# off: '908'
package_managers="on"
#### SHELL
# Show the path to $SHELL
# Default: 'off'
# Values: 'on', 'off'
# Flag: --shell_path
# Example:
# on: '/bin/bash'
# off: 'bash'
shell_path="off"
# Show $SHELL version
# Default: 'on'
# Values: 'on', 'off'
# Flag: --shell_version
# Example:
# on: 'bash 4.4.5'
# off: 'bash'
shell_version="on"
#### CPU
# CPU speed type
# Default: 'bios_limit'
# Values: 'scaling_cur_freq', 'scaling_min_freq', 'scaling_max_freq', 'bios_limit'.
# Flag: --speed_type
# Supports: Linux with 'cpufreq'
# NOTE: Any file in '/sys/devices/system/cpu/cpu0/cpufreq' can be used as a value.
speed_type="bios_limit"
# CPU speed shorthand
# Default: 'off'
# Values: 'on', 'off'.
# Flag: --speed_shorthand
# NOTE: This flag is not supported in systems with CPU speed less than 1 GHz
#
# Example:
# on: 'i7-6500U (4) @ 3.1GHz'
# off: 'i7-6500U (4) @ 3.100GHz'
speed_shorthand="off"
# Enable/Disable CPU brand in output.
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --cpu_brand
#
# Example:
# on: 'Intel i7-6500U'
# off: 'i7-6500U (4)'
cpu_brand="on"
# CPU Speed
# Hide/Show CPU speed.
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --cpu_speed
#
# Example:
# on: 'Intel i7-6500U (4) @ 3.1GHz'
# off: 'Intel i7-6500U (4)'
cpu_speed="on"
# CPU Cores
# Display CPU cores in output
#
# Default: 'logical'
# Values: 'logical', 'physical', 'off'
# Flag: --cpu_cores
# Support: 'physical' doesn't work on BSD.
#
# Example:
# logical: 'Intel i7-6500U (4) @ 3.1GHz' (All virtual cores)
# physical: 'Intel i7-6500U (2) @ 3.1GHz' (All physical cores)
# off: 'Intel i7-6500U @ 3.1GHz'
cpu_cores="logical"
# CPU Temperature
# Hide/Show CPU temperature.
# Note the temperature is added to the regular CPU function.
#
# Default: 'off'
# Values: 'C', 'F', 'off'
# Flag: --cpu_temp
# Supports: Linux, BSD
# NOTE: For FreeBSD and NetBSD-based systems, you'll need to enable
# coretemp kernel module. This only supports newer Intel processors.
#
# Example:
# C: 'Intel i7-6500U (4) @ 3.1GHz [27.2°C]'
# F: 'Intel i7-6500U (4) @ 3.1GHz [82.0°F]'
# off: 'Intel i7-6500U (4) @ 3.1GHz'
cpu_temp="off"
# GPU
# Enable/Disable GPU Brand
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --gpu_brand
#
# Example:
# on: 'AMD HD 7950'
# off: 'HD 7950'
gpu_brand="on"
# Which GPU to display
#
# Default: 'all'
# Values: 'all', 'dedicated', 'integrated'
# Flag: --gpu_type
# Supports: Linux
#
# Example:
# all:
# GPU1: AMD HD 7950
# GPU2: Intel Integrated Graphics
#
# dedicated:
# GPU1: AMD HD 7950
#
# integrated:
# GPU1: Intel Integrated Graphics
gpu_type="all"
# Resolution
# Display refresh rate next to each monitor
# Default: 'off'
# Values: 'on', 'off'
# Flag: --refresh_rate
# Supports: Doesn't work on Windows.
#
# Example:
# on: '1920x1080 @ 60Hz'
# off: '1920x1080'
refresh_rate="off"
# Gtk Theme / Icons / Font
# Shorten output of GTK Theme / Icons / Font
#
# Default: 'off'
# Values: 'on', 'off'
# Flag: --gtk_shorthand
#
# Example:
# on: 'Numix, Adwaita'
# off: 'Numix [GTK2], Adwaita [GTK3]'
gtk_shorthand="off"
# Enable/Disable gtk2 Theme / Icons / Font
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --gtk2
#
# Example:
# on: 'Numix [GTK2], Adwaita [GTK3]'
# off: 'Adwaita [GTK3]'
gtk2="on"
# Enable/Disable gtk3 Theme / Icons / Font
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --gtk3
#
# Example:
# on: 'Numix [GTK2], Adwaita [GTK3]'
# off: 'Numix [GTK2]'
gtk3="on"
# IP Address
# Website to ping for the public IP
#
# Default: 'http://ident.me'
# Values: 'url'
# Flag: --ip_host
public_ip_host="http://ident.me"
# Public IP timeout.
#
# Default: '2'
# Values: 'int'
# Flag: --ip_timeout
public_ip_timeout=2
# Desktop Environment
# Show Desktop Environment version
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --de_version
de_version="on"
# Disk
# Which disks to display.
# The values can be any /dev/sdXX, mount point or directory.
# NOTE: By default we only show the disk info for '/'.
#
# Default: '/'
# Values: '/', '/dev/sdXX', '/path/to/drive'.
# Flag: --disk_show
#
# Example:
# disk_show=('/' '/dev/sdb1'):
# 'Disk (/): 74G / 118G (66%)'
# 'Disk (/mnt/Videos): 823G / 893G (93%)'
#
# disk_show=('/'):
# 'Disk (/): 74G / 118G (66%)'
#
disk_show=('/')
# Disk subtitle.
# What to append to the Disk subtitle.
#
# Default: 'mount'
# Values: 'mount', 'name', 'dir', 'none'
# Flag: --disk_subtitle
#
# Example:
# name: 'Disk (/dev/sda1): 74G / 118G (66%)'
# 'Disk (/dev/sdb2): 74G / 118G (66%)'
#
# mount: 'Disk (/): 74G / 118G (66%)'
# 'Disk (/mnt/Local Disk): 74G / 118G (66%)'
# 'Disk (/mnt/Videos): 74G / 118G (66%)'
#
# dir: 'Disk (/): 74G / 118G (66%)'
# 'Disk (Local Disk): 74G / 118G (66%)'
# 'Disk (Videos): 74G / 118G (66%)'
#
# none: 'Disk: 74G / 118G (66%)'
# 'Disk: 74G / 118G (66%)'
# 'Disk: 74G / 118G (66%)'
disk_subtitle="mount"
# Disk percent.
# Show/Hide disk percent.
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --disk_percent
#
# Example:
# on: 'Disk (/): 74G / 118G (66%)'
# off: 'Disk (/): 74G / 118G'
disk_percent="on"
# Song
# Manually specify a music player.
#
# Default: 'auto'
# Values: 'auto', 'player-name'
# Flag: --music_player
#
# Available values for 'player-name':
#
# amarok
# audacious
# banshee
# bluemindo
# clementine
# cmus
# deadbeef
# deepin-music
# dragon
# elisa
# exaile
# gnome-music
# gmusicbrowser
# gogglesmm
# guayadeque
# io.elementary.music
# iTunes
# juk
# lollypop
# mocp
# mopidy
# mpd
# muine
# netease-cloud-music
# olivia
# playerctl
# pogo
# pragha
# qmmp
# quodlibet
# rhythmbox
# sayonara
# smplayer
# spotify
# strawberry
# tauonmb
# tomahawk
# vlc
# xmms2d
# xnoise
# yarock
music_player="mpd"
# Format to display song information.
#
# Default: '%artist% - %album% - %title%'
# Values: '%artist%', '%album%', '%title%'
# Flag: --song_format
#
# Example:
# default: 'Song: Jet - Get Born - Sgt Major'
song_format="%artist% - %album% - %title%"
# Print the Artist, Album and Title on separate lines
#
# Default: 'off'
# Values: 'on', 'off'
# Flag: --song_shorthand
#
# Example:
# on: 'Artist: The Fratellis'
# 'Album: Costello Music'
# 'Song: Chelsea Dagger'
#
# off: 'Song: The Fratellis - Costello Music - Chelsea Dagger'
song_shorthand="off"
# 'mpc' arguments (specify a host, password etc).
#
# Default: ''
# Example: mpc_args=(-h HOST -P PASSWORD)
mpc_args=()
# Text Colors
# Text Colors
#
# Default: 'distro'
# Values: 'distro', 'num' 'num' 'num' 'num' 'num' 'num'
# Flag: --colors
#
# Each number represents a different part of the text in
# this order: 'title', '@', 'underline', 'subtitle', 'colon', 'info'
#
# Example:
# colors=(distro) - Text is colored based on Distro colors.
# colors=(4 6 1 8 8 6) - Text is colored in the order above.
colors=(distro)
# Text Options
# Toggle bold text
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --bold
bold="on"
# Enable/Disable Underline
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --underline
underline_enabled="on"
# Underline character
#
# Default: '-'
# Values: 'string'
# Flag: --underline_char
underline_char="-"
# Info Separator
# Replace the default separator with the specified string.
#
# Default: ':'
# Flag: --separator
#
# Example:
# separator="->": 'Shell-> bash'
# separator=" =": 'WM = dwm'
separator=":"
# Color Blocks
# Color block range
# The range of colors to print.
#
# Default: '0', '15'
# Values: 'num'
# Flag: --block_range
#
# Example:
#
# Display colors 0-7 in the blocks. (8 colors)
# neofetch --block_range 0 7
#
# Display colors 0-15 in the blocks. (16 colors)
# neofetch --block_range 0 15
block_range=(0 15)
# Toggle color blocks
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --color_blocks
color_blocks="on"
# Color block width in spaces
#
# Default: '3'
# Values: 'num'
# Flag: --block_width
block_width=3
# Color block height in lines
#
# Default: '1'
# Values: 'num'
# Flag: --block_height
block_height=1
# Color Alignment
#
# Default: 'auto'
# Values: 'auto', 'num'
# Flag: --col_offset
#
# Number specifies how far from the left side of the terminal (in spaces) to
# begin printing the columns, in case you want to e.g. center them under your
# text.
# Example:
# col_offset="auto" - Default behavior of neofetch
# col_offset=7 - Leave 7 spaces then print the colors
col_offset="auto"
# Progress Bars
# Bar characters
#
# Default: '-', '='
# Values: 'string', 'string'
# Flag: --bar_char
#
# Example:
# neofetch --bar_char 'elapsed' 'total'
# neofetch --bar_char '-' '='
bar_char_elapsed="-"
bar_char_total="="
# Toggle Bar border
#
# Default: 'on'
# Values: 'on', 'off'
# Flag: --bar_border
bar_border="on"
# Progress bar length in spaces
# Number of chars long to make the progress bars.
#
# Default: '15'
# Values: 'num'
# Flag: --bar_length
bar_length=15
# Progress bar colors
# When set to distro, uses your distro's logo colors.
#
# Default: 'distro', 'distro'
# Values: 'distro', 'num'
# Flag: --bar_colors
#
# Example:
# neofetch --bar_colors 3 4
# neofetch --bar_colors distro 5
bar_color_elapsed="distro"
bar_color_total="distro"
# Info display
# Display a bar with the info.
#
# Default: 'off'
# Values: 'bar', 'infobar', 'barinfo', 'off'
# Flags: --cpu_display
# --memory_display
# --battery_display
# --disk_display
#
# Example:
# bar: '[---=======]'
# infobar: 'info [---=======]'
# barinfo: '[---=======] info'
# off: 'info'
cpu_display="off"
memory_display="off"
battery_display="off"
disk_display="off"
# Backend Settings
# Image backend.
#
# Default: 'ascii'
# Values: 'ascii', 'caca', 'chafa', 'jp2a', 'iterm2', 'off',
# 'pot', 'termpix', 'pixterm', 'tycat', 'w3m', 'kitty'
# Flag: --backend
image_backend="ascii"
# Image Source
#
# Which image or ascii file to display.
#
# Default: 'auto'
# Values: 'auto', 'ascii', 'wallpaper', '/path/to/img', '/path/to/ascii', '/path/to/dir/'
# 'command output (neofetch --ascii "$(fortune | cowsay -W 30)")'
# Flag: --source
#
# NOTE: 'auto' will pick the best image source for whatever image backend is used.
# In ascii mode, distro ascii art will be used and in an image mode, your
# wallpaper will be used.
image_source="auto"
#### ASCII OPTIONS
# Ascii distro
# Which distro's ascii art to display.
# Default: 'auto'
# Values: 'auto', 'distro_name'
# Flag: --ascii_distro
# NOTE: AIX, Alpine, Anarchy, Android, Antergos, antiX, "AOSC OS",
# "AOSC OS/Retro", Apricity, ArcoLinux, ArchBox, ARCHlabs,
# ArchStrike, XFerience, ArchMerge, Arch, Artix, Arya, Bedrock,
# Bitrig, BlackArch, BLAG, BlankOn, BlueLight, bonsai, BSD,
# BunsenLabs, Calculate, Carbs, CentOS, Chakra, ChaletOS,
# Chapeau, Chrom*, Cleanjaro, ClearOS, Clear_Linux, Clover,
# Condres, Container_Linux, CRUX, Cucumber, Debian, Deepin,
# DesaOS, Devuan, DracOS, DarkOs, DragonFly, Drauger, Elementary,
# EndeavourOS, Endless, EuroLinux, Exherbo, Fedora, Feren, FreeBSD,
# FreeMiNT, Frugalware, Funtoo, GalliumOS, Garuda, Gentoo, Pentoo,
# gNewSense, GNOME, GNU, GoboLinux, Grombyang, Guix, Haiku, Huayra,
# Hyperbola, janus, Kali, KaOS, KDE_neon, Kibojoe, Kogaion,
# Korora, KSLinux, Kubuntu, LEDE, LFS, Linux_Lite,
# LMDE, Lubuntu, Lunar, macos, Mageia, MagpieOS, Mandriva,
# Manjaro, Maui, Mer, Minix, LinuxMint, MX_Linux, Namib,
# Neptune, NetBSD, Netrunner, Nitrux, NixOS, Nurunner,
# NuTyX, OBRevenge, OpenBSD, openEuler, OpenIndiana, openmamba,
# OpenMandriva, OpenStage, OpenWrt, osmc, Oracle, OS Elbrus, PacBSD,
# Parabola, Pardus, Parrot, Parsix, TrueOS, PCLinuxOS, Peppermint,
# popos, Porteus, PostMarketOS, Proxmox, Puppy, PureOS, Qubes, Radix,
# Raspbian, Reborn_OS, Redstar, Redcore, Redhat, Refracted_Devuan,
# Regata, Rosa, sabotage, Sabayon, Sailfish, SalentOS, Scientific,
# Septor, SereneLinux, SharkLinux, Siduction, Slackware, SliTaz,
# SmartOS, Solus, Source_Mage, Sparky, Star, SteamOS, SunOS,
# openSUSE_Leap, openSUSE_Tumbleweed, openSUSE, SwagArch, Tails,
# Trisquel, Ubuntu-Budgie, Ubuntu-GNOME, Ubuntu-MATE, Ubuntu-Studio,
# Ubuntu, Venom, Void, Obarun, windows10, Windows7, Xubuntu, Zorin,
# and IRIX have ascii logos
# NOTE: Arch, Ubuntu, Redhat, and Dragonfly have 'old' logo variants.
# Use '{distro name}_old' to use the old logos.
# NOTE: Ubuntu has flavor variants.
# Change this to Lubuntu, Kubuntu, Xubuntu, Ubuntu-GNOME,
# Ubuntu-Studio, Ubuntu-Mate or Ubuntu-Budgie to use the flavors.
# NOTE: Arcolinux, Dragonfly, Fedora, Alpine, Arch, Ubuntu,
# CRUX, Debian, Gentoo, FreeBSD, Mac, NixOS, OpenBSD, android,
# Antrix, CentOS, Cleanjaro, ElementaryOS, GUIX, Hyperbola,
# Manjaro, MXLinux, NetBSD, Parabola, POP_OS, PureOS,
# Slackware, SunOS, LinuxLite, OpenSUSE, Raspbian,
# postmarketOS, and Void have a smaller logo variant.
# Use '{distro name}_small' to use the small variants.
ascii_distro="arch_small"
# Ascii Colors
# Default: 'distro'
# Values: 'distro', 'num' 'num' 'num' 'num' 'num' 'num'
# Flag: --ascii_colors
# Example:
# ascii_colors=(distro) - Ascii is colored based on Distro colors.
# ascii_colors=(4 6 1 8 8 6) - Ascii is colored using these colors.
ascii_colors=(distro)
# Bold ascii logo
# Whether or not to bold the ascii logo.
# Default: 'on'
# Values: 'on', 'off'
# Flag: --ascii_bold
ascii_bold="on"
#### IMAGE OPTIONS
# Image loop
# Setting this to on will make neofetch redraw the image constantly until
# Ctrl+C is pressed. This fixes display issues in some terminal emulators.
# Default: 'off'
# Values: 'on', 'off'
# Flag: --loop
image_loop="off"
# Thumbnail directory
# Default: '~/.cache/thumbnails/neofetch'
# Values: 'dir'
thumbnail_dir="${XDG_CACHE_HOME:-${HOME}/.cache}/thumbnails/neofetch"
# Crop mode
# Default: 'normal'
# Values: 'normal', 'fit', 'fill'
# Flag: --crop_mode
# See this wiki page to learn about the fit and fill options.
# https://github.com/dylanaraps/neofetch/wiki/What-is-Waifu-Crop%3F
crop_mode="normal"
# Crop offset
# Note: Only affects 'normal' crop mode.
# Default: 'center'
# Values: 'northwest', 'north', 'northeast', 'west', 'center'
# 'east', 'southwest', 'south', 'southeast'
# Flag: --crop_offset
crop_offset="center"
# Image size
# The image is half the terminal width by default.
# Default: 'auto'
# Values: 'auto', '00px', '00%', 'none'
# Flags: --image_size
# --size
image_size="auto"
# Gap between image and text
# Default: '3'
# Values: 'num', '-num'
# Flag: --gap
gap=3
# Image offsets
# Only works with the w3m backend.
# Default: '0'
# Values: 'px'
# Flags: --xoffset
# --yoffset
yoffset=0
xoffset=0
# Image background color
# Only works with the w3m backend.
# Default: ''
# Values: 'color', 'blue'
# Flag: --bg_color

View file

@ -1,32 +0,0 @@
[Appearance]
color_scheme_path=/usr/share/qt5ct/colors/airy.conf
custom_palette=false
icon_theme=gruvbox-dark-icons-gtk
standard_dialogs=gtk2
style=gtk2
[Fonts]
fixed="Mononoki Nerd Font,10,-1,5,50,0,0,0,0,0,Regular"
general="Mononoki Nerd Font,10,-1,5,50,0,0,0,0,0,Regular"
[Interface]
activate_item_on_single_click=1
buttonbox_layout=0
cursor_flash_time=1000
dialog_buttons_have_icons=1
double_click_interval=400
gui_effects=@Invalid()
keyboard_scheme=2
menus_have_icons=true
show_shortcuts_in_context_menus=true
stylesheets=@Invalid()
toolbutton_style=4
underline_shortcut=1
wheel_scroll_lines=3
[SettingsWindow]
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\x3\xc0\0\0\0\x12\0\0\a\x7f\0\0\x4\x37\0\0\x3\xc1\0\0\0\x13\0\0\a~\0\0\x4\x36\0\0\0\0\0\0\0\0\a\x80\0\0\x3\xc1\0\0\0\x13\0\0\a~\0\0\x4\x36)
[Troubleshooting]
force_raster_widgets=1
ignored_applications=@Invalid()

View file

@ -1,32 +0,0 @@
[Appearance]
color_scheme_path=/usr/share/qt6ct/colors/airy.conf
custom_palette=false
icon_theme=gruvbox-dark-icons-gtk
standard_dialogs=gtk2
style=qt6gtk2
[Fonts]
fixed="Mononoki Nerd Font,10,-1,5,400,0,0,0,0,0,0,0,0,0,0,1,Regular"
general="Mononoki Nerd Font,10,-1,5,400,0,0,0,0,0,0,0,0,0,0,1,Regular"
[Interface]
activate_item_on_single_click=1
buttonbox_layout=0
cursor_flash_time=1000
dialog_buttons_have_icons=1
double_click_interval=400
gui_effects=@Invalid()
keyboard_scheme=2
menus_have_icons=true
show_shortcuts_in_context_menus=true
stylesheets=@Invalid()
toolbutton_style=4
underline_shortcut=1
wheel_scroll_lines=3
[SettingsWindow]
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\x12\0\0\a\x7f\0\0\x4\x37\0\0\0\x1\0\0\0\x13\0\0\a~\0\0\x4\x36\0\0\0\0\0\0\0\0\a\x80\0\0\0\x1\0\0\0\x13\0\0\a~\0\0\x4\x36)
[Troubleshooting]
force_raster_widgets=1
ignored_applications=@Invalid()

View file

@ -1,7 +1,9 @@
https://khanacademy.org/ khanacademy
https://mail.google.com/ gmail
https://mail.tutanota.com/ tutanota
https://youtube.com/ youtube
https://fosstodon.org/ mastodon
https://pixelfed.social/ pixelfed
https://github.com/ github
https://app.element.io/ element
https://web.whatsapp.com/ whatsapp

View file

@ -41,17 +41,17 @@ connect() {
notify-send "Scannig networks, please wait"
sleep 1
bssid=$(nmcli device wifi list | sed -n '1!p' | cut -b 9- | dmenu -i -l 10 -fn "mononoki Nerd Font-10" -nb \#1d2021 -nf \#fbf1c7 -sb \#cc241d -sf \#fbf1c7 -p "select wifi:" | cut -d' ' -f1)
}
}
## SELECT PASSWORD FUNCTION ##
password() {
pass=$(echo " " | dmenu -P -i -fn "mononoki Nerd Font-10" -nb \#1d2021 -nf \#fbf1c7 -sb \#cc241d -sf \#fbf1c7 -p "enter password:")
}
}
## MAIN CONNECTION COMMAND ##
action() {
nmcli device wifi connect "$bssid" password "$pass" || nmcli device wifi connect "$bssid"
}
}
## CHECKING IF WIFI IS WORKING
check() {
@ -80,7 +80,7 @@ case "$cases" in
action;
check;;
$option5*)
firefox http://networkcheck.kde.org;;
qutebrowser http://networkcheck.kde.org;;
$option6*)
exit 0
esac

View file

@ -1,12 +1,12 @@
// appearance
/* appearance */
static const unsigned int borderpx = 1; /* border pixel of windows */
static const unsigned int snap = 32; /* snap pixel */
static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
static const int horizpadbar = 2; /* horizontal padding for statusbar */
static const int vertpadbar = 1; /* vertical padding for statusbar */
static const char *fonts[] = {"Symbols Nerd Font Mono:size=12", "mononoki Nerd Font:size=10"};
static const char dmenufont[] = {"mononoki Nerd Font:size=10"};
static const int vertpadbar = 8; /* vertical padding for statusbar */
static const char *fonts[] = {"Symbols Nerd Font Mono:size=12", "mononoki Nerd Font:size=12"};
static const char dmenufont[] = {"mononoki Nerd Font:size=12"};
static const char col_gray1[] = "#1d2021";
static const char col_gray2[] = "#32302f";
static const char col_gray3[] = "#d5c4a1";
@ -18,7 +18,7 @@ static const char *colors[][3] = {
[SchemeSel] = { col_gray4, col_cyan, col_cyan },
};
// scratchpads
/* scratchpads */
typedef struct {
const char *name;
const void *cmd;
@ -55,8 +55,8 @@ static Sp scratchpads[] = {
/* tagging */
static const char *tags[] = {
"", // EDITOR
"󰙨", // FILE MANAGER
"", // EDITOR
"󰙨", // TESTING
"󰖟", // WEB BROWSER
"󰭹", // CHAT
"󱡭", // AUDIO TOOLS
@ -89,6 +89,7 @@ static const Rule rules[] = {
{ "Chromium", NULL, NULL, 1 << 2, 0, -1 },
{ "Brave-browser", NULL, NULL, 1 << 2, 0, -1 },
{ "Bitwarden", NULL, NULL, 1 << 2, 0, -1 },
{ "newsboat", NULL, NULL, 1 << 2, 0, -1 },
// chat tag
{ "Signal", NULL, NULL, 1 << 3, 0, -1 },
// audio tools tag
@ -171,97 +172,131 @@ static const Layout layouts[] = {
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
/* commands */
// dmenu
// dmenu
static const char *dmenucmd[] = { "dmenu_run", "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
// terminal
// terminal
static const char *termcmd[] = { "st", NULL };
#include "movestack.c"
static const Key keys[] = {
/* modifier key function argument */
// text editor
{ MODKEY, XK_e, spawn, SHCMD("emacsclient -c -a 'emacs'")},
// web browser
{ MODKEY, XK_w, spawn, SHCMD("qutebrowser")},
// chat
{ MODKEY, XK_s, spawn, SHCMD("signal-desktop")},
// set keyboard layout to es
{ MODKEY|ControlMask, XK_e, spawn, SHCMD("setxkbmap -layout es")},
// set keyboard layout to us
{ MODKEY|ControlMask, XK_u, spawn, SHCMD("setxkbmap -layout us")},
// increase volume
{ 0, XF86XK_AudioRaiseVolume, spawn, SHCMD("pamixer -i 5")},
// decrease volume
{ 0, XF86XK_AudioLowerVolume, spawn, SHCMD("pamixer -d 5")},
// mute volume
{ 0, XF86XK_AudioMute, spawn, SHCMD("pamixer -t")},
// mute microphone
{ 0, XF86XK_AudioMicMute, spawn, SHCMD("pamixer --default-source -t")},
// increase brightness
{ 0, XF86XK_MonBrightnessUp, spawn, SHCMD("xbacklight -inc 10")},
// decrease brightness
{ 0, XF86XK_MonBrightnessDown, spawn, SHCMD("xbacklight -dec 10")},
// decrease brightness
{ 0, XF86XK_Display, spawn, SHCMD("arandr")},
// launcher
{ MODKEY|ShiftMask, XK_r, spawn, {.v = dmenucmd } },
// desktop launcher
{ MODKEY|ShiftMask, XK_d, spawn, SHCMD("$HOME/.config/suckless/dmenu/scripts/dmenu_drun") },
// wifi config
{ MODKEY|ShiftMask, XK_i, spawn, SHCMD("$HOME/.config/suckless/dmenu/scripts/dmenu_wifi") },
// screenshots
{ MODKEY|ShiftMask, XK_s, spawn, SHCMD("$HOME/.config/suckless/dmenu/scripts/dmenu_scrot") },
// screenshots
{ MODKEY|ShiftMask, XK_w, spawn, SHCMD("$HOME/.config/suckless/dmenu/scripts/dmenu_wall") },
// edit
{ MODKEY|ShiftMask, XK_e, spawn, SHCMD("$HOME/.config/suckless/dmenu/scripts/dmenu_edit") },
// bluetooth
{ MODKEY|ShiftMask, XK_b, spawn, SHCMD("$HOME/.config/suckless/dmenu/scripts/dmenu_blue") },
// terminal
/* main apps*/
// terminal
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
// toogle the bar
{ MODKEY, XK_b, togglebar, {0} },
// window focusing
// text editor
{ MODKEY, XK_e, spawn, SHCMD("st -n neovim -c neovim -e $HOME/.local/bin/lvim")},
// web browser
{ MODKEY, XK_w, spawn, SHCMD("qutebrowser")},
// chat
{ MODKEY, XK_s, spawn, SHCMD("flatpak run org.signal.Signal")},
/* keyboard layout */
// set keyboard layout to es
{ MODKEY|ControlMask, XK_e, spawn, SHCMD("setxkbmap -layout es")},
// set keyboard layout to us
{ MODKEY|ControlMask, XK_u, spawn, SHCMD("setxkbmap -layout us")},
/* XF86 Keys */
// increase volume
{ 0, XF86XK_AudioRaiseVolume, spawn, SHCMD("pamixer -i 5")},
// decrease volume
{ 0, XF86XK_AudioLowerVolume, spawn, SHCMD("pamixer -d 5")},
// mute volume
{ 0, XF86XK_AudioMute, spawn, SHCMD("pamixer -t")},
// mute microphone
{ 0, XF86XK_AudioMicMute, spawn, SHCMD("pamixer --default-source -t")},
// increase brightness
{ 0, XF86XK_MonBrightnessUp, spawn, SHCMD("xbacklight -inc 10")},
// decrease brightness
{ 0, XF86XK_MonBrightnessDown, spawn, SHCMD("xbacklight -dec 10")},
// display settings
{ 0, XF86XK_Display, spawn, SHCMD("arandr")},
// play/pause
{ 0, XF86XK_AudioPause, spawn, SHCMD("playerctl play-pause")},
// play/pause
{ 0, XF86XK_AudioPlay, spawn, SHCMD("playerctl play-pause")},
// next
{ 0, XF86XK_AudioNext, spawn, SHCMD("playerctl next")},
// previous
{ 0, XF86XK_AudioPrev, spawn, SHCMD("playerctl previous")},
// stop
{ 0, XF86XK_AudioStop, spawn, SHCMD("playerctl stop")},
// news
{ 0, XF86XK_News, spawn, SHCMD("st -n newsboat -c newsboat -e newsboat")},
/* dmenu */
// launcher
{ MODKEY|ShiftMask, XK_r, spawn, {.v = dmenucmd } },
// desktop launcher
{ MODKEY|ShiftMask, XK_d, spawn, SHCMD("$HOME/.config/suckless/dmenu/scripts/dmenu_drun") },
// wifi config
{ MODKEY|ShiftMask, XK_i, spawn, SHCMD("$HOME/.config/suckless/dmenu/scripts/dmenu_wifi") },
// screenshots
{ MODKEY|ShiftMask, XK_s, spawn, SHCMD("$HOME/.config/suckless/dmenu/scripts/dmenu_scrot") },
// wallpapers
{ MODKEY|ShiftMask, XK_w, spawn, SHCMD("$HOME/.config/suckless/dmenu/scripts/dmenu_wall") },
// edit
{ MODKEY|ShiftMask, XK_e, spawn, SHCMD("$HOME/.config/suckless/dmenu/scripts/dmenu_edit") },
// bluetooth
{ MODKEY|ShiftMask, XK_b, spawn, SHCMD("$HOME/.config/suckless/dmenu/scripts/dmenu_blue") },
// power manager
{ MODKEY|ShiftMask, XK_q, spawn, SHCMD("$HOME/.config/suckless/dmenu/scripts/dmenu_power")},
/* window management */
// window focusing
{ MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_k, focusstack, {.i = -1 } },
// increase and decrease master clients count
// increase and decrease master clients count
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
// increase and decrease master client size
// increase and decrease master client size
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
// move windows on stack
// move windows on stack
{ MODKEY|ShiftMask, XK_j, movestack, {.i = +1 } },
{ MODKEY|ShiftMask, XK_k, movestack, {.i = -1 } },
// switch master window
// switch master window
{ MODKEY|ControlMask, XK_Return, zoom, {0} },
// switch to latest tag
// switch to latest tag
{ MODKEY, XK_Tab, view, {0} },
// close focused client
// close focused client
{ MODKEY, XK_q, killclient, {0} },
// switch to tiling layout
// switch to tiling layout
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
// switch to floating layout
// switch to floating layout
{ MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
// switch to monocle layout
// switch to monocle layout
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
// switch to three-column layout
// switch to three-column layout
{ MODKEY, XK_c, setlayout, {.v = &layouts[3]} },
// switch to latest layout
// switch to latest layout
{ MODKEY, XK_space, setlayout, {0} },
// toggle floating mode on focused window
// toggle floating mode on focused window
{ MODKEY|ControlMask, XK_space, togglefloating, {0} },
// view all opened clients on current tag
// view all opened clients on current tag
{ MODKEY, XK_0, view, {.ui = ~0 } },
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
// focus next or previous screen
// focus next or previous screen
{ MODKEY, XK_comma, focusmon, {.i = -1 } },
{ MODKEY, XK_period, focusmon, {.i = +1 } },
// move focused client to next or previous screen
// move focused client to next or previous screen
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
// scratchpads
/* tags */
TAGKEYS( XK_1, 0)
TAGKEYS( XK_2, 1)
TAGKEYS( XK_3, 2)
TAGKEYS( XK_4, 3)
TAGKEYS( XK_5, 4)
TAGKEYS( XK_6, 5)
TAGKEYS( XK_7, 6)
TAGKEYS( XK_8, 7)
TAGKEYS( XK_9, 8)
/* scratchpads */
{ MODKEY|Mod1Mask, XK_Return, togglescratch, {.ui = 0 } },
{ MODKEY|Mod1Mask, XK_b, togglescratch, {.ui = 1 } },
{ MODKEY|Mod1Mask, XK_f, togglescratch, {.ui = 2 } },
@ -275,20 +310,13 @@ static const Key keys[] = {
{ MODKEY|Mod1Mask, XK_n, togglescratch, {.ui = 10 } },
{ MODKEY|Mod1Mask, XK_r, togglescratch, {.ui = 11 } },
{ MODKEY|Mod1Mask, XK_g, togglescratch, {.ui = 12 } },
// tag bindings
TAGKEYS( XK_1, 0)
TAGKEYS( XK_2, 1)
TAGKEYS( XK_3, 2)
TAGKEYS( XK_4, 3)
TAGKEYS( XK_5, 4)
TAGKEYS( XK_6, 5)
TAGKEYS( XK_7, 6)
TAGKEYS( XK_8, 7)
TAGKEYS( XK_9, 8)
// logout
/* misc */
// logout
//{ MODKEY|ShiftMask, XK_q, quit, {0} },
{ MODKEY|ShiftMask, XK_q, spawn, SHCMD("$HOME/.config/suckless/dmenu/scripts/dmenu_power")},
// restart dwm
// toogle the bar
{ MODKEY, XK_b, togglebar, {0} },
// restart dwm
{ MODKEY|ControlMask, XK_r, quit, {1} },
};

View file

@ -1,21 +1,17 @@
//Modify this file to change what commands output to your statusbar, and recompile using the make command.
static const Block blocks[] = {
/*Command*/ /*Update Interval*/ /*Update Signal*/
// {"", "$HOME/.config/suckless/dwmblocks/block_cpu", 1, 1},
{"", "$HOME/.config/suckless/dwmblocks/scripts/block_layout", 5, 5},
// {"", "$HOME/.config/suckless/dwmblocks/block_memory", 1, 1},
{"", "$HOME/.config/suckless/dwmblocks/scripts/block_battery", 10, 10},
{"", "$HOME/.config/suckless/dwmblocks/scripts/block_layout", 1, 0},
{"", "$HOME/.config/suckless/dwmblocks/scripts/block_battery", 1, 0},
{"", "$HOME/.config/suckless/dwmblocks/scripts/block_brightness", 1, 0},
{"", "$HOME/.config/suckless/dwmblocks/scripts/block_brightness", 5, 5},
{"", "$HOME/.config/suckless/dwmblocks/scripts/block_volume", 1, 0},
{"", "$HOME/.config/suckless/dwmblocks/scripts/block_clock", 1, 0},
{"", "$HOME/.config/suckless/dwmblocks/scripts/block_wifi", 1, 0},
{"", "$HOME/.config/suckless/dwmblocks/scripts/block_wifi", 10, 10},
};
//sets delimeter between status commands. NULL character ('\0') means no delimeter.

View file

@ -2,12 +2,27 @@
# Loop through all attached batteries and format the info
currntpwr=$(powerprofilesctl get)
if [ "${currntpwr}" = "performance" ]; then
pwr="perf"
pwr=" | 󰓅 Performance "
elif [ "${currntpwr}" = "balanced" ]; then
pwr="balc"
pwr=" | 󰾅 Balanced "
elif [ "${currntpwr}" = "power-saver" ]; then
pwr="pwrs"
pwr=" | 󰾆 PowerSaver "
fi
battery="/sys/class/power_supply/BAT0"
capacity=$(cat "$battery"/capacity)
echo -e " bat: $capacity% - $pwr "
for battery in /sys/class/power_supply/BAT?*; do
# If non-first battery, print a space separator.
[ -n "${capacity+x}" ] && printf " "
# Sets up the status and capacity
case "$(cat "$battery/status" 2>&1)" in
"Full") status=" 󱊣" ;;
"Discharging") status=" 󱊢" ;;
"Charging") status=" 󱊥" ;;
"Not charging") status=" 󱊥" ;;
"Unknown") status=" 󰂎" ;;
*) exit 1 ;;
esac
capacity="$(cat "$battery/capacity" 2>&1)"
# Will make a warn variable if discharging and low
[ "$status" = "󰂎" ] && [ "$capacity" -le 100 ] && warn=""
# Prints the info
printf "%s%s%d%%%s" "$status" "$warn " "$capacity" "$pwr"; unset warn
done && printf "\\n"

View file

@ -1,4 +1,10 @@
#!/usr/bin/env bash
#!/bin/bash
brt=$(xbacklight -get)
echo " bri: ${brt%.*}% "
if [ "$brt" = "100.000000" ]; then
icon="󰃠"
elif [ "$brt" \> "50%.*" ]; then
icon="󰃟"
elif [ "$brt" \< "49%.*" ]; then
icon="󰃞"
fi
echo " $icon ${brt%.*}% "

View file

@ -1,4 +1,4 @@
#!/bin/bash
date="$(date +%d/%m/%Y)"
clock="$(date +%R:%S)"
echo " dte: $date - $clock "
date="$(date +%d/%m/%y)"
clock="$(date +%R)"
echo " 󰸗 $date | 󰥔 $clock "

View file

@ -1,3 +0,0 @@
#!/bin/bash
usage=$(top -b -n1 | grep "Cpu(s)" | awk '{print $2 + $4}')
echo -e "CPU: [${usage%.*}%] "

View file

@ -1,3 +1,3 @@
#!/bin/bash
layout=$(setxkbmap -query | grep -oP 'layout:\s*\K\w+')
echo "key: $layout "
layout=$(setxkbmap -query | grep -oP 'layout:\s*\K\w+');
echo "󰥻 $layout " | tr '[:lower:]' '[:upper:]';

View file

@ -1,3 +0,0 @@
#!/bin/bash
mem="$(free -h | awk '/^Mem:/ {print $3 "/" $2}')"
echo -e " RAM: [$mem] "

View file

@ -1,5 +1,14 @@
#!/bin/bash
# Prints the current volume or 🔇 if muted.
[ $(pamixer --get-mute) = true ] && echo " vol: mut " && exit
[ "$(pamixer --get-mute)" = true ] && echo "󰕿x" && exit
vol="$(pamixer --get-volume)"
echo " vol: $vol% "
if [ "$vol" -gt "50" ]; then
icon="󰕾"
elif [ "$vol" -gt "10" ]; then
icon="󰖀"
elif [ "$vol" -gt "0" ]; then
icon="󰕿"
else
echo "󰕿x" && exit
fi
echo -e " $icon $vol% "

View file

@ -3,9 +3,9 @@ constate=$(nmcli dev | grep wifi | sed 's/ \{2,\}/|/g' | cut -d '|' -f3 | head -
currentwfi=$(nmcli dev | grep wifi | sed 's/ \{2,\}/|/g' | cut -d '|' -f4 | head -1)
if [ "$constate" = "disconnected" ]; then
echo " wfi: disc"
echo " 󰤮 "
elif [ "$constate" = "connected" ]; then
echo " wfi: $currentwfi"
echo " 󰤥 $currentwfi"
else
echo " wfi: disc"
echo " 󰤮 "
fi

View file

@ -1,3 +0,0 @@
herbe
config.h
.ccls-cache

View file

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2020 Samuel Dudík
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -5,9 +5,6 @@ CC ?= cc
all: herbe
config.h: config.def.h
cp config.def.h config.h
herbe: herbe.c config.h
$(CC) herbe.c $(CFLAGS) -o herbe

View file

@ -1,139 +0,0 @@
# 🌱 herbe
> Daemon-less notifications without D-Bus. Minimal and lightweight.
<p align="center">
<img src="https://user-images.githubusercontent.com/24730635/90975811-cd62fd00-e537-11ea-9169-92e68a71d0a0.gif" />
</p>
## Features
* Under 200 lines of code
* Doesn't run in the background, just displays the notification and exits
* No external dependencies except Xlib and Xft
* Configurable through `config.h` or Xresources ([using this patch](https://github.com/dudik/herbe/pull/11))
* [Actions support](#actions)
* Extensible through [patches](https://github.com/dudik/herbe/pulls?q=is%3Aopen+is%3Apr+label%3Apatch)
## Table of contents
* [Usage](#usage)
* [Patches](#patches)
* [Dismiss a notification](#dismiss-a-notification)
* [Actions](#actions)
* [Newlines](#newlines)
* [Multiple notifications](#multiple-notifications)
* [Notifications don't show up](#notifications-dont-show-up)
* [Installation](#installation)
* [Packages](#packages)
* [Dependencies](#dependencies)
* [Build](#build)
* [Configuration](#configuration)
* [Contribute](#contribute)
## Usage
### Patches
[List of available patches](https://github.com/dudik/herbe/pulls?q=is%3Aopen+is%3Apr+label%3Apatch)
To create a new patch you'll have to open a pull request with your changes. Append `.diff` to the pull request URL to get a downloadable diff file. Don't forget to prefix the title with `patch:` and to apply the `patch` label to it. For inspiration, look at [my Xresources patch](https://github.com/dudik/herbe/pull/11). Thank you.
_Note: This patching method was heavily inspired by [dylan's sowm](https://github.com/dylanaraps/sowm)._
### Dismiss a notification
A notification can be dismissed either by clicking on it with `DISMISS_BUTTON` (set in config.h, defaults to left mouse button) or sending a `SIGUSR1` signal to it:
```shell
$ pkill -SIGUSR1 herbe
```
Dismissed notifications return exit code 2.
### Actions
Action is a piece of shell code that runs when a notification gets accepted. Accepting a notification is the same as dismissing it, but you have to use either `ACTION_BUTTON` (defaults to right mouse button) or the `SIGUSR2` signal.
An accepted notification always returns exit code 0. To specify an action:
```shell
$ herbe "Notification body" && echo "This is an action"
```
Where everything after `&&` is the action and will get executed after the notification gets accepted.
### Newlines
Every command line argument gets printed on a separate line by default e.g.:
```shell
$ herbe "First line" "Second line" "Third line" ...
```
You can also use `\n` e.g. in `bash`:
```shell
$ herbe $'First line\nSecond line\nThird line'
```
But by default `herbe` prints `\n` literally:
```shell
$ herbe "First line\nStill the first line"
```
Output of other programs will get printed correctly, just make sure to escape it (so you don't end up with every word on a separate line):
```shell
$ herbe "$(ps axch -o cmd:15,%cpu --sort=-%cpu | head)"
```
### Multiple notifications
Notifications are put in a queue and shown one after another in order of creation (first in, first out). They don't overlap and each one is shown for its entire duration.
### Notifications don't show up
Most likely a running notification got terminated forcefully (SIGKILL or any uncaught signal) which caused the semaphore not getting unlocked. First, kill any `herbe` instance that is stuck:
```shell
$ pkill -SIGKILL herbe
```
Then just call `herbe` without any arguments:
```shell
$ herbe
```
Notifications should now show up as expected.
Don't ever send any signals to `herbe` except these:
```shell
# same as pkill -SIGTERM herbe, terminates every running herbe process
$ pkill herbe
$ pkill -SIGUSR1 herbe
$ pkill -SIGUSR2 herbe
```
And you should be fine. That's all you really need to interact with `herbe`.
## Installation
### Packages
[![Packaging status](https://repology.org/badge/vertical-allrepos/herbe.svg)](https://repology.org/project/herbe/versions)
[OpenBSD patch](https://github.com/dudik/herbe/pull/4)
[FreeBSD patch](https://github.com/dudik/herbe/pull/16)
[Wayland port](https://github.com/muevoid/Wayherb) by [muevoid](https://github.com/muevoid)
**Only the [herbe-git AUR package](https://aur.archlinux.org/packages/herbe-git/) is maintained by me.**
### Dependencies
* X11 (Xlib)
* Xft
The names of packages are different depending on which distribution you use.
For example, if you use [Void Linux](https://voidlinux.org/) you will have to install these dependencies:
```shell
sudo xbps-install base-devel libX11-devel libXft-devel
```
### Build
```shell
git clone https://github.com/dudik/herbe
cd herbe
sudo make install
```
`make install` requires root privileges because it copies the resulting binary to `/usr/local/bin`. This makes `herbe` accessible globally.
You can also use `make clean` to remove the binary from the build folder, `sudo make uninstall` to remove the binary from `/usr/local/bin` or just `make` to build the binary locally.
## Configuration
herbe is configured at compile-time by editing `config.h`. Every option should be self-explanatory. There is no `height` option because height is determined by font size and text padding.
[Xresources patch](https://github.com/dudik/herbe/pull/11)
## Contribute
If you want to report a bug or you have a feature request, feel free to [open an issue](https://github.com/dudik/herbe/issues).
## Projects with herbe integration
- [qutebrowser](https://qutebrowser.org/) supports showing web notifications via herbe, via the `content.notifications.presenter` setting.

View file

@ -3,10 +3,10 @@ static const char *border_color = "#cc241d";
static const char *font_color = "#fbf1c7";
static const char *font_pattern = "mononoki Nerd Font Mono:size=10";
static const unsigned line_spacing = 5;
static const unsigned int padding = 15;
static const unsigned int padding = 10;
static const unsigned int width = 450;
static const unsigned int border_size = 2;
static const unsigned int width = 400;
static const unsigned int border_size = 1;
static const unsigned int pos_x = 30;
static const unsigned int pos_y = 60;

View file

@ -13,10 +13,10 @@ static const char *colorname[NUMCOLS] = {
static const int failonclear = 1;
/* default message */
static const char * message = "This device is locked\neven if you manage to unlock it\nyou wont know how to use it";
static const char * message = "";
/* text color */
static const char * text_color = "#d4c4a1";
static const char * text_color = "#1d2021";
/* text size (must be a valid size) */
static const char * font_name = "mtx";

View file

@ -1,5 +1,3 @@
/* See LICENSE file for copyright and license details. */
/*
* appearance
*

View file

@ -1,15 +0,0 @@
# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run.
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
#
XDG_DESKTOP_DIR="$HOME/temporal"
XDG_DOWNLOAD_DIR="$HOME/downloads"
XDG_TEMPLATES_DIR="$HOME/documents/templates"
XDG_PUBLICSHARE_DIR="$HOME/public"
XDG_DOCUMENTS_DIR="$HOME/documents"
XDG_MUSIC_DIR="$HOME/music"
XDG_PICTURES_DIR="$HOME/pictures"
XDG_VIDEOS_DIR="$HOME/videos"

View file

@ -31,12 +31,9 @@ fi
### ENVIRONMENT VARIABLES
export MOZ_USE_XINPUT2=1
export EDITOR="emacsclient -t -a ''" # $EDITOR use Emacs in terminal
export VISUAL="emacsclient -c -a emacs" # $VISUAL use Emacs in GUI mode
export XDG_DATA_HOME="${XDG_DATA_HOME:="$HOME/.local/share"}"
export XDG_CACHE_HOME="${XDG_CACHE_HOME:="$HOME/.cache"}"
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:="$HOME/.config"}"
export QT_QPA_PLATFORMTHEME=qt5ct # Qt theeming stuff
# start window manager / desktop environment
exec dwm