├── out.jpg ├── rofi ├── config └── nord.rasi ├── mpd ├── database ├── state └── mpd.conf ├── 2020-09-13_11-49.png ├── scripts ├── mute ├── lower ├── raise ├── halt ├── pdfs ├── dots └── devour ├── 2020-10-01-133007_1366x768_scrot.png ├── nvim ├── init.lua ├── lua │ ├── colorscheme.lua │ ├── files.lua │ ├── options.lua │ ├── plugins.lua │ └── lsp.lua └── plugin │ └── packer_compiled.lua ├── README.md ├── polybar ├── launch.sh └── config ├── bspwm └── bspwmrc ├── kitty.conf ├── ncmpcpp └── config ├── picom └── picom.conf ├── tmux.conf ├── zshrc ├── dunst └── dunstrc ├── nixos └── configuration.nix ├── sxhkd └── sxhkdrc ├── emacs └── init.el └── i3 ├── config └── config~ /out.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoomanist/dotfiles/HEAD/out.jpg -------------------------------------------------------------------------------- /rofi/config: -------------------------------------------------------------------------------- 1 | rofi.theme: /home/ford/.local/share/rofi/themes/nord.rasi 2 | -------------------------------------------------------------------------------- /mpd/database: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoomanist/dotfiles/HEAD/mpd/database -------------------------------------------------------------------------------- /2020-09-13_11-49.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoomanist/dotfiles/HEAD/2020-09-13_11-49.png -------------------------------------------------------------------------------- /scripts/mute: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | amixer -q sset Master,0 toggle 4 | notify-send "toggle mute" 5 | -------------------------------------------------------------------------------- /scripts/lower: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | amixer -q sset Master,0 5- unmute 4 | notify-send "volume down" 5 | -------------------------------------------------------------------------------- /scripts/raise: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | 4 | amixer -q sset Master,0 5+ unmute 5 | notify-send "volume up" 6 | -------------------------------------------------------------------------------- /2020-10-01-133007_1366x768_scrot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hoomanist/dotfiles/HEAD/2020-10-01-133007_1366x768_scrot.png -------------------------------------------------------------------------------- /scripts/halt: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | answer=$(echo -e "Yes\nNo" | rofi -dmenu -p "you want to halt?" -i) 4 | 5 | [[ $answer == "Yes" ]] && sudo shutdown now 6 | -------------------------------------------------------------------------------- /nvim/init.lua: -------------------------------------------------------------------------------- 1 | vim.g.mapleader = ";" 2 | vim.g.maplocalleader = ";" 3 | require("options") 4 | require("lsp") 5 | require("plugins") 6 | require("colorscheme") 7 | require("files") 8 | -------------------------------------------------------------------------------- /scripts/pdfs: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | book=$(cd ~/Documents/books && ls | find -iname '*.pdf' | rofi -dmenu -l 10 -i -p "which book?" | xargs realpath) 4 | 5 | [[ -z $book ]] && exit 6 | zathura $book 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # dotfiles 2 | my unix dotfiles collected over 2 years 3 | 4 | # what i use 5 | - Editor: Neovim(configured using lua) 6 | - DE: currently using GNOME 7 | - Terminal: Alacritty 8 | - Font: Fira Code 9 | - Shell: Fish 10 | -------------------------------------------------------------------------------- /nvim/lua/colorscheme.lua: -------------------------------------------------------------------------------- 1 | local colorscheme = 'gruvbox' 2 | 3 | local is_ok, _ = pcall(vim.cmd, "colorscheme " .. colorscheme) 4 | if not is_ok then 5 | vim.notify('colorscheme ' .. colorscheme .. ' not found!') 6 | return 7 | end 8 | 9 | -------------------------------------------------------------------------------- /polybar/launch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Terminate already running bar instances 4 | killall -q polybar 5 | 6 | # Wait until the processes have been shut down 7 | while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done 8 | 9 | # Launch Polybar, using default config location ~/.config/polybar/config 10 | polybar panel & 11 | 12 | 13 | echo "Polybar launched..." 14 | -------------------------------------------------------------------------------- /scripts/dots: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | i3=~/.config/i3/config 4 | vim=~/.config/nvim/init.vim 5 | picom=~/.config/picom/picom.conf 6 | polybar=~/.config/polybar/config 7 | tmux=~/.tmux.conf 8 | options="$i3\n$vim\n$tmux\n$picom\n$polybar" 9 | 10 | adress=$(echo -e $options | rofi -dmenu -l 10 -i -p "dotfiles") 11 | 12 | echo $adress 13 | [[ -z $adress ]] && exit 14 | 15 | kitty -e nvim $adress 16 | -------------------------------------------------------------------------------- /nvim/lua/files.lua: -------------------------------------------------------------------------------- 1 | require('telescope').setup{ 2 | defaults = { 3 | preview = false, 4 | }, 5 | pickers = { 6 | find_files = { 7 | theme = "dropdown", 8 | } 9 | }, 10 | } 11 | local builtin = require('telescope.builtin') 12 | vim.keymap.set('n', 'ff', builtin.find_files, {}) 13 | vim.keymap.set('n', 'fg', builtin.live_grep, {}) 14 | vim.keymap.set('n', 'fb', builtin.buffers, {}) 15 | vim.keymap.set('n', 'fh', builtin.help_tags, {}) 16 | -------------------------------------------------------------------------------- /bspwm/bspwmrc: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | nitrogen --restore 3 | setxkbmap -layout us,ir -option 'grp:alt_shift_toggle' 4 | pgrep -x sxhkd > /dev/null || sxhkd & 5 | ~/.config/polybar/launch.sh 6 | picom & 7 | xset b off 8 | xrdb -merge ~/.Xresources 9 | urxvtd & 10 | 11 | bspc monitor -d 1 2 3 4 5 6 7 8 9 10 12 | 13 | bspc config border_width 0 14 | bspc config window_gap 15 15 | 16 | bspc config split_ratio 0.52 17 | bspc config borderless_monocle true 18 | bspc config gapless_monocle true 19 | 20 | -------------------------------------------------------------------------------- /scripts/devour: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Hides your terminal window before launching an external program and unhides it after quitting. 4 | # Dependencies: sed, xdo 5 | # Usage: devour CMD/ALIAS ... SAFE FILE ... 6 | # devour CMD/ALIAS ... -- SAFE FILE/UNSAFE FILE 7 | 8 | ARGS=$* 9 | CMD="${ARGS%% -- *}" 10 | FILE="${ARGS##* -- }" 11 | [ "$CMD" != "$FILE" ] && SAFEFILE=$(echo "$FILE" | sed 's/ /\\ /g') 12 | WID=$(xdo id) 13 | 14 | xdo hide 15 | $SHELL -i -c "$CMD $SAFEFILE > /dev/null 2>&1; exit" 16 | xdo show "$WID" 17 | -------------------------------------------------------------------------------- /mpd/state: -------------------------------------------------------------------------------- 1 | sw_volume: 88 2 | audio_device_state:1:my_fifo 3 | audio_device_state:1:pulse audio 4 | state: pause 5 | current: 5 6 | time: 119.182000 7 | random: 0 8 | repeat: 0 9 | single: 0 10 | consume: 0 11 | crossfade: 0 12 | mixrampdb: 0.000000 13 | mixrampdelay: -1.000000 14 | playlist_begin 15 | 0:12. Steven Price - Aningaaq (128).mp3 16 | 1:13. Marc Streitenfeld - Earth (128).mp3 17 | 2:3624_Shajarian-زبان-آتش-استاد-شجریان.mp3 18 | 3:28. Ryan Amon - Elysium (128).mp3 19 | 4:Inception (Music From The Motion Picture) CD 1 TRACK 12 (128.mp3 20 | 5:Interstellar (Original Motion Picture Soundtrack) (Deluxe Ve.mp3 21 | playlist_end 22 | -------------------------------------------------------------------------------- /kitty.conf: -------------------------------------------------------------------------------- 1 | 2 | font_family iosevka 3 | bold_font auto 4 | italic_font auto 5 | bold_italic_font auto 6 | font_size 11.0 7 | 8 | background_opacity 0.5 9 | 10 | window_padding_width 4 11 | 12 | background #2e3440 13 | foreground #d8dee9 14 | cursor #d8dee9 15 | cursor_text_color #2e3440 16 | color0 #3b4252 17 | color8 #4c566a 18 | color1 #bf616a 19 | color9 #bf616a 20 | color2 #a3be8c 21 | color10 #a3be8c 22 | color3 #ebcb8b 23 | color11 #ebcb8b 24 | color4 #81a1c1 25 | color12 #81a1c1 26 | color5 #b48ead 27 | color13 #b48ead 28 | color6 #88c0d0 29 | color14 #8fbcbb 30 | color7 #e5e9f0 31 | color15 #eceff4 32 | -------------------------------------------------------------------------------- /ncmpcpp/config: -------------------------------------------------------------------------------- 1 | visualizer_fifo_path = "/tmp/mpd.fifo" 2 | visualizer_output_name = "my_fifo" 3 | visualizer_sync_interval = "30" 4 | visualizer_in_stereo = "yes" 5 | visualizer_type = "spectrum" 6 | execute_on_song_change = notify-send "Now Playing" "$(mpc --format '%title% \n%artist% - %album%' current)" 7 | header_visibility = "no" 8 | header_window_color = "default" 9 | playlist_shorten_total_times = "yes" 10 | volume_color = "default" 11 | state_line_color = "black" 12 | progressbar_look = "⠒⠒⠐" 13 | progressbar_color = "black" 14 | statusbar_visibility = "no" 15 | statusbar_color = "default" 16 | song_status_format = "{{%a{ - %t}}|{ - %f}{ - %b{ (%y)}}}" 17 | song_library_format = "{{%a - %t}|{%f}}{$R%l}" 18 | visualizer_look = "●┃" 19 | -------------------------------------------------------------------------------- /picom/picom.conf: -------------------------------------------------------------------------------- 1 | blur-method = "dual_kawase"; 2 | blur-strenght=19; 3 | blur-kern = "3x3box"; 4 | blur-background-exclude = [ 5 | "window_type = 'dock'", 6 | "window_type = 'desktop'", 7 | "_GTK_FRAME_EXTENTS@:c" 8 | ]; 9 | backend = "glx"; 10 | vsync = true 11 | mark-wmwin-focused = true; 12 | mark-ovredir-focused = true; 13 | detect-rounded-corners = true; 14 | detect-client-opacity = true; 15 | refresh-rate = 0 16 | 17 | detect-transient = true 18 | detect-client-leader = true 19 | use-damage = true 20 | log-level = "warn"; 21 | wintypes: 22 | { 23 | tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; }; 24 | dock = { shadow = false; } 25 | dnd = { shadow = false; } 26 | popup_menu = { opacity = 0.8; } 27 | dropdown_menu = { opacity = 0.8; } 28 | }; 29 | -------------------------------------------------------------------------------- /tmux.conf: -------------------------------------------------------------------------------- 1 | unbind C-b 2 | set-option -g prefix C-a 3 | bind-key C-a send-prefix 4 | bind | split-window -h 5 | bind - split-window -v 6 | unbind '"' 7 | unbind % 8 | bind r source-file ~/.tmux.conf 9 | bind -n M-Left select-pane -L 10 | bind -n M-Right select-pane -R 11 | bind -n M-Up select-pane -U 12 | bind -n M-Down select-pane -D 13 | set -g mouse on 14 | set-option -g allow-rename off 15 | set-option -g status-position top 16 | # status bar colors 17 | set -g status-bg default 18 | set -g status-fg white 19 | # Status 20 | set -g status-left '' 21 | set -g status-right '#[bg=blue,fg=black,bold] #(date +%a\ %I:%M) #[bg=green,fg=black,bold] Battery:#(acpi --battery | cut -d, -f2) ' 22 | setw -g window-status-current-format '#[fg=black,bold,bg=green,bold] #I #[fg=green,bold,bg=black,bold] #W ' 23 | setw -g window-status-format '#[fg=green,bold,bg=black,bold] #I #[fg=green,bold,bg=black,bold] #W ' 24 | -------------------------------------------------------------------------------- /nvim/lua/options.lua: -------------------------------------------------------------------------------- 1 | vim.opt.clipboard = 'unnamedplus' 2 | vim.opt.mouse = 'a' 3 | vim.opt.completeopt = {'menu', 'menuone', 'noselect'} 4 | vim.opt.tabstop = 4 5 | vim.opt.softtabstop = 4 6 | vim.opt.shiftwidth = 4 7 | vim.opt.expandtab = true 8 | vim.opt.number = true 9 | vim.opt.relativenumber = true 10 | vim.opt.cursorline = true 11 | vim.opt.splitbelow = true 12 | vim.opt.splitright = true 13 | vim.opt.termguicolors = true 14 | vim.opt.showmode = false 15 | vim.opt.smartindent = true 16 | 17 | vim.opt.wrap = false 18 | 19 | vim.opt.swapfile = false 20 | vim.opt.backup = false 21 | vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir" 22 | vim.opt.undofile = true 23 | 24 | vim.opt.hlsearch = false 25 | vim.opt.incsearch = true 26 | 27 | vim.opt.termguicolors = true 28 | 29 | vim.opt.scrolloff = 8 30 | vim.opt.signcolumn = "yes" 31 | vim.opt.isfname:append("@-@") 32 | 33 | vim.opt.updatetime = 50 34 | 35 | vim.opt.colorcolumn = "80" 36 | 37 | -------------------------------------------------------------------------------- /mpd/mpd.conf: -------------------------------------------------------------------------------- 1 | # Recommended location for database 2 | db_file "~/.config/mpd/database" 3 | 4 | # Logs to systemd journal 5 | log_file "syslog" 6 | 7 | # The music directory is by default the XDG directory, uncomment to amend and choose a different directory 8 | music_directory "~/Music" 9 | 10 | # Uncomment to refresh the database whenever files in the music_directory are changed 11 | auto_update "yes" 12 | 13 | # Uncomment to enable the functionalities 14 | #playlist_directory "~/.config/mpd/playlists" 15 | #pid_file "~/.config/mpd/pid" 16 | state_file "~/.config/mpd/state" 17 | #sticker_file "~/.config/mpd/sticker.sql" 18 | zeroconf_enabled "yes" 19 | audio_output { 20 | type "fifo" 21 | name "my_fifo" 22 | path "/tmp/mpd.fifo" 23 | format "44100:16:2" 24 | } 25 | audio_output { 26 | type "pulse" 27 | name "pulse audio" 28 | } 29 | -------------------------------------------------------------------------------- /zshrc: -------------------------------------------------------------------------------- 1 | ## Hooman's zshrc 2 | # path 3 | export PATH=/home/hooman/scripts:$PATH 4 | 5 | # alias 6 | alias gis="git status" 7 | alias gcm="git commit -m" 8 | alias gia="git add -A" 9 | alias todo="vim ~/todo" 10 | alias v="nvim" 11 | alias vim="nvim" 12 | alias n="ncmpcpp" 13 | alias ls="ls -lta --color=tty" 14 | # antigen 15 | source ~/antigen.zsh 16 | antigen use oh-my-zsh 17 | antigen bundle zsh-users/zsh-syntax-highlighting 18 | antigen bundle zsh-users/zsh-autosuggestions 19 | antigen bundle zsh-users/zsh-history-substring-search 20 | antigen apply 21 | # prompt 22 | PROMPT='%n@%M:%~ %# ' 23 | # nord tty 24 | pgrep Xorg &> /dev/null || source ~/nord-tty/nord-tty 25 | # tmux 26 | alias tmux="tmux attach -t default || tmux new -s default" 27 | # colorful man pages 28 | export LESS_TERMCAP_mb=$'\e[1;32m' 29 | export LESS_TERMCAP_md=$'\e[1;31m' 30 | export LESS_TERMCAP_me=$'\e[0m' 31 | export LESS_TERMCAP_se=$'\e[0m' 32 | export LESS_TERMCAP_so=$'\e[01;34m' 33 | export LESS_TERMCAP_ue=$'\e[0m' 34 | export LESS_TERMCAP_us=$'\e[1;4;31m' 35 | # Nix 36 | if [ -e /home/hooman/.nix-profile/etc/profile.d/nix.sh ]; then . /home/hooman/.nix-profile/etc/profile.d/nix.sh; fi 37 | -------------------------------------------------------------------------------- /rofi/nord.rasi: -------------------------------------------------------------------------------- 1 | configuration { 2 | show-icons: true; 3 | font: "Iosevka 10"; 4 | drun-display-format: "{icon} {name}"; 5 | display-run: " "; 6 | display-drun: " "; 7 | display-window: " "; 8 | modi: "window,run,drun"; 9 | } 10 | 11 | * { 12 | background-color: #2E3440; 13 | bg-alt: #3B4252; 14 | fg: #ECEFF4; 15 | 16 | nord-blue-light: #88C0D0; 17 | nord-yellow: #EBCB8B; 18 | 19 | border: 0; 20 | lines: 12; 21 | padding: 0; 22 | margin: 0; 23 | spacing: 0; 24 | } 25 | 26 | window { 27 | width: 30%; 28 | transparency: "real"; 29 | } 30 | 31 | mainbox { 32 | children: [inputbar, listview]; 33 | } 34 | 35 | listview { 36 | columns: 1; 37 | } 38 | 39 | element { 40 | padding: 12; 41 | orientation: vertical; 42 | text-color: @fg; 43 | } 44 | 45 | element selected { 46 | background-color: @bg-alt; 47 | text-color: @nord-blue-light; 48 | } 49 | 50 | inputbar { 51 | background-color: @background; 52 | children: [prompt, entry]; 53 | } 54 | 55 | prompt { 56 | enabled: true; 57 | font: "SauceCodePro Nerd Font 12"; 58 | padding: 12 0 0 12; 59 | text-color: @nord-yellow; 60 | } 61 | 62 | entry { 63 | padding: 12; 64 | text-color: @nord-yellow; 65 | } 66 | -------------------------------------------------------------------------------- /nvim/lua/plugins.lua: -------------------------------------------------------------------------------- 1 | local ensure_packer = function() 2 | local fn = vim.fn 3 | local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim' 4 | if fn.empty(fn.glob(install_path)) > 0 then 5 | fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path}) 6 | vim.cmd [[packadd packer.nvim]] 7 | return true 8 | end 9 | return false 10 | end 11 | local packer_bootstrap = ensure_packer() 12 | vim.cmd([[ 13 | augroup packer_user_config 14 | autocmd! 15 | autocmd BufWritePost plugins.lua source | PackerSync 16 | augroup end 17 | ]]) 18 | 19 | 20 | return require('packer').startup(function(use) 21 | use 'wbthomason/packer.nvim' 22 | use 'nvim-treesitter/nvim-treesitter' 23 | use 'morhetz/gruvbox' 24 | use {'numToStr/Comment.nvim', 25 | config = function() 26 | require('Comment').setup() 27 | end 28 | } 29 | use { "windwp/nvim-autopairs", 30 | config = function() require("nvim-autopairs").setup {} end 31 | } 32 | use { 'neovim/nvim-lspconfig' } 33 | use { 34 | 'VonHeikemen/lsp-zero.nvim', 35 | branch = 'v2.x', 36 | requires = { 37 | -- LSP Support 38 | {'neovim/nvim-lspconfig'}, -- Required 39 | {'williamboman/mason.nvim'}, -- Optional 40 | {'williamboman/mason-lspconfig.nvim'}, -- Optional 41 | 42 | -- Autocompletion 43 | {'hrsh7th/nvim-cmp'}, -- Required 44 | {'hrsh7th/cmp-nvim-lsp'}, -- Required 45 | {'L3MON4D3/LuaSnip'}, -- Required 46 | } 47 | } 48 | use 'ThePrimeagen/vim-be-good' 49 | use { 50 | 'nvim-telescope/telescope.nvim', tag = '0.1.2', 51 | -- or , branch = '0.1.x', 52 | requires = { {'nvim-lua/plenary.nvim'} } 53 | } 54 | if packer_bootstrap then 55 | require('packer').sync() 56 | end 57 | end) 58 | 59 | -------------------------------------------------------------------------------- /nvim/lua/lsp.lua: -------------------------------------------------------------------------------- 1 | local lsp = require("lsp-zero") 2 | 3 | lsp.preset("recommended") 4 | 5 | lsp.ensure_installed({ 6 | 'tsserver', 7 | 'rust_analyzer', 8 | 'gopls', 9 | 'pylsp', 10 | 'tailwindcss', 11 | 'clangd' 12 | }) 13 | 14 | -- Fix Undefined global 'vim' 15 | lsp.nvim_workspace() 16 | 17 | 18 | local cmp = require('cmp') 19 | local cmp_select = {behavior = cmp.SelectBehavior.Select} 20 | local cmp_mappings = lsp.defaults.cmp_mappings({ 21 | [''] = cmp.mapping.select_prev_item(cmp_select), 22 | [''] = cmp.mapping.select_next_item(cmp_select), 23 | [''] = cmp.mapping.confirm({ select = true }), 24 | [""] = cmp.mapping.complete(), 25 | }) 26 | 27 | cmp_mappings[''] = nil 28 | cmp_mappings[''] = nil 29 | 30 | lsp.setup_nvim_cmp({ 31 | mapping = cmp_mappings 32 | }) 33 | 34 | lsp.set_preferences({ 35 | suggest_lsp_servers = false, 36 | sign_icons = { 37 | error = 'E', 38 | warn = 'W', 39 | hint = 'H', 40 | info = 'I' 41 | } 42 | }) 43 | 44 | lsp.on_attach(function(client, bufnr) 45 | local opts = {buffer = bufnr, remap = false} 46 | 47 | vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts) 48 | vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts) 49 | vim.keymap.set("n", "vws", function() vim.lsp.buf.workspace_symbol() end, opts) 50 | vim.keymap.set("n", "vd", function() vim.diagnostic.open_float() end, opts) 51 | vim.keymap.set("n", "[d", function() vim.diagnostic.goto_next() end, opts) 52 | vim.keymap.set("n", "]d", function() vim.diagnostic.goto_prev() end, opts) 53 | vim.keymap.set("n", "vca", function() vim.lsp.buf.code_action() end, opts) 54 | vim.keymap.set("n", "vrr", function() vim.lsp.buf.references() end, opts) 55 | vim.keymap.set("n", "vrn", function() vim.lsp.buf.rename() end, opts) 56 | vim.keymap.set("i", "", function() vim.lsp.buf.signature_help() end, opts) 57 | end) 58 | 59 | lsp.setup() 60 | 61 | vim.diagnostic.config({ 62 | virtual_text = true 63 | }) 64 | -------------------------------------------------------------------------------- /dunst/dunstrc: -------------------------------------------------------------------------------- 1 | [global] 2 | monitor = 0 3 | follow = mouse 4 | geometry = "300x5-30+20" 5 | indicate_hidden = yes 6 | shrink = no 7 | transparency = 0 8 | notification_height = 0 9 | separator_height = 2 10 | padding = 8 11 | horizontal_padding = 8 12 | frame_width = 3 13 | frame_color = "#aaaaaa" 14 | separator_color = frame 15 | sort = yes 16 | idle_threshold = 120 17 | 18 | font = Iosevka 8 19 | line_height = 0 20 | markup = full 21 | format = "%s\n%b" 22 | alignment = left 23 | vertical_alignment = center 24 | show_age_threshold = 60 25 | word_wrap = yes 26 | ellipsize = middle 27 | 28 | ignore_newline = no 29 | stack_duplicates = true 30 | hide_duplicate_count = false 31 | 32 | show_indicators = yes 33 | icon_position = left 34 | min_icon_size = 0 35 | max_icon_size = 32 36 | icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/ 37 | sticky_history = yes 38 | history_length = 20 39 | dmenu = /usr/bin/dmenu -p dunst: 40 | browser = /usr/bin/firefox -new-tab 41 | always_run_script = true 42 | 43 | title = Dunst 44 | 45 | class = Dunst 46 | startup_notification = false 47 | verbosity = mesg 48 | corner_radius = 10 49 | ignore_dbusclose = false 50 | force_xinerama = false 51 | mouse_left_click = close_current 52 | mouse_middle_click = do_action, close_current 53 | mouse_right_click = close_all 54 | [experimental] 55 | per_monitor_dpi = false 56 | 57 | [shortcuts] 58 | 59 | close = ctrl+space 60 | close_all = ctrl+shift+space 61 | history = ctrl+grave 62 | context = ctrl+shift+period 63 | 64 | frame_color = "#E5E9F0" 65 | separator_color = "#E5E9F0" 66 | 67 | [base16_low] 68 | msg_urgency = low 69 | background = "#3B4252" 70 | foreground = "#4C566A" 71 | 72 | [base16_normal] 73 | msg_urgency = normal 74 | background = "#434C5E" 75 | foreground = "#E5E9F0" 76 | 77 | [base16_critical] 78 | msg_urgency = critical 79 | background = "#88C0D0" 80 | foreground = "#ECEFF4" 81 | -------------------------------------------------------------------------------- /nixos/configuration.nix: -------------------------------------------------------------------------------- 1 | { config, pkgs, ... }: 2 | { 3 | imports = 4 | [ 5 | ./hardware-configuration.nix 6 | ]; 7 | # bootloader 8 | boot.loader.grub.enable = true; 9 | boot.loader.grub.efiSupport = true; 10 | boot.loader.grub.device = "nodev"; 11 | boot.loader.efi.canTouchEfiVariables = true; 12 | boot.loader.efi.efiSysMountPoint = "/boot/efi"; 13 | # filesystems 14 | boot.supportedFilesystems = [ "ntfs" ]; 15 | # networking 16 | networking.hostName = "pandemonium"; 17 | networking.networkmanager.enable = true; 18 | networking.useDHCP = false; 19 | networking.interfaces.enp1s0.useDHCP = true; 20 | networking.interfaces.wlp2s0.useDHCP = true; 21 | #tor 22 | services.tor.enable = true; 23 | services.tor.client.enable = true; 24 | # timezone 25 | time.timeZone = "Asia/Tehran"; 26 | # locale 27 | i18n.defaultLocale = "en_US.UTF-8"; 28 | #xorg 29 | services.xserver = { 30 | enable = true; 31 | layout = "us, ir"; 32 | xkbOptions = "grp:alt_shift_toggle"; 33 | displayManager.lightdm.enable = true; 34 | windowManager.bspwm.enable = true; 35 | }; 36 | #sound 37 | sound.enable = true; 38 | hardware.pulseaudio.enable = true; 39 | #touchpad 40 | services.xserver.libinput.enable = true; 41 | #user 42 | users.users.hooman = { 43 | isNormalUser = true; 44 | extraGroups = [ "wheel" "network" "storage" ]; 45 | shell = pkgs.fish; 46 | }; 47 | # packages 48 | environment.systemPackages = with pkgs; [ 49 | git 50 | neovim 51 | wget 52 | firefox 53 | alacritty 54 | rofi 55 | neofetch 56 | tmux 57 | lemonbar 58 | acpi 59 | nitrogen 60 | pfetch 61 | unzip 62 | vlc 63 | tdesktop 64 | xfce.thunar 65 | xfce.thunar-volman 66 | xfce.xfconf 67 | xfce.tumbler 68 | xfce.exo 69 | xdotool 70 | wirelesstools 71 | rustup 72 | rust-analyzer 73 | ]; 74 | #fonts 75 | fonts.fonts = with pkgs; [ 76 | (nerdfonts.override { fonts = [ "FiraCode" "Iosevka" ]; }) 77 | ]; 78 | # gpg 79 | programs.mtr.enable = true; 80 | programs.gnupg.agent = { 81 | enable = true; 82 | enableSSHSupport = true; 83 | }; 84 | # using neovim nightly 85 | nixpkgs.overlays = [ 86 | (import (builtins.fetchTarball { 87 | url = https://github.com/nix-community/neovim-nightly-overlay/archive/master.tar.gz; 88 | })) 89 | ]; 90 | # version of the system 91 | system.stateVersion = "21.05"; 92 | 93 | } 94 | -------------------------------------------------------------------------------- /sxhkd/sxhkdrc: -------------------------------------------------------------------------------- 1 | # 2 | # wm independent hotkeys 3 | # 4 | 5 | # terminal emulator 6 | super + Return 7 | alacritty 8 | 9 | # program launcher 10 | super + @space 11 | rofi -show drun 12 | 13 | # make sxhkd reload its configuration files: 14 | super + Escape 15 | pkill -USR1 -x sxhkd 16 | 17 | # 18 | # bspwm hotkeys 19 | # 20 | 21 | # quit/restart bspwm 22 | super + alt + {q,r} 23 | bspc {quit,wm -r} 24 | 25 | # close and kill 26 | super + {_,shift + }q 27 | bspc node -{c,k} 28 | super + p 29 | ~/scripts/pdfs 30 | # alternate between the tiled and monocle layout 31 | super + m 32 | bspc desktop -l next 33 | 34 | # send the newest marked node to the newest preselected node 35 | super + y 36 | bspc node newest.marked.local -n newest.!automatic.local 37 | 38 | # swap the current node and the biggest window 39 | super + g 40 | bspc node -s biggest.window 41 | 42 | # 43 | # state/flags 44 | # 45 | 46 | # set the window state 47 | super + {t,shift + t,s,f} 48 | bspc node -t {tiled,pseudo_tiled,floating,fullscreen} 49 | 50 | # set the node flags 51 | super + ctrl + {m,x,y,z} 52 | bspc node -g {marked,locked,sticky,private} 53 | 54 | # 55 | # focus/swap 56 | # 57 | 58 | # focus the node in the given direction 59 | super + {_,shift + }{h,j,k,l} 60 | bspc node -{f,s} {west,south,north,east} 61 | 62 | # focus the node for the given path jump 63 | super + {p,b,comma,period} 64 | bspc node -f @{parent,brother,first,second} 65 | 66 | # focus the next/previous window in the current desktop 67 | super + {_,shift + }c 68 | bspc node -f {next,prev}.local.!hidden.window 69 | 70 | # focus the next/previous desktop in the current monitor 71 | super + bracket{left,right} 72 | bspc desktop -f {prev,next}.local 73 | 74 | # focus the last node/desktop 75 | super + {grave,Tab} 76 | bspc {node,desktop} -f last 77 | 78 | # focus the older or newer node in the focus history 79 | super + {o,i} 80 | bspc wm -h off; \ 81 | bspc node {older,newer} -f; \ 82 | bspc wm -h on 83 | 84 | # focus or send to the given desktop 85 | super + {_,shift + }{1-9,0} 86 | bspc {desktop -f,node -d} '^{1-9,10}' 87 | 88 | # 89 | # preselect 90 | # 91 | 92 | # preselect the direction 93 | super + ctrl + {h,j,k,l} 94 | bspc node -p {west,south,north,east} 95 | 96 | # preselect the ratio 97 | super + ctrl + {1-9} 98 | bspc node -o 0.{1-9} 99 | 100 | # cancel the preselection for the focused node 101 | super + ctrl + space 102 | bspc node -p cancel 103 | 104 | # cancel the preselection for the focused desktop 105 | super + ctrl + shift + space 106 | bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel 107 | 108 | # 109 | # move/resize 110 | # 111 | 112 | # expand a window by moving one of its side outward 113 | super + alt + {h,j,k,l} 114 | bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0} 115 | 116 | # contract a window by moving one of its side inward 117 | super + alt + shift + {h,j,k,l} 118 | bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0} 119 | 120 | # move a floating window 121 | super + {Left,Down,Up,Right} 122 | bspc node -v {-20 0,0 20,0 -20,20 0} 123 | -------------------------------------------------------------------------------- /emacs/init.el: -------------------------------------------------------------------------------- 1 | ;; numbers 2 | (global-display-line-numbers-mode +1) 3 | ;; disable gui 4 | (menu-bar-mode -1) 5 | (scroll-bar-mode -1) 6 | (tool-bar-mode -1) 7 | ;; indent 8 | (setq standard-indent 2) 9 | (setq-default tab-width 2) 10 | (setq-default indent-tabs-mode nil) 11 | ;; white spaces 12 | (setq show-trailing-whitespace t) 13 | (add-hook 'before-save-hook 'delete-trailing-whitespace) 14 | ;; transparency 15 | (set-frame-parameter (selected-frame) 'alpha '(75 75)) 16 | (add-to-list 'default-frame-alist '(alpha 75 75) ) 17 | ;; font 18 | (add-to-list 'default-frame-alist '(font . "Iosevka 8")) 19 | ;; repositories 20 | (require 'package) 21 | (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t) 22 | (package-initialize) 23 | ;; use packages 24 | (package-install 'use-package) 25 | ;; doom themes (tomorrow night) 26 | (use-package doom-themes 27 | :ensure t 28 | :init (load-theme 'doom-nord t)) 29 | ;; colorful pranthesis 30 | (use-package rainbow-delimiters 31 | :ensure t 32 | :init 33 | (progn 34 | (add-hook 'prog-mode-hook 'rainbow-delimiters-mode))) 35 | ;; neotree 36 | (use-package neotree 37 | :bind (("C-," . neotree-toggle)) 38 | :config 39 | (setq neo-theme (if (display-graphic-p) 'arrow))) 40 | ;; evil mode (vim key combo's) 41 | (use-package evil 42 | :ensure t 43 | :init 44 | (evil-mode 1)) 45 | ;;;; codeing 46 | ;; company 47 | (use-package company 48 | :ensure t 49 | :bind (("C-" . company-complete)) 50 | :config 51 | (global-company-mode)) 52 | ;; go-mode 53 | (use-package go-mode 54 | :ensure t 55 | :bind ( 56 | :map go-mode-map 57 | ("C-c C-r" . go-remove-unused-imports) 58 | ("C-c C-g" . go-goto-imports) 59 | ("C-c C-f" . gofmt) 60 | ("C-c C-k" . godoc)) 61 | :config 62 | (progn 63 | (unless (member "/usr/local/go/bin" (split-string (getenv "PATH") ":")) 64 | (setenv "PATH" (concat "/home/hooman/go/bin/" (getenv "PATH")))) 65 | (setenv "GOPATH" (concat (getenv "HOME") "/go")) 66 | ;; (setq gofmt-command "/usr/local/go/bin/gofmt") 67 | (add-hook 'before-save-hook 'gofmt-before-save))) 68 | ;; company-go 69 | (use-package company-go 70 | :after go-mode 71 | :ensure t 72 | :defer t 73 | :config 74 | (push 'company-go company-backends)) 75 | (require 'company) 76 | (require 'company-go) 77 | ;; ivy 78 | (use-package ivy 79 | :ensure t 80 | :config 81 | (ivy-mode +1)) 82 | ;; doom modeline 83 | (use-package doom-modeline 84 | :ensure t 85 | :init (doom-modeline-mode 1) 86 | :config 87 | (setq doom-modeline-height 20)) 88 | ;; added automatical 89 | (custom-set-variables 90 | ;; custom-set-variables was added by Custom. 91 | ;; If you edit it by hand, you could mess it up, so be careful. 92 | ;; Your init file should contain only one such instance. 93 | ;; If there is more than one, they won't work right. 94 | '(package-selected-packages '(doom-themes use-package))) 95 | (custom-set-faces 96 | ;; custom-set-faces was added by Custom. 97 | ;; If you edit it by hand, you could mess it up, so be careful. 98 | ;; Your init file should contain only one such instance. 99 | ;; If there is more than one, they won't work right. 100 | ) 101 | -------------------------------------------------------------------------------- /polybar/config: -------------------------------------------------------------------------------- 1 | 2 | # hooman's polybar config 3 | 4 | 5 | [colors] 6 | background = #282c34 7 | foreground = #d8d8d8 8 | base00 = #2E3440 9 | base01 = #3B4252 10 | base02 = #434C5E 11 | base03 = #98c379 12 | base04 = #D8DEE9 13 | base05 = #E5E9F0 14 | base06 = #ECEFF4 15 | base07 = #8FBCBB 16 | base08 = #B48EAD 17 | base09 = #D08770 18 | base0A = #EBCB8B 19 | base0B = #A3BE8C 20 | base0C = #88C0D0 21 | base0D = #B48EAD 22 | base0E = #B48EAD 23 | base0F = #5E81AC 24 | primary = #ffb52a 25 | secondary = #e60053 26 | alert = #bd2c40 27 | 28 | [bar/panel] 29 | ;monitor = ${env:MONITOR:HDMI-1} 30 | width = 100% 31 | height = 25 32 | fixed-center = true 33 | radius=6.0 34 | background = ${colors.background} 35 | foreground = ${colors.foreground} 36 | line-size = 3 37 | line-color = #f00 38 | 39 | border-size = 6 40 | border-color = #00000000 41 | 42 | padding-left = 0 43 | padding-right = 2 44 | module-margin-left = 1 45 | module-margin-right = 2 46 | 47 | 48 | font-0 = iosevka:pixelsize=9;1 49 | font-1 = siji:pixelsize=12;1 50 | 51 | modules-left = i3 xwindow 52 | modules-right = memory cpu xkeyboard wlan sound eth battery date 53 | 54 | tray-position = none 55 | tray-padding = 2 56 | ;tray-background = #0063ff 57 | module-margin = 2 58 | 59 | ;wm-restack = bspwm 60 | ;wm-restack = i3 61 | 62 | 63 | ;scroll-up = bspwm-desknext 64 | ;scroll-down = bspwm-deskprev 65 | 66 | ;scroll-up = i3wm-wsnext 67 | ;scroll-down = i3wm-wsprev 68 | 69 | cursor-click = pointer 70 | cursor-scroll = ns-resize 71 | 72 | [module/xwindow] 73 | type = internal/xwindow 74 | label = %title:0:30:...% 75 | 76 | [module/xkeyboard] 77 | type = internal/xkeyboard 78 | blacklist-0 = num lock 79 | 80 | format-prefix = " " 81 | format-prefix-foreground = ${colors.foreground} 82 | 83 | label-layout = %layout% 84 | 85 | label-indicator-padding = 2 86 | label-indicator-margin = 1 87 | label-indicator-background = ${colors.secondary} 88 | [module/i3] 89 | type = internal/i3 90 | format = 91 | index-sort = true 92 | wrapping-scroll = false 93 | 94 | ; Only show workspaces on the same output as the bar 95 | ;pin-workspaces = true 96 | 97 | label-mode-padding = 2 98 | label-mode-foreground = #000 99 | label-mode-background = ${colors.primary} 100 | 101 | ; focused = Active workspace on focused monitor 102 | label-focused = %name% 103 | label-focused-background = ${colors.base03} 104 | label-focused-foreground = #212733 105 | label-focused-padding = 2 106 | 107 | ; unfocused = Inactive workspace on any monitor 108 | label-unfocused = %name% 109 | label-unfocused-padding = 2 110 | 111 | ; visible = Active workspace on unfocused monitor 112 | label-visible = %name% 113 | label-visible-background = ${self.label-focused-background} 114 | label-visible-padding = ${self.label-focused-padding} 115 | 116 | ; urgent = Workspace with urgency hint set 117 | label-urgent = %name% 118 | label-urgent-background = ${colors.secondary} 119 | label-urgent-padding = 2 120 | 121 | ; Separator in between workspaces 122 | ; label-separator = | 123 | 124 | [module/cpu] 125 | type = internal/cpu 126 | interval = 2 127 | format-prefix = " " 128 | format-prefix-foreground = ${colors.foreground} 129 | label = %percentage:2%% 130 | 131 | [module/memory] 132 | type = internal/memory 133 | interval = 2 134 | format-prefix = " " 135 | format-prefix-foreground = ${colors.foreground} 136 | label = %percentage_used%% 137 | 138 | [module/wlan] 139 | type = internal/network 140 | interface = wlp2s0 141 | interval = 3.0 142 | 143 | format-connected = 144 | label-connected = %essid% 145 | 146 | format-disconnected = 147 | 148 | ramp-signal-0 =  149 | ramp-signal-1 =  150 | ramp-signal-2 =  151 | ramp-signal-3 =  152 | ramp-signal-4 =  153 | ramp-signal-foreground = ${colors.foreground} 154 | 155 | [module/eth] 156 | type = internal/network 157 | interface = wg 158 | interval = 3.0 159 | 160 | format-connected-prefix = " " 161 | format-connected-prefix-foreground = ${colors.foreground} 162 | label-connected = %local_ip% 163 | 164 | format-disconnected = 165 | ;label-disconnected = %ifname% disconnected 166 | ;label-disconnected-foreground = ${colors.foreground-alt} 167 | 168 | [module/date] 169 | type = internal/date 170 | interval = 5 171 | 172 | date = 173 | date-alt = " %Y-%m-%d" 174 | 175 | time = %H:%M 176 | time-alt = %H:%M:%S 177 | 178 | format-prefix =  179 | format-prefix-foreground = ${colors.foreground} 180 | 181 | label = %date% %time% 182 | 183 | [module/sound] 184 | type = internal/alsa 185 | format-volume = 186 | label-volume = %percentage%% 187 | format-muted-prefix = " " 188 | label-muted = MUTE 189 | 190 | ramp-volume-0 =  191 | ramp-volume-1 =  192 | ramp-volume-2 =  193 | ramp-volume-3 =  194 | ramp-volume-4 =  195 | ramp-volume-5 =  196 | ramp-volume-6 =  197 | 198 | [module/battery] 199 | type = internal/battery 200 | battery = BAT0 201 | adapter = ADP0 202 | full-at = 98 203 | 204 | format-charging = 205 | format-discharging = 206 | 207 | 208 | format-full-prefix = " " 209 | format-full-prefix-foreground = ${colors.foreground} 210 | 211 | ramp-capacity-0 =  212 | ramp-capacity-1 =  213 | ramp-capacity-2 =  214 | ramp-capacity-foreground = ${colors.foreground} 215 | 216 | animation-charging-0 =  217 | animation-charging-1 =  218 | animation-charging-2 =  219 | animation-charging-foreground = ${colors.foreground} 220 | animation-charging-framerate = 750 221 | [settings] 222 | screenchange-reload = true 223 | ;compositing-background = xor 224 | ;compositing-background = screen 225 | ;compositing-foreground = source 226 | ;compositing-border = over 227 | ;pseudo-transparency = false 228 | 229 | [global/wm] 230 | margin-top = 0 231 | margin-bottom = 0 232 | 233 | -------------------------------------------------------------------------------- /i3/config: -------------------------------------------------------------------------------- 1 | 2 | # hooman i3 config 3 | # i3 config file (v4) 4 | 5 | set $mod Mod4 6 | set $term alacritty 7 | font pango:monospace 8 8 | 9 | exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork 10 | # dunst 11 | exec_always dunst 12 | 13 | set $nord0 #2E3440 14 | set $nord1 #3B4252 15 | set $nord2 #434C5E 16 | set $nord3 #4C566A 17 | set $nord4 #D8DEE9 18 | set $nord5 #E5E9F0 19 | set $nord6 #ECEFF4 20 | set $nord7 #8FBCBB 21 | set $nord8 #88C0D0 22 | set $nord9 #81A1C1 23 | set $nord10 #5E81AC 24 | set $nord11 #BF616A 25 | set $nord12 #D08770 26 | set $nord13 #EBCB8B 27 | set $nord14 #A3BE8C 28 | set $nord15 #B48EAD 29 | 30 | 31 | # Use amixer to adjust volume in ALSA. 32 | bindsym XF86AudioRaiseVolume exec --no-startup-id $HOME/scripts/raise 33 | bindsym XF86AudioLowerVolume exec --no-startup-id $HOME/scripts/lower 34 | bindsym XF86AudioMute exec --no-startup-id $HOME/scripts/mute 35 | 36 | # Use Mouse+$mod to drag floating windows to their wanted position 37 | floating_modifier $mod 38 | 39 | # start a terminal 40 | bindsym $mod+Return exec $term 41 | # start emacs 42 | bindsym $mod+m exec emacs 43 | 44 | # kill focused window 45 | bindsym $mod+Shift+c kill 46 | 47 | # start dmenu (a program launcher) 48 | bindsym $mod+p exec dmenu_run -m 0 -fn Iosevka:size=10 -nb \#1d1f21 -nf \#c5c8c6 -sb \#3B4252 -sf \#c5c8c6 49 | # change focus 50 | bindsym $mod+j focus left 51 | bindsym $mod+k focus down 52 | bindsym $mod+l focus up 53 | bindsym $mod+semicolon focus right 54 | 55 | # alternatively, you can use the cursor keys: 56 | bindsym $mod+Left focus left 57 | bindsym $mod+Down focus down 58 | bindsym $mod+Up focus up 59 | bindsym $mod+Right focus right 60 | 61 | # move focused window 62 | bindsym $mod+Shift+j move left 63 | bindsym $mod+Shift+k move down 64 | bindsym $mod+Shift+l move up 65 | bindsym $mod+Shift+semicolon move right 66 | 67 | # alternatively, you can use the cursor keys: 68 | bindsym $mod+Shift+Left move left 69 | bindsym $mod+Shift+Down move down 70 | bindsym $mod+Shift+Up move up 71 | bindsym $mod+Shift+Right move right 72 | 73 | # split in horizontal orientation 74 | bindsym $mod+h split h 75 | 76 | # split in vertical orientation 77 | bindsym $mod+v split v 78 | 79 | # enter fullscreen mode for the focused container 80 | bindsym $mod+f fullscreen toggle 81 | 82 | # change container layout (stacked, tabbed, toggle split) 83 | bindsym $mod+s layout stacking 84 | bindsym $mod+w layout tabbed 85 | bindsym $mod+e layout toggle split 86 | 87 | # toggle tiling / floating 88 | bindsym $mod+Shift+space floating toggle 89 | 90 | # change focus between tiling / floating windows 91 | bindsym $mod+space focus mode_toggle 92 | 93 | # focus the parent container 94 | bindsym $mod+a focus parent 95 | # We use variables to avoid repeating the names in multiple places. 96 | set $ws1 "1" 97 | set $ws2 "2" 98 | set $ws3 "3" 99 | set $ws4 "4" 100 | set $ws5 "5" 101 | set $ws6 "6" 102 | set $ws7 "7" 103 | set $ws8 "8" 104 | set $ws9 "9" 105 | set $ws10 "10" 106 | 107 | # switch to workspace 108 | bindsym $mod+1 workspace number $ws1 109 | bindsym $mod+2 workspace number $ws2 110 | bindsym $mod+3 workspace number $ws3 111 | bindsym $mod+4 workspace number $ws4 112 | bindsym $mod+5 workspace number $ws5 113 | bindsym $mod+6 workspace number $ws6 114 | bindsym $mod+7 workspace number $ws7 115 | bindsym $mod+8 workspace number $ws8 116 | bindsym $mod+9 workspace number $ws9 117 | bindsym $mod+0 workspace number $ws10 118 | 119 | # move focused container to workspace 120 | bindsym $mod+Shift+1 move container to workspace number $ws1 121 | bindsym $mod+Shift+2 move container to workspace number $ws2 122 | bindsym $mod+Shift+3 move container to workspace number $ws3 123 | bindsym $mod+Shift+4 move container to workspace number $ws4 124 | bindsym $mod+Shift+5 move container to workspace number $ws5 125 | bindsym $mod+Shift+6 move container to workspace number $ws6 126 | bindsym $mod+Shift+7 move container to workspace number $ws7 127 | bindsym $mod+Shift+8 move container to workspace number $ws8 128 | bindsym $mod+Shift+9 move container to workspace number $ws9 129 | bindsym $mod+Shift+0 move container to workspace number $ws10 130 | 131 | # restart i3 inplace (preserves your layout/session, can be used to upgrade i3) 132 | bindsym $mod+Shift+r restart 133 | # exit i3 (logs you out of your X session) 134 | bindsym $mod+Shift+q 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'" 135 | # excute emacs 136 | bindsym $mod+Mod1+e exec "emacs" 137 | 138 | # resize window (you can also use the mouse for that) 139 | mode "resize" { 140 | # These bindings trigger as soon as you enter the resize mode 141 | 142 | bindsym j resize shrink width 10 px or 10 ppt 143 | bindsym k resize grow height 10 px or 10 ppt 144 | bindsym l resize shrink height 10 px or 10 ppt 145 | bindsym semicolon resize grow width 10 px or 10 ppt 146 | 147 | # same bindings, but for the arrow keys 148 | bindsym Left resize shrink width 10 px or 10 ppt 149 | bindsym Down resize grow height 10 px or 10 ppt 150 | bindsym Up resize shrink height 10 px or 10 ppt 151 | bindsym Right resize grow width 10 px or 10 ppt 152 | 153 | # back to normal: Enter or Escape or $mod+r 154 | bindsym Return mode "default" 155 | bindsym Escape mode "default" 156 | bindsym $mod+r mode "default" 157 | } 158 | 159 | bindsym $mod+r mode "resize" 160 | #persian layout 161 | exec_always "setxkbmap -layout us,ir -option 'grp:alt_shift_toggle'" 162 | #screenshot 163 | bindsym Print exec scrot 'scrot_%Y-%m-%d-%T_$wx$h.png' -e 'mv $f /home/hooman/Pictures' 164 | #filemanager 165 | bindsym $mod+shift+f exec $term -e ranger 166 | #music 167 | 168 | bindsym $mod+shift+n exec $term -e ncmpcpp 169 | #books 170 | bindsym $mod+b exec $HOME/scripts/pdfs 171 | # dotfiles 172 | bindsym $mod+shift+d exec $HOME/scripts/dots 173 | # shutdown 174 | bindsym $mod+shift+s exec $HOME/scripts/halt 175 | 176 | # no border 177 | for_window [class="^.*"] border pixel 0 178 | #gaps 179 | gaps outer 7 180 | gaps inner 7 181 | bindsym $mod+shift+plus gaps inner current plus 5 182 | bindsym $mod+shift+minus gaps inner current minus 5 183 | bindsym $mod+ctrl+plus gaps outer current plus 5 184 | bindsym $mod+ctrl+minus gaps outer current minus 5 185 | bindsym $mod+plus gaps outer current set 5 186 | bindsym $mod+minus gaps inner current set 10 187 | # hello there 188 | exec notify-send "hello there" "general kenobi, you're a bold one" 189 | # wallpaper 190 | exec_always nitrogen --restore 191 | # panel 192 | exec_always --no-startup-id /home/hooman/.config/polybar/launch.sh 193 | # compositor 194 | exec_always picom --experimental-backends 195 | #nm-applet 196 | exec_always nm-applet 197 | 198 | -------------------------------------------------------------------------------- /nvim/plugin/packer_compiled.lua: -------------------------------------------------------------------------------- 1 | -- Automatically generated packer.nvim plugin loader code 2 | 3 | if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then 4 | vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"') 5 | return 6 | end 7 | 8 | vim.api.nvim_command('packadd packer.nvim') 9 | 10 | local no_errors, error_msg = pcall(function() 11 | 12 | _G._packer = _G._packer or {} 13 | _G._packer.inside_compile = true 14 | 15 | local time 16 | local profile_info 17 | local should_profile = false 18 | if should_profile then 19 | local hrtime = vim.loop.hrtime 20 | profile_info = {} 21 | time = function(chunk, start) 22 | if start then 23 | profile_info[chunk] = hrtime() 24 | else 25 | profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6 26 | end 27 | end 28 | else 29 | time = function(chunk, start) end 30 | end 31 | 32 | local function save_profiles(threshold) 33 | local sorted_times = {} 34 | for chunk_name, time_taken in pairs(profile_info) do 35 | sorted_times[#sorted_times + 1] = {chunk_name, time_taken} 36 | end 37 | table.sort(sorted_times, function(a, b) return a[2] > b[2] end) 38 | local results = {} 39 | for i, elem in ipairs(sorted_times) do 40 | if not threshold or threshold and elem[2] > threshold then 41 | results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms' 42 | end 43 | end 44 | if threshold then 45 | table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)') 46 | end 47 | 48 | _G._packer.profile_output = results 49 | end 50 | 51 | time([[Luarocks path setup]], true) 52 | local package_path_str = "/home/hooman/.cache/nvim/packer_hererocks/2.1.1692616192/share/lua/5.1/?.lua;/home/hooman/.cache/nvim/packer_hererocks/2.1.1692616192/share/lua/5.1/?/init.lua;/home/hooman/.cache/nvim/packer_hererocks/2.1.1692616192/lib/luarocks/rocks-5.1/?.lua;/home/hooman/.cache/nvim/packer_hererocks/2.1.1692616192/lib/luarocks/rocks-5.1/?/init.lua" 53 | local install_cpath_pattern = "/home/hooman/.cache/nvim/packer_hererocks/2.1.1692616192/lib/lua/5.1/?.so" 54 | if not string.find(package.path, package_path_str, 1, true) then 55 | package.path = package.path .. ';' .. package_path_str 56 | end 57 | 58 | if not string.find(package.cpath, install_cpath_pattern, 1, true) then 59 | package.cpath = package.cpath .. ';' .. install_cpath_pattern 60 | end 61 | 62 | time([[Luarocks path setup]], false) 63 | time([[try_loadstring definition]], true) 64 | local function try_loadstring(s, component, name) 65 | local success, result = pcall(loadstring(s), name, _G.packer_plugins[name]) 66 | if not success then 67 | vim.schedule(function() 68 | vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {}) 69 | end) 70 | end 71 | return result 72 | end 73 | 74 | time([[try_loadstring definition]], false) 75 | time([[Defining packer_plugins]], true) 76 | _G.packer_plugins = { 77 | ["Comment.nvim"] = { 78 | config = { "\27LJ\2\n5\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\fComment\frequire\0" }, 79 | loaded = true, 80 | path = "/home/hooman/.local/share/nvim/site/pack/packer/start/Comment.nvim", 81 | url = "https://github.com/numToStr/Comment.nvim" 82 | }, 83 | LuaSnip = { 84 | loaded = true, 85 | path = "/home/hooman/.local/share/nvim/site/pack/packer/start/LuaSnip", 86 | url = "https://github.com/L3MON4D3/LuaSnip" 87 | }, 88 | ["cmp-nvim-lsp"] = { 89 | loaded = true, 90 | path = "/home/hooman/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp", 91 | url = "https://github.com/hrsh7th/cmp-nvim-lsp" 92 | }, 93 | gruvbox = { 94 | loaded = true, 95 | path = "/home/hooman/.local/share/nvim/site/pack/packer/start/gruvbox", 96 | url = "https://github.com/morhetz/gruvbox" 97 | }, 98 | ["lsp-zero.nvim"] = { 99 | loaded = true, 100 | path = "/home/hooman/.local/share/nvim/site/pack/packer/start/lsp-zero.nvim", 101 | url = "https://github.com/VonHeikemen/lsp-zero.nvim" 102 | }, 103 | ["mason-lspconfig.nvim"] = { 104 | loaded = true, 105 | path = "/home/hooman/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim", 106 | url = "https://github.com/williamboman/mason-lspconfig.nvim" 107 | }, 108 | ["mason.nvim"] = { 109 | loaded = true, 110 | path = "/home/hooman/.local/share/nvim/site/pack/packer/start/mason.nvim", 111 | url = "https://github.com/williamboman/mason.nvim" 112 | }, 113 | ["nvim-autopairs"] = { 114 | config = { "\27LJ\2\n@\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\19nvim-autopairs\frequire\0" }, 115 | loaded = true, 116 | path = "/home/hooman/.local/share/nvim/site/pack/packer/start/nvim-autopairs", 117 | url = "https://github.com/windwp/nvim-autopairs" 118 | }, 119 | ["nvim-cmp"] = { 120 | loaded = true, 121 | path = "/home/hooman/.local/share/nvim/site/pack/packer/start/nvim-cmp", 122 | url = "https://github.com/hrsh7th/nvim-cmp" 123 | }, 124 | ["nvim-lspconfig"] = { 125 | loaded = true, 126 | path = "/home/hooman/.local/share/nvim/site/pack/packer/start/nvim-lspconfig", 127 | url = "https://github.com/neovim/nvim-lspconfig" 128 | }, 129 | ["nvim-treesitter"] = { 130 | loaded = true, 131 | path = "/home/hooman/.local/share/nvim/site/pack/packer/start/nvim-treesitter", 132 | url = "https://github.com/nvim-treesitter/nvim-treesitter" 133 | }, 134 | ["packer.nvim"] = { 135 | loaded = true, 136 | path = "/home/hooman/.local/share/nvim/site/pack/packer/start/packer.nvim", 137 | url = "https://github.com/wbthomason/packer.nvim" 138 | }, 139 | ["plenary.nvim"] = { 140 | loaded = true, 141 | path = "/home/hooman/.local/share/nvim/site/pack/packer/start/plenary.nvim", 142 | url = "https://github.com/nvim-lua/plenary.nvim" 143 | }, 144 | ["telescope.nvim"] = { 145 | loaded = true, 146 | path = "/home/hooman/.local/share/nvim/site/pack/packer/start/telescope.nvim", 147 | url = "https://github.com/nvim-telescope/telescope.nvim" 148 | }, 149 | ["vim-be-good"] = { 150 | loaded = true, 151 | path = "/home/hooman/.local/share/nvim/site/pack/packer/start/vim-be-good", 152 | url = "https://github.com/ThePrimeagen/vim-be-good" 153 | } 154 | } 155 | 156 | time([[Defining packer_plugins]], false) 157 | -- Config for: Comment.nvim 158 | time([[Config for Comment.nvim]], true) 159 | try_loadstring("\27LJ\2\n5\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\fComment\frequire\0", "config", "Comment.nvim") 160 | time([[Config for Comment.nvim]], false) 161 | -- Config for: nvim-autopairs 162 | time([[Config for nvim-autopairs]], true) 163 | try_loadstring("\27LJ\2\n@\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\19nvim-autopairs\frequire\0", "config", "nvim-autopairs") 164 | time([[Config for nvim-autopairs]], false) 165 | 166 | _G._packer.inside_compile = false 167 | if _G._packer.needs_bufread == true then 168 | vim.cmd("doautocmd BufRead") 169 | end 170 | _G._packer.needs_bufread = false 171 | 172 | if should_profile then save_profiles() end 173 | 174 | end) 175 | 176 | if not no_errors then 177 | error_msg = error_msg:gsub('"', '\\"') 178 | vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None') 179 | end 180 | -------------------------------------------------------------------------------- /i3/config~: -------------------------------------------------------------------------------- 1 | # This file has been auto-generated by i3-config-wizard(1). 2 | # It will not be overwritten, so edit it as you like. 3 | # 4 | # Should you change your keyboard layout some time, delete 5 | # this file and re-run i3-config-wizard(1). 6 | # 7 | 8 | # i3 config file (v4) 9 | # 10 | # Please see https://i3wm.org/docs/userguide.html for a complete reference! 11 | 12 | set $mod Mod4 13 | set $term kitty 14 | # Font for window titles. Will also be used by the bar unless a different font 15 | # is used in the bar {} block below. 16 | font pango:monospace 8 17 | 18 | # This font is widely installed, provides lots of unicode glyphs, right-to-left 19 | # text rendering and scalability on retina/hidpi displays (thanks to pango). 20 | #font pango:DejaVu Sans Mono 8 21 | 22 | # The combination of xss-lock, nm-applet and pactl is a popular choice, so 23 | # they are included here as an example. Modify as you see fit. 24 | 25 | # xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the 26 | # screen before suspend. Use loginctl lock-session to lock your screen. 27 | exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork 28 | 29 | set $nord0 #2E3440 30 | set $nord1 #3B4252 31 | set $nord2 #434C5E 32 | set $nord3 #4C566A 33 | set $nord4 #D8DEE9 34 | set $nord5 #E5E9F0 35 | set $nord6 #ECEFF4 36 | set $nord7 #8FBCBB 37 | set $nord8 #88C0D0 38 | set $nord9 #81A1C1 39 | set $nord10 #5E81AC 40 | set $nord11 #BF616A 41 | set $nord12 #D08770 42 | set $nord13 #EBCB8B 43 | set $nord14 #A3BE8C 44 | set $nord15 #B48EAD 45 | 46 | 47 | # Use pactl to adjust volume in PulseAudio. 48 | set $refresh_i3status killall -SIGUSR1 i3status 49 | bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status 50 | bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status 51 | bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status 52 | bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status 53 | 54 | # Use Mouse+$mod to drag floating windows to their wanted position 55 | floating_modifier $mod 56 | 57 | # start a terminal 58 | bindsym $mod+Return exec $term 59 | 60 | # kill focused window 61 | bindsym $mod+Shift+q kill 62 | 63 | # start dmenu (a program launcher) 64 | bindsym $mod+d exec rofi -show drun 65 | # There also is the (new) i3-dmenu-desktop which only displays applications 66 | # shipping a .desktop file. It is a wrapper around dmenu, so you need that 67 | # installed. 68 | # bindsym $mod+d exec --no-startup-id i3-dmenu-desktop 69 | 70 | # change focus 71 | bindsym $mod+j focus left 72 | bindsym $mod+k focus down 73 | bindsym $mod+l focus up 74 | bindsym $mod+semicolon focus right 75 | 76 | # alternatively, you can use the cursor keys: 77 | bindsym $mod+Left focus left 78 | bindsym $mod+Down focus down 79 | bindsym $mod+Up focus up 80 | bindsym $mod+Right focus right 81 | 82 | # move focused window 83 | bindsym $mod+Shift+j move left 84 | bindsym $mod+Shift+k move down 85 | bindsym $mod+Shift+l move up 86 | bindsym $mod+Shift+semicolon move right 87 | 88 | # alternatively, you can use the cursor keys: 89 | bindsym $mod+Shift+Left move left 90 | bindsym $mod+Shift+Down move down 91 | bindsym $mod+Shift+Up move up 92 | bindsym $mod+Shift+Right move right 93 | 94 | # split in horizontal orientation 95 | bindsym $mod+h split h 96 | 97 | # split in vertical orientation 98 | bindsym $mod+v split v 99 | 100 | # enter fullscreen mode for the focused container 101 | bindsym $mod+f fullscreen toggle 102 | 103 | # change container layout (stacked, tabbed, toggle split) 104 | bindsym $mod+s layout stacking 105 | bindsym $mod+w layout tabbed 106 | bindsym $mod+e layout toggle split 107 | 108 | # toggle tiling / floating 109 | bindsym $mod+Shift+space floating toggle 110 | 111 | # change focus between tiling / floating windows 112 | bindsym $mod+space focus mode_toggle 113 | 114 | # focus the parent container 115 | bindsym $mod+a focus parent 116 | 117 | # focus the child container 118 | #bindsym $mod+d focus child 119 | 120 | # Define names for default workspaces for which we configure key bindings later on. 121 | # We use variables to avoid repeating the names in multiple places. 122 | set $ws1 "1" 123 | set $ws2 "2" 124 | set $ws3 "3" 125 | set $ws4 "4" 126 | set $ws5 "5" 127 | set $ws6 "6" 128 | set $ws7 "7" 129 | set $ws8 "8" 130 | set $ws9 "9" 131 | set $ws10 "10" 132 | 133 | # switch to workspace 134 | bindsym $mod+1 workspace number $ws1 135 | bindsym $mod+2 workspace number $ws2 136 | bindsym $mod+3 workspace number $ws3 137 | bindsym $mod+4 workspace number $ws4 138 | bindsym $mod+5 workspace number $ws5 139 | bindsym $mod+6 workspace number $ws6 140 | bindsym $mod+7 workspace number $ws7 141 | bindsym $mod+8 workspace number $ws8 142 | bindsym $mod+9 workspace number $ws9 143 | bindsym $mod+0 workspace number $ws10 144 | 145 | # move focused container to workspace 146 | bindsym $mod+Shift+1 move container to workspace number $ws1 147 | bindsym $mod+Shift+2 move container to workspace number $ws2 148 | bindsym $mod+Shift+3 move container to workspace number $ws3 149 | bindsym $mod+Shift+4 move container to workspace number $ws4 150 | bindsym $mod+Shift+5 move container to workspace number $ws5 151 | bindsym $mod+Shift+6 move container to workspace number $ws6 152 | bindsym $mod+Shift+7 move container to workspace number $ws7 153 | bindsym $mod+Shift+8 move container to workspace number $ws8 154 | bindsym $mod+Shift+9 move container to workspace number $ws9 155 | bindsym $mod+Shift+0 move container to workspace number $ws10 156 | 157 | # reload the configuration file 158 | bindsym $mod+Shift+c reload 159 | # restart i3 inplace (preserves your layout/session, can be used to upgrade i3) 160 | bindsym $mod+Shift+r restart 161 | # exit i3 (logs you out of your X session) 162 | 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'" 163 | # excute emacs 164 | bindsym $mod+alt+e exec "emacs" 165 | 166 | # resize window (you can also use the mouse for that) 167 | mode "resize" { 168 | # These bindings trigger as soon as you enter the resize mode 169 | 170 | # Pressing left will shrink the window’s width. 171 | # Pressing right will grow the window’s width. 172 | # Pressing up will shrink the window’s height. 173 | # Pressing down will grow the window’s height. 174 | bindsym j resize shrink width 10 px or 10 ppt 175 | bindsym k resize grow height 10 px or 10 ppt 176 | bindsym l resize shrink height 10 px or 10 ppt 177 | bindsym semicolon resize grow width 10 px or 10 ppt 178 | 179 | # same bindings, but for the arrow keys 180 | bindsym Left resize shrink width 10 px or 10 ppt 181 | bindsym Down resize grow height 10 px or 10 ppt 182 | bindsym Up resize shrink height 10 px or 10 ppt 183 | bindsym Right resize grow width 10 px or 10 ppt 184 | 185 | # back to normal: Enter or Escape or $mod+r 186 | bindsym Return mode "default" 187 | bindsym Escape mode "default" 188 | bindsym $mod+r mode "default" 189 | } 190 | 191 | bindsym $mod+r mode "resize" 192 | #persian layout 193 | exec_always "setxkbmap -layout us,ir -option 'grp:alt_shift_toggle'" 194 | #screenshot 195 | bindsym Print exec scrot 'scrot_%Y-%m-%d-%T_$wx$h.png' -e 'mv $f /home/ford/Pictures' 196 | #filemanager 197 | bindsym $mod+shift+f exec $term -e ranger 198 | #music 199 | 200 | bindsym $mod+shift+n exec $term -e ncmpcpp 201 | 202 | # no border 203 | for_window [class="^.*"] border pixel 1 204 | #gaps 205 | gaps outer 5 206 | gaps inner 8 207 | 208 | # wallpaper 209 | exec_always feh --bg-scale $HOME/wall.png 210 | # panel 211 | exec_always --no-startup-id /home/ford/.config/polybar/launch.sh 212 | # compositor 213 | exec_always --no-startup-id picom --experimental-backends 214 | #nm-applet 215 | exec_always nm-applet 216 | # Start i3bar to display a workspace bar (plus the system information i3status 217 | # finds out, if available) 218 | # border 219 | border_radius 10 220 | --------------------------------------------------------------------------------