Delete unused emacs, i3blocks and zsh config

This commit is contained in:
Julian Mutter 2024-02-01 13:28:46 +01:00
parent 607ac75200
commit 1f818e291e
12 changed files with 0 additions and 1563 deletions

View File

@ -1,8 +0,0 @@
(("default" . ((user-emacs-directory . "~/emacs/doom-emacs")))
("vanilla" . ((user-emacs-directory . "~/emacs/vanilla")))
("spacemacs" . ((user-emacs-directory . "~/emacs/spacemacs")))
)
;(env . (("DOOMDIR" . "~/emacs/doom-config"))))))
;("doom" . ((user-emacs-directory . "~/emacs/doom")))
;(doom-private-dir . "~/emacs/doom-config"))))
;)

View File

@ -1,644 +0,0 @@
;; -*- mode: emacs-lisp; lexical-binding: t -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Layer configuration:
This function should only modify configuration layer settings."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
;; `+distribution'. For now available distributions are `spacemacs-base'
;; or `spacemacs'. (default 'spacemacs)
dotspacemacs-distribution 'spacemacs
;; Lazy installation of layers (i.e. layers are installed only when a file
;; with a supported type is opened). Possible values are `all', `unused'
;; and `nil'. `unused' will lazy install only unused layers (i.e. layers
;; not listed in variable `dotspacemacs-configuration-layers'), `all' will
;; lazy install any layer that support lazy installation even the layers
;; listed in `dotspacemacs-configuration-layers'. `nil' disable the lazy
;; installation feature and you have to explicitly list a layer in the
;; variable `dotspacemacs-configuration-layers' to install it.
;; (default 'unused)
dotspacemacs-enable-lazy-installation 'unused
;; If non-nil then Spacemacs will ask for confirmation before installing
;; a layer lazily. (default t)
dotspacemacs-ask-for-lazy-installation t
;; List of additional paths where to look for configuration layers.
;; Paths must have a trailing slash (i.e. `~/.mycontribs/')
dotspacemacs-configuration-layer-path '()
;; List of configuration layers to load.
dotspacemacs-configuration-layers
'(csv
python
;; ----------------------------------------------------------------
;; Example of useful layers you may want to use right away.
;; Uncomment some layer names and press `SPC f e R' (Vim style) or
;; `M-m f e R' (Emacs style) to install them.
;; ----------------------------------------------------------------
;; (dart :variables dart-server-sdk-path "<flutter-path>/bin/cache/dart-sdk/")
(csharp :variables
csharp-backend nil)
rust
tabs
auto-completion
(auto-completion :variables
auto-completion-return-key-behavior 'complete
auto-completion-tab-key-behavior 'cycle
auto-completion-complete-with-key-sequence nil
auto-completion-complete-with-key-sequence-delay 0.1
auto-completion-minimum-prefix-length 2
auto-completion-idle-delay 0.2
auto-completion-private-snippets-directory nil
auto-completion-enable-snippets-in-popup nil
auto-completion-enable-help-tooltip 't
auto-completion-use-company-box nil
auto-completion-enable-sort-by-usage nil)
;; better-defaults
emacs-lisp
(git :variables
git-magit-status-fullscreen t)
helm
(lsp :variables
lsp-lens-enable t
lsp-ui-doc-enable t)
;; markdown
multiple-cursors
org
;; (shell :variables
;; shell-default-height 30
;; shell-default-position 'bottom)
(spell-checking :variables
spell-checking-enable-by-default nil)
syntax-checking
;; version-control
treemacs
json
(evil-snipe :variables evil-snipe-enable-alternate-f-and-t-behaviors t)
)
;; List of additional packages that will be installed without being wrapped
;; in a layer (generally the packages are installed only and should still be
;; loaded using load/require/use-package in the user-config section below in
;; this file). If you need some configuration for these packages, then
;; consider creating a layer. You can also put the configuration in
;; `dotspacemacs/user-config'. To use a local version of a package, use the
;; `:location' property: '(your-package :location "~/path/to/your-package/")
;; Also include the dependencies as they will not be resolved automatically.
dotspacemacs-additional-packages '(format-all)
;; A list of packages that cannot be updated.
dotspacemacs-frozen-packages '()
;; A list of packages that will not be installed and loaded.
dotspacemacs-excluded-packages '()
;; Defines the behaviour of Spacemacs when installing packages.
;; Possible values are `used-only', `used-but-keep-unused' and `all'.
;; `used-only' installs only explicitly used packages and deletes any unused
;; packages as well as their unused dependencies. `used-but-keep-unused'
;; installs only the used packages but won't delete unused ones. `all'
;; installs *all* packages supported by Spacemacs and never uninstalls them.
;; (default is `used-only')
dotspacemacs-install-packages 'used-only))
(defun dotspacemacs/init ()
"Initialization:
This function is called at the very beginning of Spacemacs startup,
before layer configuration.
It should only modify the values of Spacemacs settings."
;; This setq-default sexp is an exhaustive list of all the supported
;; spacemacs settings.
(setq-default
;; If non-nil then enable support for the portable dumper. You'll need to
;; compile Emacs 27 from source following the instructions in file
;; EXPERIMENTAL.org at to root of the git repository.
;;
;; WARNING: pdumper does not work with Native Compilation, so it's disabled
;; regardless of the following setting when native compilation is in effect.
;;
;; (default nil)
dotspacemacs-enable-emacs-pdumper nil
;; Name of executable file pointing to emacs 27+. This executable must be
;; in your PATH.
;; (default "emacs")
dotspacemacs-emacs-pdumper-executable-file "emacs"
;; Name of the Spacemacs dump file. This is the file will be created by the
;; portable dumper in the cache directory under dumps sub-directory.
;; To load it when starting Emacs add the parameter `--dump-file'
;; when invoking Emacs 27.1 executable on the command line, for instance:
;; ./emacs --dump-file=$HOME/.emacs.d/.cache/dumps/spacemacs-27.1.pdmp
;; (default (format "spacemacs-%s.pdmp" emacs-version))
dotspacemacs-emacs-dumper-dump-file (format "spacemacs-%s.pdmp" emacs-version)
;; If non-nil ELPA repositories are contacted via HTTPS whenever it's
;; possible. Set it to nil if you have no way to use HTTPS in your
;; environment, otherwise it is strongly recommended to let it set to t.
;; This variable has no effect if Emacs is launched with the parameter
;; `--insecure' which forces the value of this variable to nil.
;; (default t)
dotspacemacs-elpa-https t
;; Maximum allowed time in seconds to contact an ELPA repository.
;; (default 5)
dotspacemacs-elpa-timeout 5
;; Set `gc-cons-threshold' and `gc-cons-percentage' when startup finishes.
;; This is an advanced option and should not be changed unless you suspect
;; performance issues due to garbage collection operations.
;; (default '(100000000 0.1))
dotspacemacs-gc-cons '(100000000 0.1)
;; Set `read-process-output-max' when startup finishes.
;; This defines how much data is read from a foreign process.
;; Setting this >= 1 MB should increase performance for lsp servers
;; in emacs 27.
;; (default (* 1024 1024))
dotspacemacs-read-process-output-max (* 1024 1024)
;; If non-nil then Spacelpa repository is the primary source to install
;; a locked version of packages. If nil then Spacemacs will install the
;; latest version of packages from MELPA. Spacelpa is currently in
;; experimental state please use only for testing purposes.
;; (default nil)
dotspacemacs-use-spacelpa nil
;; If non-nil then verify the signature for downloaded Spacelpa archives.
;; (default t)
dotspacemacs-verify-spacelpa-archives t
;; If non-nil then spacemacs will check for updates at startup
;; when the current branch is not `develop'. Note that checking for
;; new versions works via git commands, thus it calls GitHub services
;; whenever you start Emacs. (default nil)
dotspacemacs-check-for-update nil
;; If non-nil, a form that evaluates to a package directory. For example, to
;; use different package directories for different Emacs versions, set this
;; to `emacs-version'. (default 'emacs-version)
dotspacemacs-elpa-subdirectory 'emacs-version
;; One of `vim', `emacs' or `hybrid'.
;; `hybrid' is like `vim' except that `insert state' is replaced by the
;; `hybrid state' with `emacs' key bindings. The value can also be a list
;; with `:variables' keyword (similar to layers). Check the editing styles
;; section of the documentation for details on available variables.
;; (default 'vim)
dotspacemacs-editing-style 'vim
;; If non-nil show the version string in the Spacemacs buffer. It will
;; appear as (spacemacs version)@(emacs version)
;; (default t)
dotspacemacs-startup-buffer-show-version t
;; Specify the startup banner. Default value is `official', it displays
;; the official spacemacs logo. An integer value is the index of text
;; banner, `random' chooses a random text banner in `core/banners'
;; directory. A string value must be a path to an image format supported
;; by your Emacs build.
;; If the value is nil then no banner is displayed. (default 'official)
dotspacemacs-startup-banner 'official
;; List of items to show in startup buffer or an association list of
;; the form `(list-type . list-size)`. If nil then it is disabled.
;; Possible values for list-type are:
;; `recents' `recents-by-project' `bookmarks' `projects' `agenda' `todos'.
;; List sizes may be nil, in which case
;; `spacemacs-buffer-startup-lists-length' takes effect.
;; The exceptional case is `recents-by-project', where list-type must be a
;; pair of numbers, e.g. `(recents-by-project . (7 . 5))', where the first
;; number is the project limit and the second the limit on the recent files
;; within a project.
dotspacemacs-startup-lists '((recents . 5)
(projects . 7))
;; True if the home buffer should respond to resize events. (default t)
dotspacemacs-startup-buffer-responsive t
;; Show numbers before the startup list lines. (default t)
dotspacemacs-show-startup-list-numbers t
;; The minimum delay in seconds between number key presses. (default 0.4)
dotspacemacs-startup-buffer-multi-digit-delay 0.4
;; If non-nil, show file icons for entries and headings on Spacemacs home buffer.
;; This has no effect in terminal or if "all-the-icons" package or the font
;; is not installed. (default nil)
dotspacemacs-startup-buffer-show-icons nil
;; Default major mode for a new empty buffer. Possible values are mode
;; names such as `text-mode'; and `nil' to use Fundamental mode.
;; (default `text-mode')
dotspacemacs-new-empty-buffer-major-mode 'text-mode
;; Default major mode of the scratch buffer (default `text-mode')
dotspacemacs-scratch-mode 'text-mode
;; If non-nil, *scratch* buffer will be persistent. Things you write down in
;; *scratch* buffer will be saved and restored automatically.
dotspacemacs-scratch-buffer-persistent nil
;; If non-nil, `kill-buffer' on *scratch* buffer
;; will bury it instead of killing.
dotspacemacs-scratch-buffer-unkillable nil
;; Initial message in the scratch buffer, such as "Welcome to Spacemacs!"
;; (default nil)
dotspacemacs-initial-scratch-message nil
;; List of themes, the first of the list is loaded when spacemacs starts.
;; Press `SPC T n' to cycle to the next theme in the list (works great
;; with 2 themes variants, one dark and one light)
dotspacemacs-themes '(spacemacs-dark
spacemacs-light)
;; Set the theme for the Spaceline. Supported themes are `spacemacs',
;; `all-the-icons', `custom', `doom', `vim-powerline' and `vanilla'. The
;; first three are spaceline themes. `doom' is the doom-emacs mode-line.
;; `vanilla' is default Emacs mode-line. `custom' is a user defined themes,
;; refer to the DOCUMENTATION.org for more info on how to create your own
;; spaceline theme. Value can be a symbol or list with additional properties.
;; (default '(spacemacs :separator wave :separator-scale 1.5))
dotspacemacs-mode-line-theme '(spacemacs :separator wave :separator-scale 1.5)
;; If non-nil the cursor color matches the state color in GUI Emacs.
;; (default t)
dotspacemacs-colorize-cursor-according-to-state t
;; Default font or prioritized list of fonts. The `:size' can be specified as
;; a non-negative integer (pixel size), or a floating-point (point size).
;; Point size is recommended, because it's device independent. (default 10.0)
dotspacemacs-default-font '("Source Code Pro"
:size 11.0
:weight normal
:width normal)
;; The leader key (default "SPC")
dotspacemacs-leader-key "SPC"
;; The key used for Emacs commands `M-x' (after pressing on the leader key).
;; (default "SPC")
dotspacemacs-emacs-command-key "SPC"
;; The key used for Vim Ex commands (default ":")
dotspacemacs-ex-command-key ":"
;; The leader key accessible in `emacs state' and `insert state'
;; (default "M-m")
dotspacemacs-emacs-leader-key "M-m"
;; Major mode leader key is a shortcut key which is the equivalent of
;; pressing `<leader> m`. Set it to `nil` to disable it. (default ",")
dotspacemacs-major-mode-leader-key ","
;; Major mode leader key accessible in `emacs state' and `insert state'.
;; (default "C-M-m" for terminal mode, "<M-return>" for GUI mode).
;; Thus M-RET should work as leader key in both GUI and terminal modes.
;; C-M-m also should work in terminal mode, but not in GUI mode.
dotspacemacs-major-mode-emacs-leader-key (if window-system "<M-return>" "C-M-m")
;; These variables control whether separate commands are bound in the GUI to
;; the key pairs `C-i', `TAB' and `C-m', `RET'.
;; Setting it to a non-nil value, allows for separate commands under `C-i'
;; and TAB or `C-m' and `RET'.
;; In the terminal, these pairs are generally indistinguishable, so this only
;; works in the GUI. (default nil)
dotspacemacs-distinguish-gui-tab nil
;; Name of the default layout (default "Default")
dotspacemacs-default-layout-name "Default"
;; If non-nil the default layout name is displayed in the mode-line.
;; (default nil)
dotspacemacs-display-default-layout nil
;; If non-nil then the last auto saved layouts are resumed automatically upon
;; start. (default nil)
dotspacemacs-auto-resume-layouts nil
;; If non-nil, auto-generate layout name when creating new layouts. Only has
;; effect when using the "jump to layout by number" commands. (default nil)
dotspacemacs-auto-generate-layout-names nil
;; Size (in MB) above which spacemacs will prompt to open the large file
;; literally to avoid performance issues. Opening a file literally means that
;; no major mode or minor modes are active. (default is 1)
dotspacemacs-large-file-size 1
;; Location where to auto-save files. Possible values are `original' to
;; auto-save the file in-place, `cache' to auto-save the file to another
;; file stored in the cache directory and `nil' to disable auto-saving.
;; (default 'cache)
dotspacemacs-auto-save-file-location 'cache
;; Maximum number of rollback slots to keep in the cache. (default 5)
dotspacemacs-max-rollback-slots 5
;; If non-nil, the paste transient-state is enabled. While enabled, after you
;; paste something, pressing `C-j' and `C-k' several times cycles through the
;; elements in the `kill-ring'. (default nil)
dotspacemacs-enable-paste-transient-state nil
;; Which-key delay in seconds. The which-key buffer is the popup listing
;; the commands bound to the current keystroke sequence. (default 0.4)
dotspacemacs-which-key-delay 0.4
;; Which-key frame position. Possible values are `right', `bottom' and
;; `right-then-bottom'. right-then-bottom tries to display the frame to the
;; right; if there is insufficient space it displays it at the bottom.
;; (default 'bottom)
dotspacemacs-which-key-position 'bottom
;; Control where `switch-to-buffer' displays the buffer. If nil,
;; `switch-to-buffer' displays the buffer in the current window even if
;; another same-purpose window is available. If non-nil, `switch-to-buffer'
;; displays the buffer in a same-purpose window even if the buffer can be
;; displayed in the current window. (default nil)
dotspacemacs-switch-to-buffer-prefers-purpose nil
;; If non-nil a progress bar is displayed when spacemacs is loading. This
;; may increase the boot time on some systems and emacs builds, set it to
;; nil to boost the loading time. (default t)
dotspacemacs-loading-progress-bar t
;; If non-nil the frame is fullscreen when Emacs starts up. (default nil)
;; (Emacs 24.4+ only)
dotspacemacs-fullscreen-at-startup nil
;; If non-nil `spacemacs/toggle-fullscreen' will not use native fullscreen.
;; Use to disable fullscreen animations in OSX. (default nil)
dotspacemacs-fullscreen-use-non-native nil
;; If non-nil the frame is maximized when Emacs starts up.
;; Takes effect only if `dotspacemacs-fullscreen-at-startup' is nil.
;; (default nil) (Emacs 24.4+ only)
dotspacemacs-maximized-at-startup nil
;; If non-nil the frame is undecorated when Emacs starts up. Combine this
;; variable with `dotspacemacs-maximized-at-startup' in OSX to obtain
;; borderless fullscreen. (default nil)
dotspacemacs-undecorated-at-startup nil
;; A value from the range (0..100), in increasing opacity, which describes
;; the transparency level of a frame when it's active or selected.
;; Transparency can be toggled through `toggle-transparency'. (default 90)
dotspacemacs-active-transparency 90
;; A value from the range (0..100), in increasing opacity, which describes
;; the transparency level of a frame when it's inactive or deselected.
;; Transparency can be toggled through `toggle-transparency'. (default 90)
dotspacemacs-inactive-transparency 90
;; If non-nil show the titles of transient states. (default t)
dotspacemacs-show-transient-state-title t
;; If non-nil show the color guide hint for transient state keys. (default t)
dotspacemacs-show-transient-state-color-guide t
;; If non-nil unicode symbols are displayed in the mode line.
;; If you use Emacs as a daemon and wants unicode characters only in GUI set
;; the value to quoted `display-graphic-p'. (default t)
dotspacemacs-mode-line-unicode-symbols t
;; If non-nil smooth scrolling (native-scrolling) is enabled. Smooth
;; scrolling overrides the default behavior of Emacs which recenters point
;; when it reaches the top or bottom of the screen. (default t)
dotspacemacs-smooth-scrolling t
;; Show the scroll bar while scrolling. The auto hide time can be configured
;; by setting this variable to a number. (default t)
dotspacemacs-scroll-bar-while-scrolling t
;; Control line numbers activation.
;; If set to `t', `relative' or `visual' then line numbers are enabled in all
;; `prog-mode' and `text-mode' derivatives. If set to `relative', line
;; numbers are relative. If set to `visual', line numbers are also relative,
;; but only visual lines are counted. For example, folded lines will not be
;; counted and wrapped lines are counted as multiple lines.
;; This variable can also be set to a property list for finer control:
;; '(:relative nil
;; :visual nil
;; :disabled-for-modes dired-mode
;; doc-view-mode
;; markdown-mode
;; org-mode
;; pdf-view-mode
;; text-mode
;; :size-limit-kb 1000)
;; When used in a plist, `visual' takes precedence over `relative'.
;; (default nil)
dotspacemacs-line-numbers nil
;; Code folding method. Possible values are `evil', `origami' and `vimish'.
;; (default 'evil)
dotspacemacs-folding-method 'evil
;; If non-nil and `dotspacemacs-activate-smartparens-mode' is also non-nil,
;; `smartparens-strict-mode' will be enabled in programming modes.
;; (default nil)
dotspacemacs-smartparens-strict-mode nil
;; If non-nil smartparens-mode will be enabled in programming modes.
;; (default t)
dotspacemacs-activate-smartparens-mode t
;; If non-nil pressing the closing parenthesis `)' key in insert mode passes
;; over any automatically added closing parenthesis, bracket, quote, etc...
;; This can be temporary disabled by pressing `C-q' before `)'. (default nil)
dotspacemacs-smart-closing-parenthesis nil
;; Select a scope to highlight delimiters. Possible values are `any',
;; `current', `all' or `nil'. Default is `all' (highlight any scope and
;; emphasis the current one). (default 'all)
dotspacemacs-highlight-delimiters 'all
;; If non-nil, start an Emacs server if one is not already running.
;; (default nil)
dotspacemacs-enable-server nil
;; Set the emacs server socket location.
;; If nil, uses whatever the Emacs default is, otherwise a directory path
;; like \"~/.emacs.d/server\". It has no effect if
;; `dotspacemacs-enable-server' is nil.
;; (default nil)
dotspacemacs-server-socket-dir nil
;; If non-nil, advise quit functions to keep server open when quitting.
;; (default nil)
dotspacemacs-persistent-server nil
;; List of search tool executable names. Spacemacs uses the first installed
;; tool of the list. Supported tools are `rg', `ag', `pt', `ack' and `grep'.
;; (default '("rg" "ag" "pt" "ack" "grep"))
dotspacemacs-search-tools '("rg" "ag" "pt" "ack" "grep")
;; Format specification for setting the frame title.
;; %a - the `abbreviated-file-name', or `buffer-name'
;; %t - `projectile-project-name'
;; %I - `invocation-name'
;; %S - `system-name'
;; %U - contents of $USER
;; %b - buffer name
;; %f - visited file name
;; %F - frame name
;; %s - process status
;; %p - percent of buffer above top of window, or Top, Bot or All
;; %P - percent of buffer above bottom of window, perhaps plus Top, or Bot or All
;; %m - mode name
;; %n - Narrow if appropriate
;; %z - mnemonics of buffer, terminal, and keyboard coding systems
;; %Z - like %z, but including the end-of-line format
;; If nil then Spacemacs uses default `frame-title-format' to avoid
;; performance issues, instead of calculating the frame title by
;; `spacemacs/title-prepare' all the time.
;; (default "%I@%S")
dotspacemacs-frame-title-format "%I@%S"
;; Format specification for setting the icon title format
;; (default nil - same as frame-title-format)
dotspacemacs-icon-title-format nil
;; Show trailing whitespace (default t)
dotspacemacs-show-trailing-whitespace t
;; Delete whitespace while saving buffer. Possible values are `all'
;; to aggressively delete empty line and long sequences of whitespace,
;; `trailing' to delete only the whitespace at end of lines, `changed' to
;; delete only whitespace for changed lines or `nil' to disable cleanup.
;; (default nil)
dotspacemacs-whitespace-cleanup nil
;; If non-nil activate `clean-aindent-mode' which tries to correct
;; virtual indentation of simple modes. This can interfere with mode specific
;; indent handling like has been reported for `go-mode'.
;; If it does deactivate it here.
;; (default t)
dotspacemacs-use-clean-aindent-mode t
;; Accept SPC as y for prompts if non-nil. (default nil)
dotspacemacs-use-SPC-as-y nil
;; If non-nil shift your number row to match the entered keyboard layout
;; (only in insert state). Currently supported keyboard layouts are:
;; `qwerty-us', `qwertz-de' and `querty-ca-fr'.
;; New layouts can be added in `spacemacs-editing' layer.
;; (default nil)
dotspacemacs-swap-number-row nil
;; Either nil or a number of seconds. If non-nil zone out after the specified
;; number of seconds. (default nil)
dotspacemacs-zone-out-when-idle nil
;; Run `spacemacs/prettify-org-buffer' when
;; visiting README.org files of Spacemacs.
;; (default nil)
dotspacemacs-pretty-docs nil
;; If nil the home buffer shows the full path of agenda items
;; and todos. If non-nil only the file name is shown.
dotspacemacs-home-shorten-agenda-source nil
;; If non-nil then byte-compile some of Spacemacs files.
dotspacemacs-byte-compile nil))
(defun dotspacemacs/user-env ()
"Environment variables setup.
This function defines the environment variables for your Emacs session. By
default it calls `spacemacs/load-spacemacs-env' which loads the environment
variables declared in `~/.spacemacs.env' or `~/.spacemacs.d/.spacemacs.env'.
See the header of this file for more information."
(spacemacs/load-spacemacs-env)
)
(defun dotspacemacs/user-init ()
"Initialization for user code:
This function is called immediately after `dotspacemacs/init', before layer
configuration.
It is mostly for variables that should be set before packages are loaded.
If you are unsure, try setting them in `dotspacemacs/user-config' first."
)
(defun dotspacemacs/user-load ()
"Library to load while dumping.
This function is called only while dumping Spacemacs configuration. You can
`require' or `load' the libraries of your choice that will be included in the
dump."
)
(defun dotspacemacs/user-config ()
"Configuration for user code:
This function is called at the very end of Spacemacs startup, after layer
configuration.
Put your configuration code here, except for variables that should be set
before packages are loaded."
(setq rust-format-on-save t)
;; (global-set-key (kbd "M-1") 'evil-jump-forward)
;; (setq centaur-tabs-show-count t)
(define-key winum-keymap (kbd "M-1") 'tab-bar-switch-to-tab)
;; (evil-define-key '(normal) nil (kbd "C-i") 'evil-jump-forward)
(define-key evil-motion-state-map (kbd "C-i") 'evil-jump-forward)
(evil-define-key* '(normal insert visual) 'global (kbd "C-s") 'escape-and-save)
(evil-define-key* '(normal visual) 'global (kbd "gD") 'lsp-find-references)
(global-set-key (kbd "C--") 'spacemacs/scale-down-font)
(global-set-key (kbd "C-+") 'spacemacs/scale-up-font)
(global-set-key (kbd "C-=") 'spacemacs/reset-font-size)
(spacemacs/set-leader-keys "." 'lazy-helm/spacemacs/helm-find-files)
(spacemacs/set-leader-keys ":" 'helm-projectile-find-file)
(spacemacs/declare-prefix "o" "open external")
(spacemacs/set-leader-keys "ot" 'open-external-terminal)
(spacemacs/set-leader-keys "gg" 'magit-status)
(spacemacs/set-leader-keys "ee" 'flycheck-explain-error-at-point)
;; (spacemacs/set-leader-keys "br" '(revert-buffer nil nil))
(setq evil-escape-key-sequence "kj")
(defun open-external-terminal ()
"Open external terminal"
(interactive)
(call-process-shell-command "alacritty&" nil 0))
(defun escape-and-save()
"Evil escape and then save buffer"
(interactive)
(evil-escape)
(condition-case nil
(format-all-buffer)
(error nil))
(save-buffer))
)
;; Do not write anything past this comment. This is where Emacs will
;; auto-generate custom variable definitions.
(defun dotspacemacs/emacs-custom-settings ()
"Emacs custom settings.
This is an auto-generated function, do not modify its content directly, use
Emacs customize menu instead.
This function is called at the very end of Spacemacs initialization."
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(evil-want-Y-yank-to-eol nil)
'(org-babel-load-languages '((csharp . t) (emacs-lisp)))
'(package-selected-packages
'(csv-mode yapfify sphinx-doc pytest pyenv-mode pydoc py-isort poetry pippel pipenv pyvenv pip-requirements nose lsp-python-ms lsp-pyright live-py-mode importmagic epc ctable concurrent deferred helm-pydoc helm-cscope xcscope cython-mode company-anaconda blacken anaconda-mode pythonic evil-snipe omnisharp csharp-mode web-beautify prettier-js json-reformat json-navigator hierarchy json-mode json-snatcher format-all language-id inheritenv company-quickhelp stickyfunc-enhance srefactor yasnippet-snippets treemacs-magit smeargle orgit-forge orgit org-rich-yank org-projectile org-category-capture org-present org-pomodoro alert log4e gntp org-mime org-download org-contrib org-cliplink org lsp-ui lsp-origami origami htmlize helm-org-rifle helm-lsp helm-git-grep helm-company helm-c-yasnippet gnuplot gitignore-templates git-timemachine git-modes git-messenger git-link fuzzy forge yaml magit ghub closql emacsql-sqlite emacsql treepy magit-section git-commit with-editor transient flyspell-correct-helm flyspell-correct flycheck-pos-tip evil-org centaur-tabs auto-yasnippet yasnippet auto-dictionary ac-ispell auto-complete toml-mode ron-mode racer pos-tip rust-mode helm-gtags ggtags flycheck-rust dap-mode lsp-treemacs bui lsp-mode counsel-gtags counsel swiper ivy company cargo markdown-mode ws-butler writeroom-mode winum which-key volatile-highlights vi-tilde-fringe uuidgen use-package undo-tree treemacs-projectile treemacs-persp treemacs-icons-dired treemacs-evil toc-org symon symbol-overlay string-inflection string-edit spaceline-all-the-icons restart-emacs request rainbow-delimiters quickrun popwin pcre2el password-generator paradox overseer org-superstar open-junk-file nameless multi-line macrostep lorem-ipsum link-hint inspector info+ indent-guide hybrid-mode hungry-delete hl-todo highlight-parentheses highlight-numbers highlight-indentation hide-comnt helm-xref helm-themes helm-swoop helm-purpose helm-projectile helm-org helm-mode-manager helm-make helm-ls-git helm-flx helm-descbinds helm-ag google-translate golden-ratio font-lock+ flycheck-package flycheck-elsa flx-ido fancy-battery eyebrowse expand-region evil-visualstar evil-visual-mark-mode evil-unimpaired evil-tutor evil-textobj-line evil-terminal-cursor-changer evil-surround evil-numbers evil-nerd-commenter evil-mc evil-matchit evil-lisp-state evil-lion evil-indent-plus evil-iedit-state evil-goggles evil-exchange evil-escape evil-ediff evil-easymotion evil-collection evil-cleverparens evil-args evil-anzu eval-sexp-fu emr elisp-slime-nav elisp-def editorconfig dumb-jump drag-stuff dotenv-mode dired-quick-sort diminish devdocs define-word column-enforce-mode clean-aindent-mode centered-cursor-mode auto-highlight-symbol auto-compile aggressive-indent ace-link ace-jump-helm-line)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(highlight-parentheses-highlight ((nil (:weight ultra-bold))) t))
)

View File

@ -1,30 +0,0 @@
#!/bin/sh
NONE="None"
get_current_activity() {
activity=$(hamster current)
if [ "$activity" = "No activity" ]; then
echo $NONE
else
IFS=' '
read -ra ADDR <<< "$activity"
echo "${ADDR[2]}"
fi
}
case "$BLOCK_BUTTON" in
1|2|3)
current_activity=$(get_current_activity)
if [ "$current_activity" = "$NONE" ]; then
hamster start "Comu@Work#Flexibill App"
else
hamster stop
fi
esac
current_activity=$(get_current_activity)
echo "$LABEL $current_activity"
echo "$LABEL $current_activity"

View File

@ -1,35 +0,0 @@
#!/bin/bash
DATEFMT=${DATEFMT:-"+%a %d.%m.%Y %H:%M:%S"}
SHORTFMT=${SHORTFMT:-"+%H:%M:%S"}
OPTIND=1
while getopts ":f:" opt; do
case $opt in
f) DATEFMT="$OPTARG" ;;
\?)
echo "Invalid option: -$OPTARG" >&2
exit 1
;;
:)
echo "Option -$OPTARG requires an argument." >&2
exit 1
;;
esac
done
case "$BLOCK_BUTTON" in
1|2|3)
# Try to focus Thunderbird
i3-msg -q [class="Thunderbird" instance="Mail"] focus
if [ $? == 2 ]
then
# Open Thunderbird if it was not open
i3-msg -q "exec thunderbird -mail -calendar"
else
# Open calendar
xdotool key --clearmodifiers --delay 5 ctrl+shift+c
fi
esac
echo "$LABEL$(date "$DATEFMT")"
echo "$LABEL$(date "$SHORTFMT")"

View File

@ -1,36 +0,0 @@
# i3blocks configuration file
#
# The i3blocks man page describes the usage of the binary,
# and its website describes the configuration:
#
# https://vivien.github.io/i3blocks
# Sources:
# https://github.com/hastinbe/i3blocks-battery-plus
# https://github.com/zakariaGatter/i3blocks-gate
# Global properties
separator=true
separator_block_width=15
[activity]
command=./activity
interval=10
LABEL=
[dunst]
command=./dunst
markup=pango
interval=once
format=json
[volume]
command=./volume
LABEL=
interval=10
signal=1
[calendar]
command=./calendar
interval=1

View File

@ -1,60 +0,0 @@
#!/usr/bin/env python3
"""
A do-not-disturb button for muting Dunst notifications in i3 using i3blocks
Mute is handled by passing 'DUNST_COMMAND_PAUSE' and 'DUNST_COMMAND_RESUME' to
the notify-send script and the 'DUNST_MUTE' environment variable is set to keep
track of the toggle.
"""
__author__ = "Jessey White-Cinis <j@cin.is>"
__copyright__ = "Copyright (c) 2019 Jessey White-Cinis"
__license__ = "MIT"
__version__ = "1.1.0"
import os
import subprocess
import json
def mute_on():
'''Turns off dunst notifications'''
subprocess.run(["dunstctl", "set-paused", "true"], check=True)
return {
"full_text":"<span font='Font Awesome 5 Free Solid' color='#BE616E'>\uf1f6</span>",
"DUNST_MUTE":"on"
}
def mute_off():
'''Turns back on dunst notifications'''
subprocess.run(["dunstctl", "set-paused", "false"], check=True)
return {
"full_text":"<span font='Font Awesome 5 Free Solid' color='#FFFFFF'>\uf0f3</span>",
"DUNST_MUTE":"off"
}
def clicked():
'''Returns True if the button was clicked'''
button = "BLOCK_BUTTON" in os.environ and os.environ["BLOCK_BUTTON"]
return bool(button)
def muted():
'''Returns True if Dunst is muted'''
cmd = ['dunstctl', 'is-paused']
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
output = proc.communicate()[0]
return u'true' == output.strip().decode("UTF-8")
if clicked():
# toggle button click to turn mute on and off
if muted():
RTN = mute_off()
else:
RTN = mute_on()
else:
# Set default state using 'DUNST_MUTE' environment variable
if muted():
RTN = mute_on()
else:
RTN = mute_off()
print(json.dumps(RTN))

View File

@ -1,462 +0,0 @@
#!/usr/bin/env bash
# Zakaria Barkouk ( Zakaria.gatter@gmail.com)
#---------------------#
# SHOW CPU INFO (TOP) #
#---------------------#
_BLOCK_1_(){ #{{{
mpstat | awk '/all/{print "'"${1:-} "'"$4}'
} #}}}
#--------------------#
# SHOW ALL CPUS INFO #
#--------------------#
_BLOCK_2_(){ #{{{
mpstat -P ALL | awk -v icon=${1:-} 'BEGIN{printf "%s ", icon} {
if($3 ~ /^[0-9]/){
printf "%s ", $4
}
}'
} #}}}
#--------------------------#
# SHOW MEMORY USAGE (FREE) #
#--------------------------#
_BLOCK_3_(){ #{{{
free -h | awk '/^Mem:/{print "'"${1:-} "'"$3}'
} #}}}
#------------------------#
# SHOW SWAP USAGE (FREE) #
#------------------------#
_BLOCK_4_(){ #{{{
free -h | awk '/^Swap:/{print "'"${1:-}"' "$3}'
} #}}}
#---------------------------#
# SHOW DATE AND TIME (DATE) #
#---------------------------#
_BLOCK_5_(){ #{{{
date +"${1:-} %R %D"
} #}}}
#----------------------------#
# SHOW BATTERY STATUS (ACPI) #
#----------------------------#
_BLOCK_6_(){ #{{{
Bat=$(acpi | awk '{gsub(",|%","",$4); print $4}');
adapt=$(acpi -a | awk '{print $3}');
if [ "$adapt" = "on-line" -a -n "$Bat" ];then
icon0=" "
icon1=" "
icon2=" "
icon3=" "
icon4=" "
elif [ "$adapt" = "on-line" ];then
icon0=""
icon1=""
icon2=""
icon3=""
icon4=""
else
icon0=""
icon1=""
icon2=""
icon3=""
icon4=""
fi
[ -z "$Bat" ] && echo "$icon0 $adapt" && return
[ "$Bat" -gt "100" ] && echo "$icon4 Full"
[ "$Bat" -gt "90" ] && echo "$icon3 $Bat%"
[ "$Bat" -gt "60" ] && echo "$icon2 $Bat%"
[ "$Bat" -gt "30" ] && echo "$icon1 $Bat%"
[ "$Bat" -lt "30" ] && echo "$icon0 $Bat%"
} #}}}
#----------------------#
# SHOW DISK USAGE (DF) #
#----------------------#
_BLOCK_7_() { #{{{
df -h "${1:-/}" | awk '/\/dev\//{print "'"${2:-}"' "$3-G"/"$2}'
} #}}}
#----------------------#
# SHOW KEYBOARD LAYOUT #
#----------------------#
_BLOCK_8_() { #{{{
awk -F '"' '/XKBLAYOUT/{print "'"${1:-} "'"$2}' /etc/default/keyboard
} #}}}
#----------------------#
# SHOW SYSTEM LANGUAGE #
#----------------------#
_BLOCK_9_(){ #{{{
echo "${1:-} ${LANG/.UTF-8/}"
} #}}}
#------------------------------#
# SHOW MACHINE UPTIME (UPTIME) #
#------------------------------#
_BLOCK_10_() { #{{{
uptime | awk '{sub(",","",$4); print "'"${1:- } "'"$3 " " $4}'
} #}}}
#----------------------#
# SHOW TRASH SIZE (DU) #
#----------------------#
_BLOCK_11_() { #{{{
[ -d "$HOME/.local/share/Trash/files" ] && {
du -hc $HOME/.local/share/Trash/files | awk '/total$/{print "'"${1:-} "'"$1}'
} || {
echo "${1:-} ---"
}
} #}}}
#-------------------#
# SHOW WINDOW USAGE #
#-------------------#
_BLOCK_12_() { #{{{
focus=$(xprop -id `xprop -root | awk '/^_NET_ACTIVE_WINDOW/{print $5}'` | awk -F '"' '/^WM_NAME/{print $2}')
if [ -z "$focus" ];then
echo "${1:-} Welcome"
else
[ "${#focus}" -gt "${2:-30}" ] && echo "${1:-} ${focus::${2:-30}} ..." || echo "${1:-} $focus"
fi
} #}}}
#-----------------------------------------#
# SHOW MOCP PLAYING SONG AND STATUS (MOC) #
#-----------------------------------------#
_BLOCK_13_() { # {{{
Title=$(mocp -Q %title)
F_Title=$(basename `mocp -Q %file | tr " " "_"`)
Status=$(mocp -Q %state)
if [ "$Status" != "PLAY" ];then
echo "${1:-} Pause"
elif [ -z "$Title" ];then
echo "${1:-} ${F_Title::30}"
else
echo "${1:-} $Title"
fi
} #}}}
#------------------------------------------------------#
# SHOW MPD PLAYING SONG AND STATUS (MPD; NCMPCCP, MPC) #
#------------------------------------------------------#
_BLOCK_14_() { #{{{
local NCMP=$(mpc | awk '/^\[playing\]/{print $1}')
if [ "$NCMP" = "[playing]" ];then
echo "${1:-} $(basename $(mpc current)) "
else
echo "${1:-} Pause "
fi
} #}}}
#-------------------------#
# SHOW CPU TEMP (XSENSER) #
#-------------------------#
_BLOCK_15_() { #{{{
sensors | awk '/^CPU/{gsub("\+",""); print "'"${1:-} "'"$2}'
} #}}}
#-------------------------#
# SHOW GPU TEMP (XSENSER) #
#-------------------------#
_BLOCK_16_() { #{{{
sensors | awk '/^GPU/{gsub("\+",""); print "'"${1:-} "'"$2}' | tail -1
} #}}}
#----------------------------------#
# SHOW TOUCHPAD STATUS (SYSCLIENT) #
#----------------------------------#
_BLOCK_17_() { #{{{
[ "$(synclient -l | awk '/Touchpad/{print $3}')" = "0" ] && echo "${1:-} Enable" || echo "${1:-} Disable"
} #}}}
#---------------------------#
# SHOW VOLUME STATUS (ALSA) #
#---------------------------#
_BLOCK_18_() { #{{{
local Vol=$(amixer get Master | awk '/Mono:/{gsub("\[|\%|\]",""); print $4}')
local Mute=$(amixer get Master | awk '/Mono:/{gsub("\[|\]",""); print $6}')
if [ "$Mute" = "off" ];then
echo -e " --"
else
if [ "$Vol" -gt "60" ];then
echo -e " $Vol%"
elif [ "$Vol" -gt "30" ];then
echo -e " $Vol%"
elif [ "$Vol" -lt "30" ];then
echo -e " $Vol%"
fi
fi
} #}}}
#----------------------------------------------#
# SHOW WIFI INFO ; IP ; CONNECTED NAME (NMCLI) #
#----------------------------------------------#
_BLOCK_19_() { #{{{
while read -a W ;do
[ "${W[2]}" = "connected" ] && {
_ip=$(nmcli device show ${W[0]} | awk '/^IP4.ADDRESS/{print $NF}')
_name=$(nmcli device show ${W[0]} | awk '/^GENERAL.CONNECTION:/{$1=""; print $0}')
echo -n "${1:-} ${_ip%/*} (${_name} )"
} || {
echo -n "${1:-} ---"
}
done< <(nmcli d | grep -w "wifi")
echo -e ""
} #}}}
#-------------------------------------------#
# SHOW ETHERNET INFO ; IP ; CONNECTED NAME #
#-------------------------------------------#
_BLOCK_20_() { #{{{
while read -a W ;do
[ "${W[2]}" = "connected" ] && {
_ip=$(nmcli device show ${W[0]} | awk '/^IP4.ADDRESS/{print $NF}')
_name=$(nmcli device show ${W[0]} | awk '/^GENERAL.CONNECTION:/{$1=""; print $0}')
echo -n "${1:-} ${_ip%/*} (${_name} ) "
} || {
echo -n "${1:-} ---"
}
done< <(nmcli d | grep "ethernet")
echo -e ""
} #}}}
#-----------------------------------------------#
# SHOW WIFI INFO ; IP6 ; CONNECTED NAME (NMCLI) #
#-----------------------------------------------#
_BLOCK_21_() { #{{{
while read -a W ;do
[ "${W[2]}" = "connected" ] && {
_ip=$(nmcli device show ${W[0]} | awk '/^IP6.ADDRESS/{print $NF}')
_name=$(nmcli device show ${W[0]} | awk '/^GENERAL.CONNECTION:/{$1=""; print $0}')
echo -n "${1:-} ${_ip%/*} (${_name} ) "
} || {
echo -n "${1:-} ---"
}
done< <(nmcli d | grep "wifi")
echo -e ""
} #}}}
#--------------------------------------------#
# SHOW ETHERNET INFO ; IP6 ; CONNECTED NAME #
#--------------------------------------------#
_BLOCK_22_() { #{{{
while read -a W ;do
[ "${W[2]}" = "connected" ] && {
_ip=$(nmcli device show ${W[0]} | awk '/^IP6.ADDRESS/{print $NF}')
_name=$(nmcli device show ${W[0]} | awk '/^GENERAL.CONNECTION:/{$1=""; print $0}')
echo -n "${1:-} ${_ip%/*} (${_name} ) "
} || {
echo -n "${1:-} ---"
}
done< <(nmcli d | grep "ethernet")
echo -e ""
} #}}}
#-------------------------------#
# SHOW PROSSES USE BY THIS USER #
#-------------------------------#
_BLOCK_23_() { #{{{
echo "${1:-} $(ps -U $USER | wc -l)"
} #}}}
#---------------------#
# SHOW SYSTEM KERENEL #
#---------------------#
_BLOCK_24_() { #{{{
echo "${1:-} $(uname -r)"
} #}}}
#-----------------------------#
# SHOW USB PLUG IN UR COMPUTE #
#-----------------------------#
_BLOCK_25_() { #{{{
echo "${1:-} $(lsblk -l -o 'TRAN' | grep -c "usb")"
} #}}}
#---------------------------------------#
# SHOW TOTAL PKGS INSTALL IN YOUR SYSTE #
#---------------------------------------#
_BLOCK_26_() { #{{{
echo "${1:-} $(dpkg -l | grep -c "^ii")"
} #}}}
#--------------------------------------------#
# CHECK IF THERE IS ANY UPDATE IN UR SYSTEM #
#--------------------------------------------#
_BLOCK_27_() { #{{{
local U_PKGS=$(apt-get -s -o APT::Get::Show-User-Simulation-Note=0 dist-upgrade | grep "^\s\s" | wc -w);
echo "${1:-} $U_PKGS"
} #}}}
#-----------------#
# SHOW UFW STATUS #
#-----------------#
_BLOCK_28_() { #{{{
[ "$(systemctl status ufw | awk '/Active:/{print $2}')" == "active" ] && echo "${1:-} On" || echo "${1:-} Off"
} #}}}
#-------------------------#
# SHOW NUMBER LOCK STATUS #
#-------------------------#
_BLOCK_29_() { #{{{
[ "$(xset -q | awk '/00:/{print $8}')" == "on" ] && echo "${1:-} On" || echo "${1:-} Off"
} #}}}
#-----------------------#
# SHOW BLUETOOTH STATUS #
#-----------------------#
_BLOCK_30_() { #{{{
[ "$(systemctl status bluetooth.target | awk '/Active:/{print $2}')" == "active" ] && echo "${1:-} On" || echo "${1:-} Off"
} #}}}
#------------------------#
# SHOW CAPS LOCK STATUS #
#------------------------#
_BLOCK_31_() { #{{{
[ "$(xset -q | awk '/00:/{print $4}')" == "on" ] && echo "${1:-} On" || echo "${1:-} Off"
} #}}}
#-----------------------------#
# DISPLAY X SCREENSAVER STATE #
#-----------------------------#
_BLOCK_32_() { #{{{
[ "$(xdg-screensaver status)" != "enabled" ] && echo "${1:-} Off" || echo "${1:-} On"
} #}}}
#--------------------------------#
# CALCULE MOUNT POINTS ON SYSTEM #
#--------------------------------#
_BLOCK_33_() { #{{{
echo "${1:-} $(cat /proc/mounts | grep -c "^/dev/sd*") "
} #}}}
#-------------------------#
# SHOW CMUS PLAYING SONG #
#-------------------------#
_BLOCK_34_() { #{{{
local CMUS_P=$(cmus-remote -Q | awk '/^status/{print $2}')
local CMUS_F=$(cmus-remote -Q | awk '/^file/{$1=""; print $2}')
if [ "$CMUS_P" = "Playing" ];then
echo "${1:-} $(basename $CMUS_F)"
else
echo "${1:-} Pause"
fi
} #}}}
#----------------------#
# SHOW APPARMOR STATUS #
#----------------------#
_BLOCK_35_() { #{{{
[ "$(aa-enabled)" = "Yes" ] && {
echo "${1:-} On"
}||{
echo "${1:-} Off"
}
} #}}}
#-----------------------------#
# SHOW TOTAL PACKAGES IN ARCH #
#-----------------------------#{{{
_BLOCK_36_(){
echo "${1:-} $(pacman -Q | grep -c "*")"
}
#}}}
#--------------------#
# SHOW I3 WORKSPACES #
#--------------------#
_BLOCK_37_() { #{{{
i3-msg -t get_workspaces | awk -F , '{
for(i=1;i<=NF;i++){
if($i~"name"){
gsub("\"name\":|\"","",$i)
WK=$i
}
if($i~"focused"){
gsub("\"focused\":","",$i)
WKF=$i
}
if($i~"urgent"){
gsub("\"urgent\":|\]|\}","",$i)
if($i=="false" && WKF=="true"){
printf "%s ", WK
}
if($i=="false" && WKF=="false"){
printf"[%s] ", WK
}
if($i=="true" && WKF=="false"){
printf "[*%s] ", WK
}
if($i=="true" && WKF=="true"){
printf "*%s ", WK
}
}
}
}'
} #}}}
#-----------------#
# SHOW USER NAME #
#-----------------#
_BLOCK_38_(){ #{{{
echo -e "${1:-} $USER"
} #}}}
#-------------------#
# SHOW VOLUME PULSE #
#-------------------#
_BLOCK_39_(){
local Vol=$(pactl list sinks | awk '/Volume: front/{print $5-"%"}')
local Mute=$(amixer get Master | awk '/Mono:/{gsub("\[|\]",""); print $6}')
if [ "$Mute" = "off" ];then
echo -e " --"
else
if [ "$Vol" -gt "60" ];then
echo -e " $Vol%"
elif [ "$Vol" -gt "30" ];then
echo -e " $Vol%"
elif [ "$Vol" -lt "30" ];then
echo -e " $Vol%"
fi
fi
}
#------------------------#
# USAGE AND HELP DIALOG #
#------------------------#
_USAGE_(){ #{{{
echo -e "
i3b-gate : is a all in one collaction of small script
show you useful unformation about your system
There is 39 deffirent script to use
for more information you can see the 'README' file
or visite 'https://gitlab.com/zakariagatter/i3blocks-gate'
SYNTAX :
i3b-gate [NUMBER] ...
"
} #}}}
#----------------#
# MAIN ARGUMENT #
#----------------#
if [ "$1" -gt "39" ] || [ -z "$1" ] ;then
_USAGE_
elif [ "$1" = "-h" ]; then
_USAGE_
else
eval $(echo "_BLOCK_$1_ $2 $3")
fi

View File

@ -1,26 +0,0 @@
#!/bin/sh
get_current_layout () {
setxkbmap -print | grep -q dvorak
if [ "$?" -eq "0" ]; then
echo dvorak
else
echo qwertz
fi
}
case "$BLOCK_BUTTON" in
1|2|3)
# Switch layout
current_layout=$(get_current_layout)
if [ $current_layout == dvorak ]; then
setxkbmap -layout de
else
setxkbmap -layout de -variant dvorak
fi
esac
current_layout=$(get_current_layout)
echo "$LABEL $current_layout"
echo "$LABEL $current_layout"

View File

@ -1,91 +0,0 @@
#!/usr/bin/env bash
# Copyright (C) 2014 Julien Bonjean <julien@bonjean.info>
# Copyright (C) 2014 Alexander Keller <github@nycroth.com>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#------------------------------------------------------------------------
# The second parameter overrides the mixer selection
# For PulseAudio users, eventually use "pulse"
# For Jack/Jack2 users, use "jackplug"
# For ALSA users, you may use "default" for your primary card
# or you may use hw:# where # is the number of the card desired
if [[ -z "$MIXER" ]] ; then
MIXER="default"
if command -v pulseaudio >/dev/null 2>&1 && pulseaudio --check ; then
# pulseaudio is running, but not all installations use "pulse"
if amixer -D pulse info >/dev/null 2>&1 ; then
MIXER="pulse"
fi
fi
[ -n "$(lsmod | grep jack)" ] && MIXER="jackplug"
MIXER="${2:-$MIXER}"
fi
# The instance option sets the control to report and configure
# This defaults to the first control of your selected mixer
# For a list of the available, use `amixer -D $Your_Mixer scontrols`
if [[ -z "$SCONTROL" ]] ; then
SCONTROL="${BLOCK_INSTANCE:-$(amixer -D $MIXER scontrols |
sed -n "s/Simple mixer control '\([^']*\)',0/\1/p" |
head -n1
)}"
fi
# The first parameter sets the step to change the volume by (and units to display)
# This may be in in % or dB (eg. 5% or 3dB)
if [[ -z "$STEP" ]] ; then
STEP="${1:-5%}"
fi
# AMIXER(1):
# "Use the mapped volume for evaluating the percentage representation like alsamixer, to be
# more natural for human ear."
NATURAL_MAPPING=${NATURAL_MAPPING:-0}
if [[ "$NATURAL_MAPPING" != "0" ]] ; then
AMIXER_PARAMS="-M"
fi
#------------------------------------------------------------------------
capability() { # Return "Capture" if the device is a capture device
amixer $AMIXER_PARAMS -D $MIXER get $SCONTROL |
sed -n "s/ Capabilities:.*cvolume.*/Capture/p"
}
volume() {
amixer $AMIXER_PARAMS -D $MIXER get $SCONTROL $(capability)
}
format() {
perl_filter='if (/.*\[(\d+%)\] (\[(-?\d+.\d+dB)\] )?\[(on|off)\]/)'
perl_filter+='{CORE::say $4 eq "off" ? "MUTE" : "'
# If dB was selected, print that instead
perl_filter+=$([[ $STEP = *dB ]] && echo '$3' || echo '$1')
perl_filter+='"; exit}'
output=$(perl -ne "$perl_filter")
echo "$LABEL $output"
}
#------------------------------------------------------------------------
case $BLOCK_BUTTON in
1|2|3) pavucontrol ;; # right click, open gui
4) amixer $AMIXER_PARAMS -q -D $MIXER sset $SCONTROL $(capability) ${STEP}+ unmute ;; # scroll up, increase
5) amixer $AMIXER_PARAMS -q -D $MIXER sset $SCONTROL $(capability) ${STEP}- unmute ;; # scroll down, decrease
esac
volume | format

View File

@ -1,144 +0,0 @@
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# $PATH is adapted in ~/.profile
[ -f "~/.ghcup/env" ] && source "~/.ghcup/env" # ghcup-env
PERL5LIB="~/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; export PERL5LIB;
PERL_LOCAL_LIB_ROOT="~/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"; export PERL_LOCAL_LIB_ROOT;
PERL_MB_OPT="--install_base \"~/perl5\""; export PERL_MB_OPT;
PERL_MM_OPT="INSTALL_BASE=~/perl5"; export PERL_MM_OPT;
export ANDROID_HOME="$HOME/Android/Sdk"
export TERMINAL="alacritty"
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
# ZSH_THEME="robbyrussell"
# ZSH_THEME="random"
# Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in $ZSH/themes/
# If set to an empty array, this variable will have no effect.
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"
# Uncomment one of the following lines to change the auto-update behavior
# zstyle ':omz:update' mode disabled # disable automatic updates
# zstyle ':omz:update' mode auto # update automatically without asking
# zstyle ':omz:update' mode reminder # just remind me to update when it's time
# Uncomment the following line to change how often to auto-update (in days).
# zstyle ':omz:update' frequency 13
# Uncomment the following line if pasting URLs and other text is messed up.
# DISABLE_MAGIC_FUNCTIONS="true"
# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"
# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
# You can also set it to another string to have that shown instead of the default red dots.
# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f"
# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765)
# COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
# HIST_STAMPS="mm/dd/yyyy"
# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder
# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(
z
web-search
dirhistory
# colored-man-pages
# zsh-interactive-cd
# jsontools
# make it behave like fish
zsh-autosuggestions
history-substring-search
zsh-syntax-highlighting
)
export EDITOR=/usr/bin/nvim
export VISUAL=/usr/bin/nvim
alias vim="nvim"
alias ls="ls --color"
alias grep="grep --color"
alias la="ls -Alh --color"
alias g="git status"
alias bat="bat --paging=never"
# alias emacs="emacsclient -c -a emacs"
mkcd ()
{
mkdir -p -- "$1" && cd -P -- "$1"
}
follow_du () {
/usr/local/bin/follow_du "$@"
cd $(cat /tmp/follow_du_workdir)
}
notify(){
start=$(date +%s)
"$@"
exit_code="$?"
message="Command \"$(echo $@)\" finished with exit code $exit_code after $(($(date +%s) - start)) seconds"
gotify push -q $message
notify-send $message
}
source $ZSH/oh-my-zsh.sh
if type starship &> /dev/null; then
eval "$(starship init zsh)"
fi
if type direnv &> /dev/null; then
eval "$(direnv hook zsh)"
fi
BROOT_CONFIG="/home/julian/.config/broot/launcher/bash/br"
if [ -f "$BROOT_CONFIG" ]; then
source "$BROOT_CONFIG"
fi

View File

@ -1,6 +0,0 @@
#!/usr/bin/zsh
fzf-z() {
dir=$(z | fzf --tiebreak=index --tac | sed -E 's/^[0-9]+[[:space:]]+//')
cd $dir
}

View File

@ -1,21 +0,0 @@
#!/usr/bin/zsh
#
# My version of the last-working-dir plugin (https://github.com/ohmyzsh/ohmyzsh/blob/master/plugins/last-working-dir/last-working-dir.plugin.zsh)
#
# Updates the last directory once directory is changed
autoload -U add-zsh-hook
add-zsh-hook chpwd chpwd_last_working_dir
chpwd_last_working_dir() {
# Don't run in subshells
[[ "$ZSH_SUBSHELL" -eq 0 ]] || return 0
pwd > ~/.last-working-dir
}
# Changes directory to the last working directory
lwd() {
if [[ -r ~/.last-working-dir ]]; then
lwd=$(cat ~/.last-working-dir)
cd $lwd
echo $lwd
fi
}