diff --git a/.SpaceVim/init.vim b/.SpaceVim/init.vim deleted file mode 100644 index 635e4c465..000000000 --- a/.SpaceVim/init.vim +++ /dev/null @@ -1,10 +0,0 @@ -"============================================================================= -" init.vim --- Entry file for neovim -" Copyright (c) 2016-2021 Wang Shidong & Contributors -" Author: Wang Shidong < wsdjeg@outlook.com > -" URL: https://spacevim.org -" License: GPLv3 -"============================================================================= - -execute 'source' fnamemodify(expand(''), ':h').'/main.vim' -set guifont=mononoki\ Nerd\ Font:h9 diff --git a/.bashrc b/.bashrc index a7916a10f..14aec5354 100644 --- a/.bashrc +++ b/.bashrc @@ -8,9 +8,7 @@ ### EXPORT export TERM="xterm-256color" # getting proper colors export HISTCONTROL=ignoredups:erasedups # no duplicate entries -export ALTERNATE_EDITOR="" # setting for emacsclient -export EDITOR="emacsclient -t -a ''" # $EDITOR use Emacs in terminal -export VISUAL="emacsclient -c -a emacs" # $VISUAL use Emacs in GUI mode +export EDITOR="nvim" # $EDITOR use neovim ### SET MANPAGER ### "bat" as manpager @@ -71,14 +69,8 @@ alias .5='cd ../../../../..' # bat as cat alias cat='bat' -# vim and DOOM emacs +# neovim as vim alias vim='nvim' -alias doom-sync="~/.emacs.d/bin/doom sync" -alias doom-doctor="~/.emacs.d/bin/doom doctor" -alias doom-upgrade="~/.emacs.d/bin/doom upgrade" -alias doom-purge="~/.emacs.d/bin/doom purge" -alias em='/usr/bin/emacs -nw' -alias emacs="emacsclient -c -a 'emacs'" # Changing "ls" to "exa" alias ls='exa -al --color=always --group-directories-first' # my preferred listing @@ -87,24 +79,13 @@ alias ll='exa -l --color=always --group-directories-first' # long format alias lt='exa -aT --color=always --group-directories-first' # tree listing alias l.='exa -a | egrep "^\."' -# pacman and yay -alias pac-up='sudo pacman -Syyu' # update the whole system -alias pac-get='sudo pacman -S --needed' # install a program -alias pac-qry-sync='sudo pacman -Ss' # query details about a program -alias pac-qry='sudo pacman -Q' # query details about a program -alias pac-rmv='sudo pacman -Rcns' # remove a package with all its dependencies (it may brake something) -alias pac-rmv-sec='sudo pacman -Runs' # remove a package with all its dependencies (secure way) -alias pac-cln='sudo pacman -Rns (pacman -Qtdq)' # remove unnecesary packages -alias pac-unlock='sudo rm /var/lib/pacman/db.lck' # remove pacman lock -alias yay-up='yay -Sua --noconfirm' # update only AUR pkgs (yay) -alias yay-get='yay -S' # install a program for the AUR -alias pac-cln-cache='yay -Scc' # clean package cache - -# get fastest mirrors -alias mirror="sudo reflector -f 30 -l 30 --number 10 --verbose --save /etc/pacman.d/mirrorlist" -alias mirrord="sudo reflector --latest 50 --number 20 --sort delay --save /etc/pacman.d/mirrorlist" -alias mirrors="sudo reflector --latest 50 --number 20 --sort score --save /etc/pacman.d/mirrorlist" -alias mirrora="sudo reflector --latest 50 --number 20 --sort age --save /etc/pacman.d/mirrorlist" +# xbps +alias xb-up='sudo xbps-install -Su' # update the whole system +alias xb-get='sudo xbps-install -S' # install a program +alias xb-qry='sudo xbps-query' # query details about a program +alias xb-rmv='sudo xbps-remove -R' # remove a package with all its dependencies (it may brake something) +alias xb-rmv-sec='sudo xbps-remove' # remove a package with all its dependencies (secure way) +alias xb-cln='sudo xbps-remove -o && sudo xbps-remove -O' # remove unnecesary packages and clean cache # Colorize grep output (good for log files) alias grep='grep --color=auto' @@ -117,21 +98,18 @@ alias mv='mv -i' alias cp='cp -i' # git -alias gt-cl='git clone' +alias git-clone='git clone' # ani-cli alias ani='ani-cli' alias ani-q='ani-cli -q' # to select video quality # ytfzf -alias yt='ytfzf -f' +alias yt='ytfzf -f -t' # notflix alias nt='notflix' -# tty-clock -alias clock='tty-clock' - # mount and unmount drives alias mnt='sudo mount' alias umnt='sudo umount' @@ -143,13 +121,10 @@ alias amx='alsamixer' # music player alias mk='musikcube' -# battery (just for laptops) -alias bt='acpi' - # power management -alias po='systemctl poweroff' -alias sp='systemctl suspend' -alias rb='systemctl reboot' +alias po='loginctl poweroff' +alias sp='loginctl suspend' +alias rb='loginctl reboot' # file manager alias fm='/home/drk/.config/vifm/scripts/./vifmrun' @@ -181,12 +156,6 @@ alias wfi-on='nmcli radio wifi on' alias wfi-off='nmcli radio wifi off' alias blt='bluetoothctl' -# cd to diferent directories -alias games='cd /run/media/Storage/multimedia/games/linux && ls' -alias anime='cd /run/media/Storage/multimedia/videos/anime/ && ls' -alias manga='cd /run/media/Storage/multimedia/manga/ && ls' -alias videos='cd /run/media/Storage/multimedia/videos/ && ls' - # the terminal rickroll alias rr='curl -s -L https://raw.githubusercontent.com/keroserene/rickrollrc/master/roll.sh | bash' diff --git a/.config/alacritty/alacritty.yml b/.config/alacritty/alacritty.yml index 7b09af212..5466808ac 100755 --- a/.config/alacritty/alacritty.yml +++ b/.config/alacritty/alacritty.yml @@ -187,7 +187,7 @@ font: style: Bold Italic # Point size - size: 9.0 + size: 8.5 # Offset is the extra space around each character. `offset.y` can be thought of # as modifying the line spacing, and `offset.x` as modifying the letter spacing. diff --git a/.config/awesome/awesome-wm-widgets/battery-widget/README.md b/.config/awesome/awesome-wm-widgets/battery-widget/README.md deleted file mode 100644 index 9af7a4c48..000000000 --- a/.config/awesome/awesome-wm-widgets/battery-widget/README.md +++ /dev/null @@ -1,74 +0,0 @@ -# Battery widget - -Simple and easy-to-install widget for Awesome Window Manager. - -This widget consists of: - - - an icon which shows the battery level: - ![Battery Widget](./bat-wid-1.png) - - a pop-up window, which shows up when you hover over an icon: - ![Battery Widget](./bat-wid-2.png) - Alternatively you can use a tooltip (check the code): - ![Battery Widget](./bat-wid-22.png) - - a pop-up warning message which appears on bottom right corner when battery level is less that 15% (you can get the image [here](https://vk.com/images/stickers/1933/512.png)): - ![Battery Widget](./bat-wid-3.png) - -Note that widget uses the Arc icon theme, so it should be [installed](https://github.com/horst3180/arc-icon-theme#installation) first under **/usr/share/icons/Arc/** folder. - -## Customization - -It is possible to customize widget by providing a table with all or some of the following config parameters: - -| Name | Default | Description | -|---|---|---| -| `font` | Play 8 | Fond | -| `path_to_icons` | `/usr/share/icons/Arc/status/symbolic/` | Path to the folder with icons* | -| `show_current_level`| false | Show current charge level | -| `margin_right`|0| The right margin of the widget| -| `margin_left`|0| The left margin of the widget| -| `display_notification` | `false` | Display a notification on mouseover | -| `notification_position` | `top_right` | The notification position | -| `timeout` | 10 | How often in seconds the widget refreshes | -| `warning_msg_title` | _Huston, we have a problem_ | Title of the warning popup | -| `warning_msg_text` | _Battery is dying_ | Text of the warning popup | -| `warning_msg_position` | `bottom_right` | Position of the warning popup | -| `warning_msg_icon` | ~/.config/awesome/awesome-wm-widgets/battery-widget/spaceman.jpg | Icon of the warning popup | -| `enable_battery_warning` | `true` | Display low battery warning | - -*Note: the widget expects following icons be present in the folder: - - - battery-caution-charging-symbolic.svg - - battery-empty-charging-symbolic.svg - - battery-full-charged-symbolic.svg - - battery-full-symbolic.svg - - battery-good-symbolic.svg - - battery-low-symbolic.svg - - battery-caution-symbolic.svg - - battery-empty-symbolic.svg - - battery-full-charging-symbolic.svg - - battery-good-charging-symbolic.svg - - battery-low-charging-symbolic.svg - - battery-missing-symbolic.svg - -## Installation - -This widget reads the output of acpi tool. -- install `acpi` and check the output: - -```bash -$ sudo apt-get install acpi -$ acpi -Battery 0: Discharging, 66%, 02:34:06 remaining -``` - -```lua -local battery_widget = require("awesome-wm-widgets.battery-widget.battery") - -... -s.mytasklist, -- Middle widget - { -- Right widgets - layout = wibox.layout.fixed.horizontal, - ... - battery_widget(), - ... -``` diff --git a/.config/awesome/awesome-wm-widgets/battery-widget/bat-wid-1.png b/.config/awesome/awesome-wm-widgets/battery-widget/bat-wid-1.png deleted file mode 100644 index 00e161804..000000000 Binary files a/.config/awesome/awesome-wm-widgets/battery-widget/bat-wid-1.png and /dev/null differ diff --git a/.config/awesome/awesome-wm-widgets/battery-widget/bat-wid-2.png b/.config/awesome/awesome-wm-widgets/battery-widget/bat-wid-2.png deleted file mode 100644 index ae20af2d5..000000000 Binary files a/.config/awesome/awesome-wm-widgets/battery-widget/bat-wid-2.png and /dev/null differ diff --git a/.config/awesome/awesome-wm-widgets/battery-widget/bat-wid-22.png b/.config/awesome/awesome-wm-widgets/battery-widget/bat-wid-22.png deleted file mode 100644 index 38761f70a..000000000 Binary files a/.config/awesome/awesome-wm-widgets/battery-widget/bat-wid-22.png and /dev/null differ diff --git a/.config/awesome/awesome-wm-widgets/battery-widget/bat-wid-3.png b/.config/awesome/awesome-wm-widgets/battery-widget/bat-wid-3.png deleted file mode 100644 index 352b49634..000000000 Binary files a/.config/awesome/awesome-wm-widgets/battery-widget/bat-wid-3.png and /dev/null differ diff --git a/.config/awesome/awesome-wm-widgets/brightness-widget/README.md b/.config/awesome/awesome-wm-widgets/brightness-widget/README.md deleted file mode 100644 index cbf5b7e15..000000000 --- a/.config/awesome/awesome-wm-widgets/brightness-widget/README.md +++ /dev/null @@ -1,93 +0,0 @@ -# Brightness widget - -This widget represents current brightness level, depending on config parameters could be an arcchart or icon with text: ![Brightness widget](./br-wid-1.png) - -## Customization - -It is possible to customize widget by providing a table with all or some of the following config parameters: - -| Name | Default | Description | -|---|---|---| -| `type`| `arc` | The widget type. Could be `arc` or `icon_and_text` | -| `program` | `light` | The program used to control the brightness, either `light`, `xbacklight`, or `brightnessctl`. | -| `step` | 5 | Step | -| `base` | 20 | Base level to set brightness to on left click. | -| `path_to_icon` | `/usr/share/icons/Arc/status/symbolic/display-brightness-symbolic.svg` | Path to the icon | -| `font` | `Play 9` | Font | -| `timeout` | 1 | How often in seconds the widget refreshes. Check the note below | -| `tooltip` | false | Display brightness level in a tooltip when the mouse cursor hovers the widget | - -_Note:_ If brightness is controlled only by the widget (either by a mouse, or by a shortcut, then the `timeout` could be quite big, as there is no reason to synchronize the brightness level). - -## Installation - -To choose the right `program` argument, first you need to check which of them works better for you. - - - using `xbacklight`: - - Install (on Ubuntu it's available in the apt repository) it and check if it works by running: - - ```bash - xbacklight -get - ``` - - If there is no output it means that it doesn't work, you can either try to fix it, or try to use `light`. - - - using `light` command: - - Install (on Ubuntu it's available in the apt repository) from the repo: [github.com/haikarainen/light](https://github.com/haikarainen/light) and check if it works by running - - ```bash - light -G - 49.18 - light -A 5 - ``` - If you're on Ubuntu/debian and if the brightness level doesn't change, try to do this: https://github.com/haikarainen/light/issues/113#issuecomment-632638436. - - - using `brightnessctl`: - - On Ubuntu it is available in the apt repository. Install and check the ouptut of the following command. - ```bash - brightnessctl --list - ``` - -Then clone this repo under **~/.config/awesome/**: - -```bash -git clone https://github.com/streetturtle/awesome-wm-widgets.git ~/.config/awesome/awesome-wm-widgets -``` - -Require widget at the beginning of **rc.lua**: - -```lua -local brightness_widget = require("awesome-wm-widgets.brightness-widget.brightness") -``` - -Add the widget to the tasklist: - -```lua -s.mytasklist, -- Middle widget - { -- Right widgets - layout = wibox.layout.fixed.horizontal, - ... - -- default - brightness_widget(), - -- or customized - brightness_widget{ - type = 'icon_and_text', - program = 'xbacklight', - step = 2, - } - } - ... -``` - -## Controls - -In order to change brightness by shortcuts you can add them to the `globalkeys` table in the **rc.lua**: - -```lua -awful.key({ modkey }, ";", function () brightness_widget:inc() end, {description = "increase brightness", group = "custom"}), -awful.key({ modkey, "Shift"}, ";", function () brightness_widget:dec() end, {description = "decrease brightness", group = "custom"}), -``` -On a laptop you can use `XF86MonBrightnessUp` and `XF86MonBrightnessDown` keys. diff --git a/.config/awesome/awesome-wm-widgets/brightness-widget/br-wid-1.png b/.config/awesome/awesome-wm-widgets/brightness-widget/br-wid-1.png deleted file mode 100644 index b00b0e609..000000000 Binary files a/.config/awesome/awesome-wm-widgets/brightness-widget/br-wid-1.png and /dev/null differ diff --git a/.config/awesome/awesome-wm-widgets/logout-menu-widget/README.md b/.config/awesome/awesome-wm-widgets/logout-menu-widget/README.md deleted file mode 100644 index d47dcb284..000000000 --- a/.config/awesome/awesome-wm-widgets/logout-menu-widget/README.md +++ /dev/null @@ -1,45 +0,0 @@ -# Logout Menu Widget - -This widget shows a menu with options to log out from the current session, lock, reboot, suspend and power off the computer, similar to [logout-popup-widget](https://github.com/streetturtle/awesome-wm-widgets/tree/master/logout-popup-widget): - -![demo](./logout-menu.gif) - -## Installation - -Clone this repo (if not cloned yet) **./.config/awesome/** - -```bash -cd ./.config/awesome/ -git clone https://github.com/streetturtle/awesome-wm-widgets -``` -Then add the widget to the wibar: - -```lua -local logout_menu_widget = require("awesome-wm-widgets.logout-menu-widget.logout-menu") - -s.mytasklist, -- Middle widget - { -- Right widgets - layout = wibox.layout.fixed.horizontal, - ... - -- default - logout_menu_widget(), - -- custom - logout_menu_widget{ - font = 'Play 14', - onlock = function() awful.spawn.with_shell('i3lock-fancy') end - } - ... -``` - -## Customization - -It is possible to customize the widget by providing a table with all or some of the following config parameters: - -| Name | Default | Description | -|---|---|---| -| `font` | `beautiful.font` | Font of the menu items | -| `onlogout` | `function() awesome.quit() end` | Function which is called when the logout item is clicked | -| `onlock` | `function() awful.spawn.with_shell("i3lock") end` | Function which is called when the lock item is clicked | -| `onreboot` | `function() awful.spawn.with_shell("reboot") end` | Function which is called when the reboot item is clicked | -| `onsuspend` | `function() awful.spawn.with_shell("systemctl suspend") end` | Function which is called when the suspend item is clicked | -| `onpoweroff` | `function() awful.spawn.with_shell("shutdown now") end` | Function which is called when the poweroff item is clicked | diff --git a/.config/awesome/awesome-wm-widgets/logout-menu-widget/logout-menu.gif b/.config/awesome/awesome-wm-widgets/logout-menu-widget/logout-menu.gif deleted file mode 100644 index 9f17b5133..000000000 Binary files a/.config/awesome/awesome-wm-widgets/logout-menu-widget/logout-menu.gif and /dev/null differ diff --git a/.config/awesome/awesome-wm-widgets/logout-menu-widget/logout-menu.lua b/.config/awesome/awesome-wm-widgets/logout-menu-widget/logout-menu.lua index 4a19021a5..b4c59da0b 100644 --- a/.config/awesome/awesome-wm-widgets/logout-menu-widget/logout-menu.lua +++ b/.config/awesome/awesome-wm-widgets/logout-menu-widget/logout-menu.lua @@ -53,9 +53,9 @@ local function worker(user_args) local onlogout = args.onlogout or function () awesome.quit() end local onlock = args.onlock or function() awful.spawn.with_shell("betterlockscreen -l") end - local onreboot = args.onreboot or function() awful.spawn.with_shell("reboot") end - local onsuspend = args.onsuspend or function() awful.spawn.with_shell("systemctl suspend") end - local onpoweroff = args.onpoweroff or function() awful.spawn.with_shell("poweroff") end + local onreboot = args.onreboot or function() awful.spawn.with_shell("loginctl reboot") end + local onsuspend = args.onsuspend or function() awful.spawn.with_shell("loginctl suspend && betterlockscreen -l") end + local onpoweroff = args.onpoweroff or function() awful.spawn.with_shell("loginctl poweroff") end local menu_items = { { name = 'Log out', icon_name = 'log-out.svg', command = onlogout }, diff --git a/.config/awesome/awesome-wm-widgets/volume-widget/README.md b/.config/awesome/awesome-wm-widgets/volume-widget/README.md deleted file mode 100644 index 4fc7f5573..000000000 --- a/.config/awesome/awesome-wm-widgets/volume-widget/README.md +++ /dev/null @@ -1,119 +0,0 @@ -# Volume widget - -Volume widget based on [amixer](https://linux.die.net/man/1/amixer) (is used for controlling the audio volume) and [pacmd](https://linux.die.net/man/1/pacmd) (is used for selecting a sink/source). Also, the widget provides an easy way to customize how it looks, following types are supported out-of-the-box: - -![types](screenshots/variations.png) - -From left to right: `horizontal_bar`, `vertical_bar`, `icon`, `icon_and_text`, `arc` - -A right-click on the widget opens a popup where you can choose a sink/source: -![sink-sources](screenshots/volume-sink-sources.png) - -Left click toggles mute and middle click opens a mixer ([pavucontrol](https://freedesktop.org/software/pulseaudio/pavucontrol/) by default). - -### Features - - - switch between sinks/sources by right click on the widget; - - more responsive than previous versions of volume widget, which were refreshed once a second; - - 5 predefined customizable looks; - -## Installation - -Clone the repo under **~/.config/awesome/** and add widget in **rc.lua**: - -```lua -local volume_widget = require('awesome-wm-widgets.volume-widget.volume') -... -s.mytasklist, -- Middle widget - { -- Right widgets - layout = wibox.layout.fixed.horizontal, - ... - -- default - volume_widget(), - -- customized - volume_widget{ - widget_type = 'arc' - }, -``` - -Note that widget uses following command the get the current volume: `amixer -D pulse sget Master`, so please make sure that it works for you, otherwise you need to set parameter `device = 'default'`. - -### Shortcuts - -To improve responsiveness of the widget when volume level is changed by a shortcut use corresponding methods of the widget: - -```lua -awful.key({ modkey }, "]", function() volume_widget:inc(5) end), -awful.key({ modkey }, "[", function() volume_widget:dec(5) end), -awful.key({ modkey }, "\\", function() volume_widget:toggle() end), -``` - -## Customization - -It is possible to customize the widget by providing a table with all or some of the following config parameters: - -### Generic parameter - -| Name | Default | Description | -|---|---|---| -| `mixer_cmd` | `pavucontrol` | command to run on middle click (e.g. a mixer program) | -| `step` | `5` | How much the volume is raised or lowered at once (in %) | -| `widget_type`| `icon_and_text`| Widget type, one of `horizontal_bar`, `vertical_bar`, `icon`, `icon_and_text`, `arc` | -| `device` | `pulse` | Select the device name to control | - -Depends on the chosen widget type add parameters from the corresponding section below: - -#### `icon` parameters - -| Name | Default | Description | -|---|---|---| -| `icon_dir`| `./icons`| Path to the folder with icons | - -_Note:_ if you are changing icons, the folder should contain following .svg images: - - audio-volume-high-symbolic - - audio-volume-medium-symbolic - - audio-volume-low-symbolic - - audio-volume-muted-symbolic - -#### `icon_and_text` parameters - -| Name | Default | Description | -|---|---|---| -| `icon_dir`| `./icons`| Path to the folder with icons | -| `font` | `beautiful.font` | Font name and size, like `Play 12` | - -#### `arc` parameters - -| Name | Default | Description | -|---|---|---| -| `thickness` | 2 | Thickness of the arc | -| `main_color` | `beautiful.fg_color` | Color of the arc | -| `bg_color` | `#ffffff11` | Color of the arc's background | -| `mute_color` | `beautiful.fg_urgent` | Color of the arc when mute | -| `size` | 18 | Size of the widget | - -#### `horizontal_bar` parameters - -| Name | Default | Description | -|---|---|---| -| `main_color` | `beautiful.fg_normal` | Color of the bar | -| `mute_color` | `beautiful.fg_urgent` | Color of the bar when mute | -| `bg_color` | `'#ffffff11'` | Color of the bar's background | -| `width` | `50` | The bar width | -| `margins` | `10` | Top and bottom margins (if your wibar is 22 px high, bar will be 2 px = 22 - 2*10) | -| `shape` | `'bar'` | [gears.shape](https://awesomewm.org/doc/api/libraries/gears.shape.html), could be `octogon`, `hexagon`, `powerline`, etc | -| `with_icon` | `true` | Show volume icon| - -_Note:_ I didn't figure out how does the `forced_height` property of progressbar widget work (maybe it doesn't work at all), thus there is a workaround with margins. - -#### `vertical_bar` parameters - -| Name | Default | Description | -|---|---|---| -| `main_color` | `beautiful.fg_normal` | Color of the bar | -| `mute_color` | `beautiful.fg_urgent` | Color of the bar when mute | -| `bg_color` | `'#ffffff11'` | Color of the bar's background | -| `width` | `10` | The bar width | -| `margins` | `20` | Top and bottom margins (if your wibar is 22 px high, bar will be 2 px = 22 - 2*10) | -| `shape` | `'bar'` | [gears.shape](https://awesomewm.org/doc/api/libraries/gears.shape.html), could be `octogon`, `hexagon`, `powerline`, etc | -| `with_icon` | `true` | Show volume icon| diff --git a/.config/awesome/awesome-wm-widgets/volume-widget/screenshots/variations.png b/.config/awesome/awesome-wm-widgets/volume-widget/screenshots/variations.png deleted file mode 100644 index 21d7eadf5..000000000 Binary files a/.config/awesome/awesome-wm-widgets/volume-widget/screenshots/variations.png and /dev/null differ diff --git a/.config/awesome/awesome-wm-widgets/volume-widget/screenshots/volume-sink-sources.png b/.config/awesome/awesome-wm-widgets/volume-widget/screenshots/volume-sink-sources.png deleted file mode 100644 index 7d010bcc7..000000000 Binary files a/.config/awesome/awesome-wm-widgets/volume-widget/screenshots/volume-sink-sources.png and /dev/null differ diff --git a/.config/awesome/config.org b/.config/awesome/config.org deleted file mode 100644 index e0234ad15..000000000 --- a/.config/awesome/config.org +++ /dev/null @@ -1,668 +0,0 @@ -#+TITLE: DRK's Awesome Config -#+AUTHOR: Clay Gomera (Drake) -#+DESCRIPTION: This my full awesome config for my laptop. -#+PROPERTY: header-args :tangle rc.lua - -* TABLE OF CONTENTS :toc: -- [[#about-this-config][ABOUT THIS CONFIG]] -- [[#libraries][Libraries]] -- [[#handle-runtime-errors-after-startup][Handle runtime errors after startup]] -- [[#themes][Themes]] -- [[#layouts][Layouts]] -- [[#lain-layouts][Lain layouts]] -- [[#default-awesome-variables][Default Awesome variables]] -- [[#personal-variables][Personal Variables]] -- [[#tags][Tags]] -- [[#wibox-and-wallpaper-stuff][Wibox and wallpaper stuff]] -- [[#bindings][Bindings]] -- [[#rules][Rules]] -- [[#signals][Signals]] -- [[#mouse-client-focus][Mouse client focus]] -- [[#autorun][Autorun]] - -* ABOUT THIS CONFIG -Awesome is a highly configurable, next generation framework window manager for X. It is very fast, extensible and licensed under the GNU GPLv2 license. It is primarily targeted at power users, developers and any people dealing with every day computing tasks and who want to have fine-grained control on their graphical environment. This is the Awesome configuration of Clay Gomera (Drake) fully written in ORG mode inside EMACS. This is just a personal hobby that gives me all the freedom and posibilites to learn how to code and use text editors like Emacs. - -#+CAPTION: An example screenshot -#+NAME: screenshot -#+attr_org: :width 750 -[[./screenshot.png]] - -* Libraries -This is where you put custom libraries like lain or awesome-wm-widgets. -#+begin_src lua - -- Standard awesome library -local gears = require("gears") --Utilities such as color parsing and objects -local awful = require("awful") --Everything related to window managment -require("awful.autofocus") - -- Custom libraries -local battery_widget = require("awesome-wm-widgets.battery-widget.battery") -local volume_widget = require('awesome-wm-widgets.volume-widget.volume') -local brightness_widget = require("awesome-wm-widgets.brightness-widget.brightness") -local logout_menu_widget = require("awesome-wm-widgets.logout-menu-widget.logout-menu") - -- Widget and layout library -local wibox = require("wibox") - -- Theme handling library -local beautiful = require("beautiful") - -- Notification library -local naughty = require("naughty") -naughty.config.defaults['icon_size'] = 100 - -- Lain library -local lain = require("lain") --- Enable hotkeys help widget for VIM and other apps --- when client with a matching name is opened: -local hotkeys_popup = require("awful.hotkeys_popup").widget - require("awful.hotkeys_popup.keys") -local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility -#+end_src - -* Handle runtime errors after startup -This section manages all the errors and error notifications. -#+begin_src lua -if awesome.startup_errors then - naughty.notify({ preset = naughty.config.presets.critical, - title = "Oops, there were errors during startup!", - text = awesome.startup_errors }) end -do - local in_error = false - awesome.connect_signal("debug::error", function (err) - -- Make sure we don't go into an endless error loop - if in_error then return end - in_error = true - naughty.notify({ preset = naughty.config.presets.critical, - title = "Oops, an error happened!", - text = tostring(err) }) - in_error = false - end) -end -local function run_once(cmd_arr) - for _, cmd in ipairs(cmd_arr) do - awful.spawn.with_shell(string.format("pgrep -u $USER -fx '%s' > /dev/null || (%s)", cmd, cmd)) - end -end -run_once({ "unclutter -root" }) -- entries must be comma-separated -#+end_src - -* Themes -Here you chose your theme, tipically you will use a lain theme like powerarrow or multicolor, my custom theme is a fork of the powerarrow_dark theme focused on the gruvbox color palette and functional integration with the awesome-wm-widgets library. To setup more themes you need to put them into the themes folder located here in the awesome .config folder, then you need to add them into that variable called "local theme = { "theme1", "theme2" }". All the themes are indentified with a number as you can see down there, so to chose a theme you need to edit the variable "local chosen_theme = themes[1,2,3,etc]" to specify the theme that you want. -#+begin_src lua -local themes = { - "gruvbox-dark" -- 1 -} -local chosen_theme = themes[1] -local theme_path = string.format("%s/.config/awesome/themes/%s/theme.lua", os.getenv("HOME"), chosen_theme) -beautiful.init(theme_path) -beautiful.init(string.format(gears.filesystem.get_configuration_dir() .. "/themes/%s/theme.lua", chosen_theme)) -#+end_src - -* Layouts -Here you can comment out the layouts that you don't want to use or put them in another order. -#+begin_src lua -awful.layout.suit.tile.left.mirror = true -awful.layout.layouts = { - awful.layout.suit.tile, - awful.layout.suit.tile.left, - awful.layout.suit.tile.bottom, - awful.layout.suit.tile.top, - --awful.layout.suit.fair, - --awful.layout.suit.fair.horizontal, - --awful.layout.suit.spiral, - --awful.layout.suit.spiral.dwindle, - awful.layout.suit.max, - --awful.layout.suit.max.fullscreen, - awful.layout.suit.magnifier, - awful.layout.suit.floating, - --awful.layout.suit.corner.nw, - --awful.layout.suit.corner.ne, - --awful.layout.suit.corner.sw, - --awful.layout.suit.corner.se, - --lain.layout.cascade, - --lain.layout.cascade.tile, - --lain.layout.centerwork, - --lain.layout.centerwork.horizontal, - --lain.layout.termfair, - --lain.layout.termfair.center, -} -#+end_src - -* Lain layouts -These are the lain layouts, i don't know what is this yet. -#+begin_src lua -lain.layout.termfair.nmaster = 3 -lain.layout.termfair.ncol = 1 -lain.layout.termfair.center.nmaster = 3 -lain.layout.termfair.center.ncol = 1 -lain.layout.cascade.tile.offset_x = 2 -lain.layout.cascade.tile.offset_y = 32 -lain.layout.cascade.tile.extra_padding = 5 -lain.layout.cascade.tile.nmaster = 5 -lain.layout.cascade.tile.ncol = 2 -#+end_src - -* Default Awesome variables -Here are the defaults awesome variables, just the terminal. -#+begin_src lua -awful.util.terminal = terminal -#+end_src - -* Personal Variables -Here are my personal variables. -#+begin_src lua -local emacs = "emacsclient -c -a 'emacs'" -local spacevim = os.getenv("EDITOR") or "neovide" -local terminal = "alacritty" -local filemanager = "alacritty -e ./.config/vifm/scripts/vifmrun" -local filemanagergui = "pcmanfm" -local audiomixer = "alacritty -e pulsemixer" -local audiomixer2 = "alacritty -e alsamixer" -local browser = "librewolf" -local browser2 = "qutebrowser" -local musicplayer = "alacritty -e musikcube" -local musicplayergui = "lollypop" -local emailclient = "thunderbird" -local chat1 = "element-desktop" -local chat2 = "whatsapp-for-linux" -local notes = "joplin-desktop" -local passwords = "bitwarden-desktop" -local screenlocker = "betterlockscreen -l" - --- Key bindings variables -local modkey = "Mod4" -local altkey = "Mod1" -local modkey1 = "Control" -#+end_src - -* Tags -Here are the tagnames, you can edit them as you wish. -#+begin_src lua -awful.util.tagnames = { " CODE ", " WEB ", " MUSIC ", " CHAT ", " FILE ", " NOTES ", " WORK1 ", " WORK2 ", " GAME " } -#+end_src - -* Wibox and wallpaper stuff -Just wibox and wallpaper stuff, i use nitrogen and tipically you will edit your wibox settings in the theme.lua file located in your theme's folder. So this isn't really useful to modify. -#+begin_src lua -awful.util.taglist_buttons = my_table.join( - awful.button({ }, 1, function(t) t:view_only() end), - awful.button({ modkey }, 1, function(t) - if client.focus then - client.focus:move_to_tag(t) - end - end), - awful.button({ }, 3, awful.tag.viewtoggle), - awful.button({ modkey }, 3, function(t) - if client.focus then - client.focus:toggle_tag(t) - end - end), - awful.button({ }, 4, function(t) awful.tag.viewnext(t.screen) end), - awful.button({ }, 5, function(t) awful.tag.viewprev(t.screen) end) -) -awful.util.tasklist_buttons = my_table.join( - awful.button({ }, 1, function (c) - if c == client.focus then - c.minimized = true - else - c:emit_signal("request::activate", "tasklist", {raise = true}) - end - end), - awful.button({ }, 3, function () - local instance = nil - - return function () - if instance and instance.wibox.visible then - instance:hide() - instance = nil - else - instance = awful.menu.clients({theme = {width = 250}}) - end - end - end), - awful.button({ }, 4, function () awful.client.focus.byidx(1) end), - awful.button({ }, 5, function () awful.client.focus.byidx(-1) end) -) -screen.connect_signal("property::geometry", function(s) - if beautiful.wallpaper then - local wallpaper = beautiful.wallpaper - if type(wallpaper) == "function" then - wallpaper = wallpaper(s) - end - gears.wallpaper.maximized(wallpaper, s, true) - end -end) -awful.screen.connect_for_each_screen(function(s) beautiful.at_screen_connect(s) end) -#+end_src - -* Bindings -This sections is all about keyboard shortcuts or being more correct "bindings". This is the most important part of this config, all the tags are app centric, this means that they are there to host a specific application or type of applications. -|-----------+---------+-----+--------------------+----------------------------------------------------------------------------------------------| -| Tagnumber | Tagname | Key | Type | App | -|-----------+---------+-----+--------------------+----------------------------------------------------------------------------------------------| -| 1 | CODE | F1 | Text editors | Super + F1 = Emacs / Super + Shift + F1 = spacevim | -| 2 | WEB | F2 | Web browsers | Super + F2 = firefox / Super + Shift + F2 = qutebrowser | -| 3 | MUSIC | F3 | Music players | Super + F3 = musikcube / Super + Shift + F3 = lollypop | -| 4 | CHAT | F4 | Messaging apps | Super + F4 = element / Super + Shift + F4 = whatsapp | -| 5 | FILE | F5 | File managers | Super + F5 = vifm / Super + Shift + F5 = pcmanfm | -| 6 | NOTES | F6 | Note taking app | Super + F6 = joplin | -| 7 | WORK1 | XX | Work in progress 1 | Super + d = opens rofi to select a program | -| 8 | WORK2 | XX | Work in progress 2 | Super + d = opens rofi to select a program | -| 9 | GAME | F9 | Games | Super + F9 = retroarch | -|-----------+---------+-----+--------------------+----------------------------------------------------------------------------------------------| -| X | XXXX | XX | tag agnostic | Super + Shift + m = pulsemixer / Super + Alt + m = alsamixer / Super + Shift + p = bitwarden | -|-----------+---------+-----+--------------------+----------------------------------------------------------------------------------------------| - -#+begin_src lua --- Mouse bindings -root.buttons(gears.table.join( - awful.button({ }, 4, awful.tag.viewnext), - awful.button({ }, 5, awful.tag.viewprev) -)) - --- Awesome things -globalkeys = my_table.join( - awful.key({ modkey, }, "s", hotkeys_popup.show_help, - {description="show help", group="awesome"}), - awful.key({ modkey, "Control" }, "r", awesome.restart, - {description = "reload awesome", group = "awesome"}), - awful.key({ modkey, "Shift" }, "q", awesome.quit, - {description = "quit awesome", group = "awesome"}), - --- Tag browsing arrow keys and escape - awful.key({ modkey, }, "Left", awful.tag.viewprev, - {description = "view previous", group = "tag"}), - awful.key({ modkey, }, "Right", awful.tag.viewnext, - {description = "view next", group = "tag"}), - awful.key({ modkey, }, "Escape", awful.tag.history.restore, - {description = "go back", group = "tag"}), - --- Tag browsing alt + tab - awful.key({ altkey, }, "Tab", awful.tag.viewnext, - {description = "view next", group = "tag"}), - awful.key({ altkey, "Shift" }, "Tab", awful.tag.viewprev, - {description = "view previous", group = "tag"}), - --- Copy primary to clipboard (terminals to gtk) - awful.key({ modkey }, "c", function () awful.spawn.with_shell("xsel | xsel -i -b") end, - {description = "copy terminal to gtk", group = "hotkeys"}), - --- Copy clipboard to primary (gtk to terminals) - awful.key({ modkey }, "v", function () awful.spawn.with_shell("xsel -b | xsel") end, - {description = "copy gtk to terminal", group = "hotkeys"}), - --- Client focus - awful.key({ modkey, }, "j", function () awful.client.focus.byidx( 1) end, - {description = "focus next by index", group = "client"}), - awful.key({ modkey, }, "k", function () awful.client.focus.byidx(-1) end, - {description = "focus previous by index", group = "client"}), - --- Layout manipulation - awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end, - {description = "swap with next client by index", group = "client"}), - awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end, - {description = "swap with previous client by index", group = "client"}), - awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end, - {description = "focus the next screen", group = "screen"}), - awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end, - {description = "focus the previous screen", group = "screen"}), - awful.key({ modkey, }, "u", awful.client.urgent.jumpto, - {description = "jump to urgent client", group = "client"}), - awful.key({ modkey, }, "Tab", - function () - awful.client.focus.history.previous() - if client.focus then - client.focus:raise() - end - end, - {description = "go back", group = "client"}), - awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end, - {description = "increase master width factor", group = "layout"}), - awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end, - {description = "decrease master width factor", group = "layout"}), - awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1, nil, true) end, - {description = "increase the number of master clients", group = "layout"}), - awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1, nil, true) end, - {description = "decrease the number of master clients", group = "layout"}), - awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1, nil, true) end, - {description = "increase the number of columns", group = "layout"}), - awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1, nil, true) end, - {description = "decrease the number of columns", group = "layout"}), - awful.key({ modkey, }, "space", function () awful.layout.inc( 1) end, - {description = "select next", group = "layout"}), - awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(-1) end, - {description = "select previous", group = "layout"}), - --- Terminal - awful.key({ modkey }, "Return", function() awful.spawn(terminal) end, - {description = "launch a terminal", group = "apps"}), - --- Rofi - awful.key({ modkey }, "d", function () awful.spawn(string.format("rofi -show drun", beautiful.bg_normal, beautiful.fg_normal, beautiful.bg_focus, beautiful.fg_focus)) end, - {description = "show rofi drun menu", group = "hotkeys"}), - awful.key({ modkey }, "r", function () awful.spawn(string.format("rofi -show run", beautiful.bg_normal, beautiful.fg_normal, beautiful.bg_focus, beautiful.fg_focus)) end, - {description = "show rofi run menu", group = "hotkeys"}), - awful.key({ modkey }, "Tab", function () awful.spawn(string.format("rofi -show window", beautiful.bg_normal, beautiful.fg_normal, beautiful.bg_focus, beautiful.fg_focus)) end, - {description = "show rofi window menu", group = "hotkeys"}), - awful.key({ modkey }, "w", function () awful.util.spawn("/home/drk/.shell-scripts/./rofi-wifi-menu.sh") end, - {description = "show rofi wifi menu", group = "hotkeys"}), - awful.key({ modkey, altkey }, "Delete", function () awful.util.spawn("/home/drk/.shell-scripts/./rofi-power-menu.sh") end, - {description = "show rofi power menu", group = "hotkeys"}), - awful.key({ modkey, altkey }, "Print", function () awful.util.spawn("/home/drk/.shell-scripts/./rofi-scrot-menu.sh") end, - {description = "show rofi scrot menu", group = "hotkeys"}), - --- Keyboard Layouts - awful.key({ modkey, "Shift" }, "e", function () awful.util.spawn("setxkbmap -layout es") end, - {description = "switch to es keyboard layout", group = "keyboard"}), - awful.key({ modkey, "Shift" }, "u", function () awful.util.spawn("setxkbmap -layout us") end, - {description = "switch to us keyboard layout", group = "keyboard"}), - --- Apps - -- code - awful.key({ modkey }, "F1", function () awful.spawn(emacs) end, - {description = "launch emacs", group = "apps"}), - awful.key({ modkey, "Shift" }, "F1", function () awful.spawn(spacevim) end, - {description = "launch spacevim", group = "apps"}), - -- web - awful.key({ modkey }, "F2", function () awful.spawn(browser) end, - {description = "launch firefox", group = "apps"}), - awful.key({ modkey, "Shift" }, "F2", function () awful.spawn(browser2) end, - {description = "launch qutebrowser", group = "apps"}), - -- music - awful.key({ modkey }, "F3", function () awful.spawn(musicplayer) end, - {description = "launch musikcube", group = "apps"}), - awful.key({ modkey, "Shift" }, "F3", function () awful.spawn(musicplayergui) end, - {description = "launch lollypop", group = "apps"}), - -- chat - awful.key({ modkey }, "F4", function () awful.spawn(chat1) end, - {description = "launch element", group = "apps"}), - awful.key({ modkey, "Shift" }, "F4", function () awful.spawn(chat2) end, - {description = "launch whatsapp", group = "apps"}), - -- file - awful.key({ modkey }, "F5", function () awful.spawn(filemanager) end, - {description = "launch vifm", group = "apps"}), - awful.key({ modkey, "Shift" }, "F5", function () awful.spawn(filemanagergui) end, - {description = "launch pcmanfm", group = "apps"}), - -- notes - awful.key({ modkey }, "F6", function () awful.spawn(notes) end, - {description = "launch joplin", group = "apps"}), - -- tag agnostic - awful.key({ modkey, "Shift" }, "m", function () awful.spawn(audiomixer) end, - {description = "launch pulsemixer", group = "apps"}), - awful.key({ modkey, altkey }, "m", function () awful.spawn(audiomixer2) end, - {description = "launch alsamixer", group = "apps"}), - awful.key({ modkey, altkey }, "p", function () awful.spawn(passwords) end, - {description = "launch bitwarden", group = "apps"}), - -- game - awful.key({ modkey }, "F9", function () awful.util.spawn("retroarch") end, - {description = "launch retroarch", group = "apps"}), - --- Volume Control - awful.key({}, "XF86AudioRaiseVolume", function() volume_widget:inc(5) end, - {description = "increase volume", group = "volume"}), - awful.key({}, "XF86AudioLowerVolume", function() volume_widget:dec(5) end, - {description = "decrease volume", group = "volume"}), - awful.key({}, "XF86AudioMute", function() volume_widget:toggle() end, - {description = "mute volume", group = "volume"}), - --- Screenshot - awful.key({}, "Print", function() awful.util.spawn("scrot") end, - {description = "take a complete screenshot", group = "screenshot"}), - awful.key({"Control"}, "Print", function() awful.util.spawn("scrot -s") end, - {description = "take an area screenshot", group = "screenshot"}), - --- Brightness - awful.key({}, "XF86MonBrightnessUp", function () brightness_widget:inc(5) end, - {description = "increase brightness", group = "brightness"}), - awful.key({}, "XF86MonBrightnessDown", function () brightness_widget:dec(5) end, - {description = "decrease brightness", group = "brightness"}), - --- Screen configuration - awful.key({ modkey }, "p", function() awful.util.spawn("arandr") end, - {description = "launch screen configuration tool", group = ("screen")}), - --- Screen Lock - awful.key({ modkey, modkey1 }, "l", function() awful.spawn(screenlocker) end, - {description = "lock the screen", group = "screen"}), - --- Show/Hide Wibox - awful.key({ modkey }, "b", function () - for s in screen do - s.mywibox.visible = not s.mywibox.visible - if s.mybottomwibox then - s.mybottomwibox.visible = not s.mybottomwibox.visible - end - end - end, - {description = "toggle wibox", group = "awesome"}), - --- On the fly useless gaps change - awful.key({ altkey, "Control" }, "j", function () lain.util.useless_gaps_resize(1) end, - {description = "increment gaps", group = "tag"}), - awful.key({ altkey, "Control" }, "l", function () lain.util.useless_gaps_resize(-1) end, - {description = "decrement gaps", group = "tag"}), - --- Dynamic tagging - awful.key({ modkey, "Shift" }, "n", function () lain.util.add_tag() end, - {description = "add new tag", group = "tag"}), - awful.key({ modkey, "Control" }, "r", function () lain.util.rename_tag() end, - {description = "rename tag", group = "tag"}), - awful.key({ modkey, "Shift" }, "Left", function () lain.util.move_tag(-1) end, - {description = "move tag to the left", group = "tag"}), - awful.key({ modkey, "Shift" }, "Right", function () lain.util.move_tag(1) end, - {description = "move tag to the right", group = "tag"}), - awful.key({ modkey, "Shift" }, "d", function () lain.util.delete_tag() end, - {description = "delete tag", group = "tag"}), - --- Minimize, maximize, moving clients, fullscreen, etc - awful.key({ modkey, "Control" }, "n", - function () - local c = awful.client.restore() - -- Focus restored client - if c then - client.focus = c - c:raise() - end - end, - {description = "restore minimized", group = "client"}) -) -clientkeys = gears.table.join( - awful.key({ modkey, }, "f", function (c) c.fullscreen = not c.fullscreen c:raise() end, - {description = "toggle fullscreen", group = "client"}), - awful.key({ modkey }, "q", function (c) c:kill() end, - {description = "close", group = "client"}), - awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle, - {description = "toggle floating", group = "client"}), - awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end, - {description = "move to master", group = "client"}), - awful.key({ modkey, }, "o", function (c) c:move_to_screen() end, - {description = "move to screen", group = "client"}), - awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end, - {description = "toggle keep on top", group = "client"}), - awful.key({ modkey, }, "n", - function (c) - c.minimized = true - end , - {description = "minimize", group = "client"}), - awful.key({ modkey, }, "m", - function (c) - c.maximized = not c.maximized - c:raise() - end , - {description = "(un)maximize", group = "client"}), - awful.key({ modkey, "Control" }, "m", - function (c) - c.maximized_vertical = not c.maximized_vertical - c:raise() - end , - {description = "(un)maximize vertically", group = "client"}), - awful.key({ modkey, "Shift" }, "m", - function (c) - c.maximized_horizontal = not c.maximized_horizontal - c:raise() - end , - {description = "(un)maximize horizontally", group = "client"}) -) - --- Bind all key numbers to tags. --- Be careful: we use keycodes to make it works on any keyboard layout. --- This should map on the top row of your keyboard, usually 1 to 9. -for i = 1, 9 do - -- Hack to only show tags 1 and 9 in the shortcut window (mod+s) - local descr_view, descr_toggle, descr_move, descr_toggle_focus - if i == 1 or i == 9 then - descr_view = {description = "view tag #", group = "tag"} - descr_toggle = {description = "toggle tag #", group = "tag"} - descr_move = {description = "move focused client to tag #", group = "tag"} - descr_toggle_focus = {description = "toggle focused client on tag #", group = "tag"} - end - globalkeys = my_table.join(globalkeys, - -- View tag only. - awful.key({ modkey }, "#" .. i + 9, - function () - local screen = awful.screen.focused() - local tag = screen.tags[i] - if tag then - tag:view_only() - end - end, - descr_view), - -- Toggle tag display. - awful.key({ modkey, "Control" }, "#" .. i + 9, - function () - local screen = awful.screen.focused() - local tag = screen.tags[i] - if tag then - awful.tag.viewtoggle(tag) - end - end, - descr_toggle), - -- Move client to tag. - awful.key({ modkey, "Shift" }, "#" .. i + 9, - function () - if client.focus then - local tag = client.focus.screen.tags[i] - if tag then - client.focus:move_to_tag(tag) - end - end - end, - descr_move), - -- Toggle tag on focused client. - awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9, - function () - if client.focus then - local tag = client.focus.screen.tags[i] - if tag then - client.focus:toggle_tag(tag) - end - end - end, - descr_toggle_focus) - ) -end - --- Other mouse bindings -clientbuttons = gears.table.join( - awful.button({ }, 1, function (c) - c:emit_signal("request::activate", "mouse_click", {raise = true}) - end), - awful.button({ modkey }, 1, function (c) - c:emit_signal("request::activate", "mouse_click", {raise = true}) - awful.mouse.client.move(c) - end), - awful.button({ modkey }, 3, function (c) - c:emit_signal("request::activate", "mouse_click", {raise = true}) - awful.mouse.client.resize(c) - end) -) - --- Set keys -root.keys(globalkeys) -#+end_src - -#+RESULTS: - -* Rules -Here are the rules, so basically here you can specify how you want Awesomewm to manage clients. I edited this to make sure that my master client always stays in its default position, for example in the master and stack layout or "tile layout", it wont matter how much apps i open, my main client will stay there in the main position. Also you can edit this to specify wich apps needs to open always in floating mode and a bunch of other things. -#+begin_src lua --- Rules to apply to new clients (through the "manage" signal). -awful.rules.rules = { - -- All clients will match this rule. - { rule = { }, - properties = { border_width = beautiful.border_width, - border_color = beautiful.border_normal, - focus = awful.client.focus.filter, - raise = true, - keys = clientkeys, - buttons = clientbuttons, - screen = awful.screen.preferred, - placement = awful.placement.no_overlap+awful.placement.no_offscreen, - callback = awful.client.setslave - } - }, - -- Floating clients. - { rule_any = { - instance = { - "DTA", -- Firefox addon DownThemAll. - "copyq", -- Includes session name in class. - "pinentry", - }, - class = { - "Arandr", - "Blueman-manager", - "Gpick", - "Kruler", - "MessageWin", -- kalarm. - -- "Sxiv", - "Tor Browser", -- Needs a fixed window size to avoid fingerprinting by screen size. - "Wpa_gui", - "veromix", - "xtightvncviewer"}, - -- Note that the name property shown in xprop might be set slightly after creation of the client - -- and the name shown there might not match defined rules here. - name = { - "Event Tester", -- xev. - }, - role = { - "AlarmWindow", -- Thunderbird's calendar. - "ConfigManager", -- Thunderbird's about:config. - "pop-up", -- e.g. Google Chrome's (detached) Developer Tools. - } - }, properties = { floating = true }}, -} -#+end_src - -* Signals -These are the signals, they are related to the rules, i don't tipically edit them. -#+begin_src lua --- Signal function to execute when a new client appears. -client.connect_signal("manage", function (c) - -- Set the windows at the slave, - -- i.e. put it at the end of others instead of setting it master. - -- if not awesome.startup then awful.client.setslave(c) end - if awesome.startup and - not c.size_hints.user_position - and not c.size_hints.program_position then - -- Prevent clients from being unreachable after screen count changes. - awful.placement.no_offscreen(c) - end -end) -#+end_src - -* Mouse client focus -These are the mouse functions to whenever you hover a window with your mouse, it automatically focuses it. -#+begin_src lua --- Enable sloppy focus, so that focus follows mouse. -client.connect_signal("mouse::enter", function(c) - c:emit_signal("request::activate", "mouse_enter", {raise = false}) -end) -client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end) -client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end) -#+end_src - -* Autorun -You know what is this, the things that will open with you sign in. Like setting up the wallpaper automatically, or the polkit to make sure that you will get the password prompt when a program needs it, the picom compositor and finally the emacs daemon. -#+begin_src lua -awful.util.spawn_with_shell("nitrogen --restore") -awful.util.spawn_with_shell("lxpolkit") -awful.util.spawn_with_shell("picom --experimental-backend --config ~/.config/picom.conf") -awful.util.spawn_with_shell("/usr/bin/emacs --daemon &") -#+end_src diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index 4989edf3e..d70df125c 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -1,4 +1,13 @@ - -- Standard awesome library +-- ____ ____ _ __ +-- | _ \| _ \| |/ / +-- | | | | |_) | ' / Clay Gomera (Drake) +-- | |_| | _ <| . \ This is my awesome config for my dekstop computer +-- |____/|_| \_\_|\_\ +-- + + +-- BEGINNING OF LIBRARIES -- +-- Standard awesome library local gears = require("gears") --Utilities such as color parsing and objects local awful = require("awful") --Everything related to window managment require("awful.autofocus") @@ -16,12 +25,17 @@ local naughty = require("naughty") naughty.config.defaults['icon_size'] = 100 -- Lain library local lain = require("lain") +-- END OF LIBRARIES -- + +-- BEGINNING OF VIM HOTKEYS -- -- Enable hotkeys help widget for VIM and other apps -- when client with a matching name is opened: local hotkeys_popup = require("awful.hotkeys_popup").widget require("awful.hotkeys_popup.keys") local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility +-- END OF VIM HOTKEYS -- +-- BEGINNNG OF ERROR HANDLING -- if awesome.startup_errors then naughty.notify({ preset = naughty.config.presets.critical, title = "Oops, there were errors during startup!", @@ -44,7 +58,9 @@ local function run_once(cmd_arr) end end run_once({ "unclutter -root" }) -- entries must be comma-separated +-- END OF ERROR HANDLING -- +-- BEGINNIG OF THEMES -- local themes = { "gruvbox-dark" -- 1 } @@ -52,7 +68,9 @@ local chosen_theme = themes[1] local theme_path = string.format("%s/.config/awesome/themes/%s/theme.lua", os.getenv("HOME"), chosen_theme) beautiful.init(theme_path) beautiful.init(string.format(gears.filesystem.get_configuration_dir() .. "/themes/%s/theme.lua", chosen_theme)) +-- END OF THEMES -- +-- BEGINNING OF LAYOUTS awful.layout.suit.tile.left.mirror = true awful.layout.layouts = { awful.layout.suit.tile, @@ -78,7 +96,6 @@ awful.layout.layouts = { --lain.layout.termfair, --lain.layout.termfair.center, } - lain.layout.termfair.nmaster = 3 lain.layout.termfair.ncol = 1 lain.layout.termfair.center.nmaster = 3 @@ -88,34 +105,54 @@ lain.layout.cascade.tile.offset_y = 32 lain.layout.cascade.tile.extra_padding = 5 lain.layout.cascade.tile.nmaster = 5 lain.layout.cascade.tile.ncol = 2 +-- END OF LAYOUTS -- +-- BEGINNING OF VARIABLES -- awful.util.terminal = terminal - -local emacs = "emacsclient -c -a 'emacs'" -local spacevim = os.getenv("EDITOR") or "neovide" -local terminal = "alacritty" -local filemanager = "alacritty -e ./.config/vifm/scripts/vifmrun" -local filemanagergui = "pcmanfm" -local audiomixer = "alacritty -e pulsemixer" -local audiomixer2 = "alacritty -e alsamixer" -local browser = "librewolf" -local browser2 = "qutebrowser" -local musicplayer = "alacritty -e musikcube" -local musicplayergui = "lollypop" -local emailclient = "thunderbird" -local chat1 = "element-desktop" -local chat2 = "whatsapp-for-linux" -local notes = "joplin-desktop" -local passwords = "bitwarden-desktop" -local screenlocker = "betterlockscreen -l" - +-- Terminal +local terminal = "alacritty" +-- Standard Apps +local code = "emacsclient -c -a emacs" +local file = "alacritty -e ./.config/vifm/scripts/vifmrun" +local web = "firefox" +local chat = "element-desktop" +local music = "alacritty -e musikcube" +local notes = "zim" +local games = "retroarch" +-- Specific Apps +local libreoffice = "libreoffice" +local gimp = "gimp" +local inkscape = "inkscape" +local krita = "krita" +local audacity = "audacity" +local obs = "obs" +local thunderbird = "thunderbird" +local transmission = "transmission-gtk" +local pavucontrol = "pavucontrol" -- Key bindings variables -local modkey = "Mod4" -local altkey = "Mod1" -local modkey1 = "Control" +local modkey = "Mod4" +local altkey = "Mod1" +local modkey1 = "Control" +-- screenlocker +local screenlocker = "betterlockscreen -l" +-- END OF VARIABLES -- -awful.util.tagnames = { " CODE ", " WEB ", " MUSIC ", " CHAT ", " FILE ", " NOTES ", " WORK1 ", " WORK2 ", " GAME " } +-- BEGINNING OF TAG NAMES -- +awful.util.tagnames = +{ +" CODE ", -- F1 +" FILE ", -- F2 +" WEB ", -- F3 +" CHAT ", -- F4 +" MUSIC ", -- F5 +" NOTES ", -- F6 +" WORK ", -- XX +" EXTRA ", -- XX +" GAMES " -- F9 +} +-- END OF TAG NAMES -- +-- BEGINNIG OF WIBOX STUFF -- awful.util.taglist_buttons = my_table.join( awful.button({ }, 1, function(t) t:view_only() end), awful.button({ modkey }, 1, function(t) @@ -165,61 +202,51 @@ screen.connect_signal("property::geometry", function(s) end end) awful.screen.connect_for_each_screen(function(s) beautiful.at_screen_connect(s) end) +-- END OF WIBOX STUFF -- --- Mouse bindings -root.buttons(gears.table.join( - awful.button({ }, 4, awful.tag.viewnext), - awful.button({ }, 5, awful.tag.viewprev) -)) - +-- BEGINNIG OF BINDINGS -- -- Awesome things globalkeys = my_table.join( awful.key({ modkey, }, "s", hotkeys_popup.show_help, - {description="show help", group="awesome"}), + {description="Show this help menu", group="Quick Actions"}), awful.key({ modkey, "Control" }, "r", awesome.restart, - {description = "reload awesome", group = "awesome"}), + {description = "Reload WM", group = "Quick Actions"}), awful.key({ modkey, "Shift" }, "q", awesome.quit, - {description = "quit awesome", group = "awesome"}), - + {description = "Log Out", group = "Quick Actions"}), -- Tag browsing arrow keys and escape awful.key({ modkey, }, "Left", awful.tag.viewprev, - {description = "view previous", group = "tag"}), + {description = "view previous", group = "Tag"}), awful.key({ modkey, }, "Right", awful.tag.viewnext, - {description = "view next", group = "tag"}), + {description = "view next", group = "Tag"}), awful.key({ modkey, }, "Escape", awful.tag.history.restore, - {description = "go back", group = "tag"}), - + {description = "go back", group = "Tag"}), -- Tag browsing alt + tab awful.key({ altkey, }, "Tab", awful.tag.viewnext, - {description = "view next", group = "tag"}), + {description = "view next", group = "Tag"}), awful.key({ altkey, "Shift" }, "Tab", awful.tag.viewprev, - {description = "view previous", group = "tag"}), - + {description = "view previous", group = "Tag"}), -- Copy primary to clipboard (terminals to gtk) awful.key({ modkey }, "c", function () awful.spawn.with_shell("xsel | xsel -i -b") end, - {description = "copy terminal to gtk", group = "hotkeys"}), - + {description = "Copy terminal to gtk", group = "Hotkeys"}), -- Copy clipboard to primary (gtk to terminals) awful.key({ modkey }, "v", function () awful.spawn.with_shell("xsel -b | xsel") end, - {description = "copy gtk to terminal", group = "hotkeys"}), - + {description = "Copy gtk to terminal", group = "Hotkeys"}), -- Client focus awful.key({ modkey, }, "j", function () awful.client.focus.byidx( 1) end, - {description = "focus next by index", group = "client"}), + {description = "Focus next by index", group = "Client"}), awful.key({ modkey, }, "k", function () awful.client.focus.byidx(-1) end, - {description = "focus previous by index", group = "client"}), - + {description = "Focus previous by index", group = "Client"}), -- Layout manipulation awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end, - {description = "swap with next client by index", group = "client"}), + {description = "Swap with next client by index", group = "Client"}), awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end, - {description = "swap with previous client by index", group = "client"}), + {description = "Swap with previous client by index", group = "Client"}), awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end, - {description = "focus the next screen", group = "screen"}), + {description = "Focus the next screen", group = "Screen"}), awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end, - {description = "focus the previous screen", group = "screen"}), + {description = "Focus the previous screen", group = "Screen"}), awful.key({ modkey, }, "u", awful.client.urgent.jumpto, - {description = "jump to urgent client", group = "client"}), + {description = "Jump to urgent client", group = "Cient"}), awful.key({ modkey, }, "Tab", function () awful.client.focus.history.previous() @@ -227,116 +254,117 @@ globalkeys = my_table.join( client.focus:raise() end end, - {description = "go back", group = "client"}), + {description = "Go back", group = "client"}), awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end, - {description = "increase master width factor", group = "layout"}), + {description = "Increase master width factor", group = "Layout"}), awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end, - {description = "decrease master width factor", group = "layout"}), + {description = "Decrease master width factor", group = "Layout"}), awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1, nil, true) end, - {description = "increase the number of master clients", group = "layout"}), + {description = "Increase the number of master clients", group = "Layout"}), awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1, nil, true) end, - {description = "decrease the number of master clients", group = "layout"}), + {description = "Decrease the number of master clients", group = "Layout"}), awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1, nil, true) end, - {description = "increase the number of columns", group = "layout"}), + {description = "Increase the number of columns", group = "Layout"}), awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1, nil, true) end, - {description = "decrease the number of columns", group = "layout"}), + {description = "Decrease the number of columns", group = "Layout"}), awful.key({ modkey, }, "space", function () awful.layout.inc( 1) end, - {description = "select next", group = "layout"}), + {description = "Select next", group = "Layout"}), awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(-1) end, - {description = "select previous", group = "layout"}), - + {description = "Select previous", group = "Layout"}), -- Terminal awful.key({ modkey }, "Return", function() awful.spawn(terminal) end, - {description = "launch a terminal", group = "apps"}), - --- Rofi - awful.key({ modkey }, "d", function () awful.spawn(string.format("rofi -show drun", beautiful.bg_normal, beautiful.fg_normal, beautiful.bg_focus, beautiful.fg_focus)) end, - {description = "show rofi drun menu", group = "hotkeys"}), - awful.key({ modkey }, "r", function () awful.spawn(string.format("rofi -show run", beautiful.bg_normal, beautiful.fg_normal, beautiful.bg_focus, beautiful.fg_focus)) end, - {description = "show rofi run menu", group = "hotkeys"}), - awful.key({ modkey }, "Tab", function () awful.spawn(string.format("rofi -show window", beautiful.bg_normal, beautiful.fg_normal, beautiful.bg_focus, beautiful.fg_focus)) end, - {description = "show rofi window menu", group = "hotkeys"}), - awful.key({ modkey }, "w", function () awful.util.spawn("/home/drk/.shell-scripts/./rofi-wifi-menu.sh") end, - {description = "show rofi wifi menu", group = "hotkeys"}), - awful.key({ modkey, altkey }, "Delete", function () awful.util.spawn("/home/drk/.shell-scripts/./rofi-power-menu.sh") end, - {description = "show rofi power menu", group = "hotkeys"}), - awful.key({ modkey, altkey }, "Print", function () awful.util.spawn("/home/drk/.shell-scripts/./rofi-scrot-menu.sh") end, - {description = "show rofi scrot menu", group = "hotkeys"}), - + {description = "Launch a terminal", group = "Hotkeys"}), +-- Dmenu + awful.key({ modkey }, "r", function () awful.util.spawn_with_shell("dmenu_run -l 10 -b -i -p Launch:") end, + {description = "Show Run Launcher", group = "Hotkeys"}), + awful.key({ modkey }, "d", function () awful.util.spawn_with_shell("sh $HOME/.config/scripts/dmenu-drun.sh") end, + {description = "Show App Launcher", group = "Hotkeys"}), + awful.key({ modkey }, "w", function () awful.util.spawn_with_shell("sh $HOME/.config/scripts/dmenu-wifi.sh") end, + {description = "Configure WiFi", group = "Hotkeys"}), + awful.key({ modkey, modkey1 }, "q", function () awful.util.spawn_with_shell("sh $HOME/.config/scripts/dmenu-power.sh") end, + {description = "Show Logout menu", group = "Hotkeys"}), + awful.key({ modkey, modkey1 }, "w", function () awful.util.spawn_with_shell("sh $HOME/.config/scripts/dmenu-wall.sh") end, + {description = "Show Logout menu", group = "Hotkeys"}), + awful.key({}, "Print", function () awful.util.spawn_with_shell("sh $HOME/.config/scripts/dmenu-scrot.sh") end, + {description = "Take screenshots", group = "Hotkeys"}), -- Keyboard Layouts awful.key({ modkey, "Shift" }, "e", function () awful.util.spawn("setxkbmap -layout es") end, - {description = "switch to es keyboard layout", group = "keyboard"}), + {description = "Switch to ES keyboard layout", group = "Quick Actions"}), awful.key({ modkey, "Shift" }, "u", function () awful.util.spawn("setxkbmap -layout us") end, - {description = "switch to us keyboard layout", group = "keyboard"}), - + {description = "Switch to US keyboard layout", group = "Quick Actions"}), -- Apps -- code - awful.key({ modkey }, "F1", function () awful.spawn(emacs) end, - {description = "launch emacs", group = "apps"}), - awful.key({ modkey, "Shift" }, "F1", function () awful.spawn(spacevim) end, - {description = "launch spacevim", group = "apps"}), - -- web - awful.key({ modkey }, "F2", function () awful.spawn(browser) end, - {description = "launch firefox", group = "apps"}), - awful.key({ modkey, "Shift" }, "F2", function () awful.spawn(browser2) end, - {description = "launch qutebrowser", group = "apps"}), - -- music - awful.key({ modkey }, "F3", function () awful.spawn(musicplayer) end, - {description = "launch musikcube", group = "apps"}), - awful.key({ modkey, "Shift" }, "F3", function () awful.spawn(musicplayergui) end, - {description = "launch lollypop", group = "apps"}), - -- chat - awful.key({ modkey }, "F4", function () awful.spawn(chat1) end, - {description = "launch element", group = "apps"}), - awful.key({ modkey, "Shift" }, "F4", function () awful.spawn(chat2) end, - {description = "launch whatsapp", group = "apps"}), + awful.key({ modkey }, "F1", function () awful.spawn(code) end, + {description = "Launch text editor", group = "Standard Apps"}), -- file - awful.key({ modkey }, "F5", function () awful.spawn(filemanager) end, - {description = "launch vifm", group = "apps"}), - awful.key({ modkey, "Shift" }, "F5", function () awful.spawn(filemanagergui) end, - {description = "launch pcmanfm", group = "apps"}), + awful.key({ modkey }, "F2", function () awful.spawn(file) end, + {description = "Launch file manager", group = "Standard Apps"}), + -- web + awful.key({ modkey }, "F3", function () awful.spawn(web) end, + {description = "Launch web browser", group = "Standard Apps"}), + -- chat + awful.key({ modkey }, "F4", function () awful.spawn(chat) end, + {description = "Launch chat app", group = "Standard Apps"}), + -- music + awful.key({ modkey }, "F5", function () awful.spawn(music) end, + {description = "Launch music player", group = "Standard Apps"}), -- notes awful.key({ modkey }, "F6", function () awful.spawn(notes) end, - {description = "launch joplin", group = "apps"}), - -- tag agnostic - awful.key({ modkey, "Shift" }, "m", function () awful.spawn(audiomixer) end, - {description = "launch pulsemixer", group = "apps"}), - awful.key({ modkey, altkey }, "m", function () awful.spawn(audiomixer2) end, - {description = "launch alsamixer", group = "apps"}), - awful.key({ modkey, altkey }, "p", function () awful.spawn(passwords) end, - {description = "launch bitwarden", group = "apps"}), - -- game - awful.key({ modkey }, "F9", function () awful.util.spawn("retroarch") end, - {description = "launch retroarch", group = "apps"}), - --- Volume Control + {description = "Launch note taking app", group = "Standard Apps"}), + -- games + awful.key({ modkey }, "F9", function () awful.util.spawn(games) end, + {description = "Launch gaming app", group = "Standard Apps"}), +-- Specific Apps + -- libreoffice + awful.key({ modkey, modkey1 }, "F1", function () awful.spawn(libreoffice) end, + {description = "Launch libreoffice", group = "Specific Apps"}), + -- gimp + awful.key({ modkey, modkey1 }, "F2", function () awful.spawn(gimp) end, + {description = "Launch gimp", group = "Specific Apps"}), + -- inkscape + awful.key({ modkey, modkey1 }, "F3", function () awful.spawn(inkscape) end, + {description = "Launch inkscape", group = "Specific Apps"}), + -- krita + awful.key({ modkey, modkey1 }, "F4", function () awful.spawn(krita) end, + {description = "Launch krita", group = "Specific Apps"}), + -- audacity + awful.key({ modkey, modkey1 }, "F5", function () awful.spawn(audacity) end, + {description = "Launch audacity", group = "Specific Apps"}), + -- obs + awful.key({ modkey, modkey1 }, "F6", function () awful.spawn(obs) end, + {description = "Launch obs", group = "Specific Apps"}), + -- sylpheed + awful.key({ modkey, modkey1 }, "F7", function () awful.spawn(thunderbird) end, + {description = "Launch sylpheed", group = "Specific Apps"}), + -- transmission + awful.key({ modkey, modkey1 }, "F8", function () awful.spawn(transmission) end, + {description = "Launch transmission", group = "Specific Apps"}), + -- pavucontrol + awful.key({ modkey, modkey1 }, "F9", function () awful.spawn(pavucontrol) end, + {description = "Launch pavucontrol", group = "Specific Apps"}), +-- Volume awful.key({}, "XF86AudioRaiseVolume", function() volume_widget:inc(5) end, - {description = "increase volume", group = "volume"}), + {description = "Increase volume", group = "Quick Actions"}), awful.key({}, "XF86AudioLowerVolume", function() volume_widget:dec(5) end, - {description = "decrease volume", group = "volume"}), + {description = "Decrease volume", group = "Quick Actions"}), awful.key({}, "XF86AudioMute", function() volume_widget:toggle() end, - {description = "mute volume", group = "volume"}), - --- Screenshot - awful.key({}, "Print", function() awful.util.spawn("scrot") end, - {description = "take a complete screenshot", group = "screenshot"}), - awful.key({"Control"}, "Print", function() awful.util.spawn("scrot -s") end, - {description = "take an area screenshot", group = "screenshot"}), - + {description = "Mute volume", group = "Quick Actions"}), -- Brightness awful.key({}, "XF86MonBrightnessUp", function () brightness_widget:inc(5) end, - {description = "increase brightness", group = "brightness"}), + {description = "Increase brightness", group = "Quick Actions"}), awful.key({}, "XF86MonBrightnessDown", function () brightness_widget:dec(5) end, - {description = "decrease brightness", group = "brightness"}), - --- Screen configuration + {description = "Decrease brightness", group = "Quick Actions"}), +-- Screenshots + awful.key({ modkey }, "Print", function() awful.util.spawn("scrot") end, + {description = "Take a screenshot (Complete screen mode)", group = "Quick Actions"}), + awful.key({ modkey, modkey1 }, "Print", function() awful.util.spawn("scrot -s") end, + {description = "Take a screenshot (Area selection mode)", group = "Quick Actions"}), +-- Screen configuration tool awful.key({ modkey }, "p", function() awful.util.spawn("arandr") end, - {description = "launch screen configuration tool", group = ("screen")}), - --- Screen Lock + {description = "Launch screen configuration tool", group = ("Quick Actions")}), +-- Screenlocker awful.key({ modkey, modkey1 }, "l", function() awful.spawn(screenlocker) end, - {description = "lock the screen", group = "screen"}), - + {description = "Lock the screen", group = "Quick Actions"}), -- Show/Hide Wibox awful.key({ modkey }, "b", function () for s in screen do @@ -346,26 +374,23 @@ globalkeys = my_table.join( end end end, - {description = "toggle wibox", group = "awesome"}), - + {description = "Toggle wibox", group = "Quick Actions"}), -- On the fly useless gaps change awful.key({ altkey, "Control" }, "j", function () lain.util.useless_gaps_resize(1) end, - {description = "increment gaps", group = "tag"}), + {description = "Increment gaps", group = "Tag"}), awful.key({ altkey, "Control" }, "l", function () lain.util.useless_gaps_resize(-1) end, - {description = "decrement gaps", group = "tag"}), - + {description = "Decrement gaps", group = "Tag"}), -- Dynamic tagging awful.key({ modkey, "Shift" }, "n", function () lain.util.add_tag() end, - {description = "add new tag", group = "tag"}), + {description = "Add new tag", group = "Tag"}), awful.key({ modkey, "Control" }, "r", function () lain.util.rename_tag() end, - {description = "rename tag", group = "tag"}), + {description = "Rename tag", group = "Tag"}), awful.key({ modkey, "Shift" }, "Left", function () lain.util.move_tag(-1) end, - {description = "move tag to the left", group = "tag"}), + {description = "Move tag to the left", group = "Tag"}), awful.key({ modkey, "Shift" }, "Right", function () lain.util.move_tag(1) end, - {description = "move tag to the right", group = "tag"}), + {description = "Move tag to the right", group = "Tag"}), awful.key({ modkey, "Shift" }, "d", function () lain.util.delete_tag() end, - {description = "delete tag", group = "tag"}), - + {description = "Delete tag", group = "Tag"}), -- Minimize, maximize, moving clients, fullscreen, etc awful.key({ modkey, "Control" }, "n", function () @@ -376,46 +401,45 @@ globalkeys = my_table.join( c:raise() end end, - {description = "restore minimized", group = "client"}) + {description = "Restore minimized", group = "Client"}) ) clientkeys = gears.table.join( awful.key({ modkey, }, "f", function (c) c.fullscreen = not c.fullscreen c:raise() end, - {description = "toggle fullscreen", group = "client"}), + {description = "Toggle fullscreen", group = "Client"}), awful.key({ modkey }, "q", function (c) c:kill() end, - {description = "close", group = "client"}), + {description = "Close window", group = "Client"}), awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle, - {description = "toggle floating", group = "client"}), + {description = "Toggle floating", group = "Client"}), awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end, - {description = "move to master", group = "client"}), + {description = "Move to master", group = "Client"}), awful.key({ modkey, }, "o", function (c) c:move_to_screen() end, - {description = "move to screen", group = "client"}), + {description = "Move to screen", group = "Client"}), awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end, - {description = "toggle keep on top", group = "client"}), + {description = "Toggle keep on top", group = "Client"}), awful.key({ modkey, }, "n", function (c) c.minimized = true end , - {description = "minimize", group = "client"}), + {description = "Minimize", group = "Client"}), awful.key({ modkey, }, "m", function (c) c.maximized = not c.maximized c:raise() end , - {description = "(un)maximize", group = "client"}), + {description = "(Un)maximize", group = "Client"}), awful.key({ modkey, "Control" }, "m", function (c) c.maximized_vertical = not c.maximized_vertical c:raise() end , - {description = "(un)maximize vertically", group = "client"}), + {description = "(Un)maximize vertically", group = "Client"}), awful.key({ modkey, "Shift" }, "m", function (c) c.maximized_horizontal = not c.maximized_horizontal c:raise() end , - {description = "(un)maximize horizontally", group = "client"}) + {description = "(Un)maximize horizontally", group = "Client"}) ) - -- Bind all key numbers to tags. -- Be careful: we use keycodes to make it works on any keyboard layout. -- This should map on the top row of your keyboard, usually 1 to 9. @@ -423,10 +447,10 @@ for i = 1, 9 do -- Hack to only show tags 1 and 9 in the shortcut window (mod+s) local descr_view, descr_toggle, descr_move, descr_toggle_focus if i == 1 or i == 9 then - descr_view = {description = "view tag #", group = "tag"} - descr_toggle = {description = "toggle tag #", group = "tag"} - descr_move = {description = "move focused client to tag #", group = "tag"} - descr_toggle_focus = {description = "toggle focused client on tag #", group = "tag"} + descr_view = {description = "Wiew tag #", group = "Tag"} + descr_toggle = {description = "Toggle tag #", group = "Tag"} + descr_move = {description = "Move focused client to tag #", group = "Tag"} + descr_toggle_focus = {description = "Toggle focused client on tag #", group = "Tag"} end globalkeys = my_table.join(globalkeys, -- View tag only. @@ -473,7 +497,6 @@ for i = 1, 9 do descr_toggle_focus) ) end - -- Other mouse bindings clientbuttons = gears.table.join( awful.button({ }, 1, function (c) @@ -488,10 +511,11 @@ clientbuttons = gears.table.join( awful.mouse.client.resize(c) end) ) - -- Set keys root.keys(globalkeys) +-- END OF BINDINGS -- +-- BEGINNING OF RULES -- -- Rules to apply to new clients (through the "manage" signal). awful.rules.rules = { -- All clients will match this rule. @@ -537,7 +561,9 @@ awful.rules.rules = { } }, properties = { floating = true }}, } +-- END OF RULES -- +-- BEGINNING OF SIGNALS -- -- Signal function to execute when a new client appears. client.connect_signal("manage", function (c) -- Set the windows at the slave, @@ -550,15 +576,20 @@ client.connect_signal("manage", function (c) awful.placement.no_offscreen(c) end end) +-- END OF SIGNALS -- +-- BEGINNING OF MOUSE FOCUS SETTINGS -- -- Enable sloppy focus, so that focus follows mouse. client.connect_signal("mouse::enter", function(c) c:emit_signal("request::activate", "mouse_enter", {raise = false}) end) client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end) client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end) +-- END OF MOUSE FOCUS SETTINGS -- -awful.util.spawn_with_shell("nitrogen --restore") -awful.util.spawn_with_shell("lxpolkit") -awful.util.spawn_with_shell("picom --experimental-backend --config ~/.config/picom.conf") +-- BEGINNING OF AUTOSTART -- +awful.util.spawn_with_shell("sh $HOME/.fehbg &") +awful.util.spawn_with_shell("lxpolkit &") +awful.util.spawn_with_shell("picom --config ~/.config/picom.conf &") awful.util.spawn_with_shell("/usr/bin/emacs --daemon &") +-- END OF AUTOSTART -- diff --git a/.config/awesome/screenshot.png b/.config/awesome/screenshot.png deleted file mode 100644 index e5408264f..000000000 Binary files a/.config/awesome/screenshot.png and /dev/null differ diff --git a/.config/awesome/themes/gruvbox-dark/wall.png b/.config/awesome/themes/gruvbox-dark/wall.png deleted file mode 100644 index 0989db926..000000000 Binary files a/.config/awesome/themes/gruvbox-dark/wall.png and /dev/null differ diff --git a/.doom.d/config.el b/.config/doom/config.el similarity index 99% rename from .doom.d/config.el rename to .config/doom/config.el index a2b0c1d65..bc62b1a8d 100644 --- a/.doom.d/config.el +++ b/.config/doom/config.el @@ -102,7 +102,8 @@ Open the eshell (SPC e s)\ \nOpen dired file manager (SPC d d) \ List of keybindings (SPC h b b)") ;;(setq dashboard-startup-banner 'logo) ;; use standard emacs logo as banner - (setq dashboard-startup-banner "~/.doom.d/doom-emacs-dash.png") ;; use custom image as banner + (setq initial-buffer-choice (lambda () (get-buffer "*dashboard*"))) + (setq dashboard-startup-banner "~/.config/doom/emacs-dash.txt") ;; use custom image as banner (setq dashboard-center-content nil) ;; set to 't' for centered content (setq dashboard-items '((recents . 5) (agenda . 5 ) diff --git a/.doom.d/config.org b/.config/doom/config.org similarity index 99% rename from .doom.d/config.org rename to .config/doom/config.org index 431a3b0f2..a94cd0cc6 100644 --- a/.doom.d/config.org +++ b/.config/doom/config.org @@ -224,7 +224,8 @@ Open the eshell (SPC e s)\ \nOpen dired file manager (SPC d d) \ List of keybindings (SPC h b b)") ;;(setq dashboard-startup-banner 'logo) ;; use standard emacs logo as banner - (setq dashboard-startup-banner "~/.doom.d/doom-emacs-dash.png") ;; use custom image as banner + (setq initial-buffer-choice (lambda () (get-buffer "*dashboard*"))) + (setq dashboard-startup-banner "~/.config/doom/emacs-dash.txt") ;; use custom image as banner (setq dashboard-center-content nil) ;; set to 't' for centered content (setq dashboard-items '((recents . 5) (agenda . 5 ) diff --git a/.config/doom/emacs-dash.txt b/.config/doom/emacs-dash.txt new file mode 100644 index 000000000..1de333fb6 --- /dev/null +++ b/.config/doom/emacs-dash.txt @@ -0,0 +1,10 @@ + +__/\\\\\\\\\\\\_______/\\\\\\\\\______/\\\________/\\\_ + _\/\\\////////\\\___/\\\///////\\\___\/\\\_____/\\\//__ + _\/\\\______\//\\\_\/\\\_____\/\\\___\/\\\__/\\\//_____ + _\/\\\_______\/\\\_\/\\\\\\\\\\\/____\/\\\\\\//\\\_____ + _\/\\\_______\/\\\_\/\\\//////\\\____\/\\\//_\//\\\____ Darius Drake + _\/\\\_______\/\\\_\/\\\____\//\\\___\/\\\____\//\\\___ + _\/\\\_______/\\\__\/\\\_____\//\\\__\/\\\_____\//\\\__ + _\/\\\\\\\\\\\\/___\/\\\______\//\\\_\/\\\______\//\\\_ + _\////////////_____\///________\///__\///________\///__ diff --git a/.doom.d/eshell/aliases b/.config/doom/eshell/aliases similarity index 100% rename from .doom.d/eshell/aliases rename to .config/doom/eshell/aliases diff --git a/.doom.d/eshell/profile b/.config/doom/eshell/profile similarity index 100% rename from .doom.d/eshell/profile rename to .config/doom/eshell/profile diff --git a/.doom.d/init.el b/.config/doom/init.el similarity index 60% rename from .doom.d/init.el rename to .config/doom/init.el index b2104bd33..8ba0e6c7e 100644 --- a/.doom.d/init.el +++ b/.config/doom/init.el @@ -20,67 +20,67 @@ ;;layout ; auie,ctsrnm is the superior home row :completion - company ; the ultimate code completion backend + company ; the ultimate code completion backend ;;helm ; the *other* search engine for love and life ;;ido ; the other *other* search engine... - (ivy +fonts +childframe) ; a search engine for love and life + (ivy +fonts +childframe) ; a search engine for love and life :ui ;;deft ; notational velocity for Emacs - doom ; what makes DOOM look the way it does + doom ; what makes DOOM look the way it does ;;doom-dashboard ; a nifty splash screen for Emacs - doom-quit ; DOOM quit-message prompts when you quit Emacs - (emoji +unicode) ; πŸ™‚ + doom-quit ; DOOM quit-message prompts when you quit Emacs + (emoji +unicode) ; πŸ™‚ ;;fill-column ; a `fill-column' indicator - hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW + hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW ;;hydra ;;indent-guides ; highlighted indent columns - (ligatures +extras) ; ligatures and symbols to make your code pretty again + (ligatures +extras) ; ligatures and symbols to make your code pretty again ;;minimap ; show a map of the code on the side - modeline ; snazzy, Atom-inspired modeline, plus API + modeline ; snazzy, Atom-inspired modeline, plus API ;;nav-flash ; blink cursor line after big motions - neotree ; a project drawer, like NERDTree for vim - ophints ; highlight the region an operation acts on - (popup +defaults) ; tame sudden yet inevitable temporary windows - tabs ; a tab bar for Emacs - ;;treemacs ; a project drawer, like neotree but cooler - ;;unicode ; extended unicode support for various languages - vc-gutter ; vcs diff in the fringe - vi-tilde-fringe ; fringe tildes to mark beyond EOB - ;;window-select ; visually switch windows - workspaces ; tab emulation, persistence & separate workspaces - zen ; distraction-free coding or writing + neotree ; a project drawer, like NERDTree for vim + ophints ; highlight the region an operation acts on + (popup +defaults) ; tame sudden yet inevitable temporary windows + ;; tabs ; a tab bar for Emacs + ;; ;;treemacs ; a project drawer, like neotree but cooler + unicode ; extended unicode support for various languages + vc-gutter ; vcs diff in the fringe + vi-tilde-fringe ; fringe tildes to mark beyond EOB + window-select ; visually switch windows + workspaces ; tab emulation, persistence & separate workspaces + zen ; distraction-free coding or writing :editor - (evil +everywhere); come to the dark side, we have cookies - file-templates ; auto-snippets for empty files - fold ; (nigh) universal code folding + (evil +everywhere) ; come to the dark side, we have cookies + file-templates ; auto-snippets for empty files + fold ; (nigh) universal code folding ;;(format +onsave) ; automated prettiness ;;god ; run Emacs commands without modifier keys - lispy ; vim for lisp, for people who don't like vim + lispy ; vim for lisp, for people who don't like vim ;;multiple-cursors ; editing in many places at once ;;objed ; text object editing for the innocent ;;parinfer ; turn lisp into python, sort of ;;rotate-text ; cycle region at point between text candidates - snippets ; my elves. They type so I don't have to + snippets ; my elves. They type so I don't have to ;;word-wrap ; soft wrapping with language-aware indent :emacs - (dired +icons) ; making dired pretty [functional] + (dired +icons) ; making dired pretty [functional] electric ; smarter, keyword-based electric-indent - (ibuffer +icons) ; interactive buffer management + (ibuffer +icons) ; interactive buffer management undo ; persistent, smarter undo for your inevitable mistakes vc ; version-control and Emacs, sitting in a tree :term - eshell ; the elisp shell that works everywhere - shell ; simple shell REPL for Emacs - term ; basic terminal emulator for Emacs - vterm ; the best terminal emulation in Emacs + eshell ; the elisp shell that works everywhere + shell ; simple shell REPL for Emacs + term ; basic terminal emulator for Emacs + vterm ; the best terminal emulation in Emacs :checkers - syntax ; tasing you for every semicolon you forget - (spell +aspell) ; tasing you for misspelling mispelling + syntax ; tasing you for every semicolon you forget + (spell +aspell) ; tasing you for misspelling mispelling ;;grammar ; tasing grammar mistake every you make :tools @@ -90,14 +90,14 @@ ;;docker ;;editorconfig ; let someone else argue about tabs vs spaces ;;ein ; tame Jupyter notebooks with emacs - (eval +overlay) ; run code, run (also, repls) + (eval +overlay) ; run code, run (also, repls) ;;gist ; interacting with github gists - lookup ; navigate your code and its documentation + lookup ; navigate your code and its documentation lsp - magit ; a git porcelain for Emacs + magit ; a git porcelain for Emacs ;;make ; run make tasks from Emacs ;;pass ; password manager for nerds - pdf ; pdf enhancements + pdf ; pdf enhancements ;;prodigy ; FIXME managing external services & code builders ;;rgb ; creating color strings ;;taskrunner ; taskrunner for all your projects @@ -106,52 +106,52 @@ ;;upload ; map local to remote projects via ssh/ftp :os - (:if IS-MAC macos) ; improve compatibility with macOS + (:if IS-MAC macos) ; improve compatibility with macOS ;;tty ; improve the terminal Emacs experience :lang ;;agda ; types of types of types of types... - cc ; C/C++/Obj-C madness + cc ; C/C++/Obj-C madness ;;clojure ; java with a lisp - common-lisp ; if you've seen one lisp, you've seen them all + common-lisp ; if you've seen one lisp, you've seen them all ;;coq ; proofs-as-programs ;;crystal ; ruby at the speed of c - csharp ; unity, .NET, and mono shenanigans + csharp ; unity, .NET, and mono shenanigans ;;data ; config/data formats ;;(dart +flutter) ; paint ui and not much else ;;elixir ; erlang done right ;;elm ; care for a cup of TEA? - emacs-lisp ; drown in parentheses + emacs-lisp ; drown in parentheses ;;erlang ; an elegant language for a more civilized age ;;ess ; emacs speaks statistics ;;faust ; dsp, but you get to keep your soul ;;fsharp ; ML stands for Microsoft's Language ;;fstar ; (dependent) types and (monadic) effects and Z3 ;;gdscript ; the language you waited for - (go +lsp) ; the hipster dialect - (haskell +dante) ; a language that's lazier than I am + (go +lsp) ; the hipster dialect + (haskell +dante) ; a language that's lazier than I am ;;hy ; readability of scheme w/ speed of python ;;idris ; a language you can depend on - json ; At least it ain't XML + json ; At least it ain't XML (java +meghanada) ; the poster child for carpal tunnel syndrome javascript ; all(hope(abandon(ye(who(enter(here)))))) ;;julia ; a better, faster MATLAB ;;kotlin ; a better, slicker Java(Script) - latex ; writing papers in Emacs has never been so fun + latex ; writing papers in Emacs has never been so fun ;;lean ;;factor ;;ledger ; an accounting system in Emacs - lua ; one-based indices? one-based indices + lua ; one-based indices? one-based indices markdown ; writing docs for people to ignore ;;nim ; python + lisp at the speed of c ;;nix ; I hereby declare "nix geht mehr!" ;;ocaml ; an objective camel (org - +journal ; enable org journal - +pretty ; replace asterisks with pretty org bullets - +publish ; create static websites with org - +roam2) ; org roam v2 - php ; perl's insecure younger brother + +journal ; enable org journal + +pretty ; replace asterisks with pretty org bullets + +publish ; create static websites with org + +roam2) ; org roam v2 + php ; perl's insecure younger brother ;;plantuml ; diagrams for confusing people more ;;purescript ; javascript, but functional python ; beautiful is better than ugly @@ -161,16 +161,16 @@ ;;rest ; Emacs as a REST client ;;rst ; ReST in peace ;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"} - rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap() - scala ; java, but good - scheme ; a fully conniving family of lisps - sh ; she sells {ba,z,fi}sh shells on the C xor + rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap() + scala ; java, but good + scheme ; a fully conniving family of lisps + sh ; she sells {ba,z,fi}sh shells on the C xor ;;sml ;;solidity ; do you need a blockchain? No. - swift ; who asked for emoji variables? + swift ; who asked for emoji variables? ;;terra ; Earth and Moon in alignment for performance. - web ; the tubes - yaml ; JSON, but readable + web ; the tubes + yaml ; JSON, but readable :email ;;mu4e @@ -183,7 +183,7 @@ emms ;;everywhere ; *leave* Emacs!? You must be joking ;;irc ; how neckbeards socialize - rss ; emacs as an RSS reader + rss ; emacs as an RSS reader ;;twitter ; twitter client https://twitter.com/vnought :config diff --git a/.doom.d/packages.el b/.config/doom/packages.el similarity index 100% rename from .doom.d/packages.el rename to .config/doom/packages.el diff --git a/.config/fish/config.fish b/.config/fish/config.fish index 99a801759..b964a1ce8 100644 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -11,8 +11,7 @@ end ### EXPORT set -U fish_greeting "" -set EDITOR "emacsclient -t -a ''" # $EDITOR use Emacs in terminal -set VISUAL "emacsclient -c -a emacs" # $VISUAL use Emacs in GUI mode +set EDITOR "nvim" # $EDITOR use neovim ### ADDING TO THE PATH # First line removes the path; second line sets it. Without the first line, @@ -47,14 +46,8 @@ alias .5='cd ../../../../..' # bat as cat alias cat='bat' -# vim and DOOM emacs +# neovim as vim alias vim='nvim' -alias doom-sync="~/.emacs.d/bin/doom sync" -alias doom-doctor="~/.emacs.d/bin/doom doctor" -alias doom-upgrade="~/.emacs.d/bin/doom upgrade" -alias doom-purge="~/.emacs.d/bin/doom purge" -alias em='/usr/bin/emacs -nw' -alias emacs="emacsclient -c -a 'emacs'" # Changing "ls" to "exa" alias ls='exa -al --color=always --group-directories-first' # my preferred listing @@ -63,24 +56,13 @@ alias ll='exa -l --color=always --group-directories-first' # long format alias lt='exa -aT --color=always --group-directories-first' # tree listing alias l.='exa -a | egrep "^\."' -# pacman and yay -alias pac-up='sudo pacman -Syyu' # update the whole system -alias pac-get='sudo pacman -S --needed' # install a program -alias pac-qry-sync='sudo pacman -Ss' # query details about a program -alias pac-qry='sudo pacman -Q' # query details about a program -alias pac-rmv='sudo pacman -Rcns' # remove a package with all its dependencies (it may brake something) -alias pac-rmv-sec='sudo pacman -Runs' # remove a package with all its dependencies (secure way) -alias pac-cln='sudo pacman -Rns (pacman -Qtdq)' # remove unnecesary packages -alias pac-unlock='sudo rm /var/lib/pacman/db.lck' # remove pacman lock -alias yay-up='yay -Sua --noconfirm' # update only AUR pkgs (yay) -alias yay-get='yay -S' # install a program for the AUR -alias pac-cln-cache='yay -Scc' # clean package cache - -# get fastest mirrors -alias mirror="sudo reflector -f 30 -l 30 --number 10 --verbose --save /etc/pacman.d/mirrorlist" -alias mirrord="sudo reflector --latest 50 --number 20 --sort delay --save /etc/pacman.d/mirrorlist" -alias mirrors="sudo reflector --latest 50 --number 20 --sort score --save /etc/pacman.d/mirrorlist" -alias mirrora="sudo reflector --latest 50 --number 20 --sort age --save /etc/pacman.d/mirrorlist" +# xbps +alias xb-up='sudo xbps-install -Su' # update the whole system +alias xb-get='sudo xbps-install -S' # install a program +alias xb-qry='sudo xbps-query' # query details about a program +alias xb-rmv='sudo xbps-remove -R' # remove a package with all its dependencies (it may brake something) +alias xb-rmv-sec='sudo xbps-remove' # remove a package with all its dependencies (secure way) +alias xb-cln='sudo xbps-remove -o && sudo xbps-remove -O' # remove unnecesary packages and clean cache # Colorize grep output (good for log files) alias grep='grep --color=auto' @@ -93,21 +75,18 @@ alias mv='mv -i' alias cp='cp -i' # git -alias gt-cl='git clone' +alias git-clone='git clone' # ani-cli alias ani='ani-cli' alias ani-q='ani-cli -q' # to select video quality # ytfzf -alias yt='ytfzf -f' +alias yt='ytfzf -f -t' # notflix alias nt='notflix' -# tty-clock -alias clock='tty-clock' - # mount and unmount drives alias mnt='sudo mount' alias umnt='sudo umount' @@ -119,13 +98,10 @@ alias amx='alsamixer' # music player alias mk='musikcube' -# battery (just for laptops) -alias bt='acpi' - # power management -alias po='systemctl poweroff' -alias sp='systemctl suspend' -alias rb='systemctl reboot' +alias po='loginctl poweroff' +alias sp='loginctl suspend' +alias rb='loginctl reboot' # file manager alias fm='/home/drk/.config/vifm/scripts/./vifmrun' @@ -157,12 +133,6 @@ alias wfi-on='nmcli radio wifi on' alias wfi-off='nmcli radio wifi off' alias blt='bluetoothctl' -# cd to diferent directories -alias games='cd /run/media/Storage/multimedia/games/linux && ls' -alias anime='cd /run/media/Storage/multimedia/videos/anime/ && ls' -alias manga='cd /run/media/Storage/multimedia/manga/ && ls' -alias videos='cd /run/media/Storage/multimedia/videos/ && ls' - # the terminal rickroll alias rr='curl -s -L https://raw.githubusercontent.com/keroserene/rickrollrc/master/roll.sh | bash' diff --git a/.config/picom.conf b/.config/picom/picom.conf similarity index 100% rename from .config/picom.conf rename to .config/picom/picom.conf diff --git a/.config/scripts/dmenu-drun.sh b/.config/scripts/dmenu-drun.sh new file mode 100755 index 000000000..ecafc42ab --- /dev/null +++ b/.config/scripts/dmenu-drun.sh @@ -0,0 +1,15 @@ +#!/bin/sh +# _____ ___ ___ +# / /::\ / /\ /__/| +# / /:/\:\ / /::\ | |:| ***This script was made by Clay Gomera (Drake)*** +# / /:/ \:\ / /:/\:\ | |:| - Description: A simple desktop dmenu script +# /__/:/ \__\:| / /:/~/:/ __| |:| - Dependencies: dmenu, j4-dmenu-desktop +# \ \:\ / /:/ /__/:/ /:/___ /__/\_|:|____ +# \ \:\ /:/ \ \:\/:::::/ \ \:\/:::::/ +# \ \:\/:/ \ \::/~~~~ \ \::/~~~~ +# \ \::/ \ \:\ \ \:\ +# \__\/ \ \:\ \ \:\ +# \__\/ \__\/ + +DMENU="dmenu -l 10 -b -i -p Launch:" +j4-dmenu-desktop --dmenu "$DMENU" --no-generic diff --git a/.config/scripts/dmenu-power.sh b/.config/scripts/dmenu-power.sh new file mode 100755 index 000000000..f7ae4fd1a --- /dev/null +++ b/.config/scripts/dmenu-power.sh @@ -0,0 +1,39 @@ +#!/bin/sh +# _____ ___ ___ +# / /::\ / /\ /__/| +# / /:/\:\ / /::\ | |:| ***This script was made by Clay Gomera (Drake)*** +# / /:/ \:\ / /:/\:\ | |:| - Description: A simple power menu dmenu script +# /__/:/ \__\:| / /:/~/:/ __| |:| - Dependencies: dmenu (Everything else can be changed) +# \ \:\ / /:/ /__/:/ /:/___ /__/\_|:|____ +# \ \:\ /:/ \ \:\/:::::/ \ \:\/:::::/ +# \ \:\/:/ \ \::/~~~~ \ \::/~~~~ +# \ \::/ \ \:\ \ \:\ +# \__\/ \ \:\ \ \:\ +# \__\/ \__\/ + +option1=" Logout" +option2="ο€ž Reboot" +option3=" Power off" +option4="πŸ’€ Suspend" +option5="πŸ”’lock" +option6="❌Cancel" +session=loginctl list | awk '$1 ~ "c" { print $1 }' + +options="$option1\n$option2\n$option3\n$option4\n$option5\n$option6" + +action=$(echo "$options" | dmenu -b -i -p " ") + +case "$action" in + $option1) + loginctl kill-session "$session";; + $option2) + loginctl reboot;; + $option3) + loginctl poweroff;; + $option4) + loginctl suspend && betterlockscreen -l;; + $option5) + betterlockscreen -l;; + $option6) + exit 0 +esac diff --git a/.config/scripts/dmenu-scrot.sh b/.config/scripts/dmenu-scrot.sh new file mode 100755 index 000000000..d5cfe6e5e --- /dev/null +++ b/.config/scripts/dmenu-scrot.sh @@ -0,0 +1,45 @@ +#!/bin/sh +# _____ ___ ___ +# / /::\ / /\ /__/| +# / /:/\:\ / /::\ | |:| ***This script was made by Clay Gomera (Drake)*** +# / /:/ \:\ / /:/\:\ | |:| - Description: A simple screenshot dmenu script +# /__/:/ \__\:| / /:/~/:/ __| |:| - Dependencies: scrot, dmenu, notify-send +# \ \:\ / /:/ /__/:/ /:/___ /__/\_|:|____ +# \ \:\ /:/ \ \:\/:::::/ \ \:\/:::::/ +# \ \:\/:/ \ \::/~~~~ \ \::/~~~~ +# \ \::/ \ \:\ \ \:\ +# \__\/ \ \:\ \ \:\ +# \__\/ \__\/ + +mkdir -p "$HOME/Pictures/Screenshots" +option1="ο₯ Entire screen" +option2="ο₯ Entire screen with delay" +option3="ο’ˆ Focused window" +option4="ο‰… Select area" + +options="$option1\n$option2\n$option3\n$option4" + +choice=$(echo "$options" | dmenu -b -i -p "οž’ ") + +case $choice in + $option1) + scrot -e 'mv $f ~/Pictures/Screenshots/' && notify-send -a 'Scrot' 'Screenshot saved.' -i 'dialog-information' -t 2000 ;; + $option2) + delayoption1="Take screenshot with 3 sec delay" + delayoption2="Take screenshot with 5 sec delay" + delayoption3="Take screenshot with 10 sec delay" + delayoptions="$delayoption1\n$delayoption2\n$delayoption3" + delay=$(echo "$delayoptions" | dmenu -b -i -p "οž’ ") + case $delay in + $delayoption1) + scrot -d 3 -e 'mv $f ~/Pictures/Screenshots/' && notify-send -a 'Scrot' 'Screenshot saved.' -i 'dialog-information' -t 2000 ;; + $delayoption2) + scrot -d 5 -e 'mv $f ~/Pictures/Screenshots/' && notify-send -a 'Scrot' 'Screenshot saved.' -i 'dialog-information' -t 2000 ;; + $delayoption3) + scrot -d 10 -e 'mv $f ~/Pictures/Screenshots/' && notify-send -a 'Scrot' 'Screenshot saved.' -i 'dialog-information' -t 2000 ;; + esac ;; + $option3) + scrot -u -b -e 'mv $f ~/Pictures/Screenshots/' && notify-send -a 'Scrot' 'Screenshot saved.' -i 'dialog-information' -t 2000 ;; + $option4) + scrot -s -e 'mv $f ~/Pictures/Screenshots/' && notify-send -a 'Scrot' 'Screenshot saved.' -i 'dialog-information' -t 2000 ;; +esac diff --git a/.config/scripts/dmenu-wall.sh b/.config/scripts/dmenu-wall.sh new file mode 100755 index 000000000..6a71c33b7 --- /dev/null +++ b/.config/scripts/dmenu-wall.sh @@ -0,0 +1,53 @@ +#!/bin/sh +# _____ ___ ___ +# / /::\ / /\ /__/| +# / /:/\:\ / /::\ | |:| ***This script was made by Clay Gomera (Drake)*** +# / /:/ \:\ / /:/\:\ | |:| - Description: A simple wallpaper changer script +# /__/:/ \__\:| / /:/~/:/ __| |:| - Dependencies: dmenu, fd, feh +# \ \:\ / /:/ /__/:/ /:/___ /__/\_|:|____ +# \ \:\ /:/ \ \:\/:::::/ \ \:\/:::::/ +# \ \:\/:/ \ \::/~~~~ \ \::/~~~~ +# \ \::/ \ \:\ \ \:\ +# \__\/ \ \:\ \ \:\ +# \__\/ \__\/ +# This is a simple dmenus script to chose wallpapers on the go, using feh and fd. This is still in development + + +## MAIN VARIABLES AND COMMANDS ## +walldir="$HOME/Pictures/Wallpapers/" # wallpapers folder, change it to yours, make sure that it ends with a / +cd "$walldir" || exit + +## SELECT PICTURE FUNCTION ## +selectpic() { + wallpaper=$(fd --full-path "$walldir" | dmenu -l 10 -b -i -p "Select a wallpaper:") + if [ "$wallpaper" ]; then + chosenwall=$wallpaper + else + exit 0 + fi +} +selectpic + +## WALLPAPER SETTING OPTIONS ## +option1="Fill" +option2="Center" +option3="Tile" +option4="Max" +option5="Scale" +options="$option1\n$option2\n$option3\n$option4\n$option5" + +## MAIN ACTION ## +action=$(echo "$options" | dmenu -l 10 -b -i -p "Chose the format:") +case "$action" in + $option1*) + feh --bg-fill "$chosenwall";; + $option2*) + feh --bg-center "$chosenwall";; + $option3*) + feh --bg-tile "$chosenwall";; + $option4*) + feh --bg-max "$chosenwall";; + $option5*) + feh --bg-scale "$chosenwall";; +esac +exit 0 diff --git a/.config/scripts/dmenu-wifi.sh b/.config/scripts/dmenu-wifi.sh new file mode 100755 index 000000000..6eda5fe94 --- /dev/null +++ b/.config/scripts/dmenu-wifi.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# _____ ___ ___ +# / /::\ / /\ /__/| +# / /:/\:\ / /::\ | |:| ***This script was made by Clay Gomera (Drake)*** +# / /:/ \:\ / /:/\:\ | |:| - Description: A simple wifi-menu dmenu script +# /__/:/ \__\:| / /:/~/:/ __| |:| - Dependencies: dmenu, notify-send, NetworkManager, ping +# \ \:\ / /:/ /__/:/ /:/___ /__/\_|:|____ +# \ \:\ /:/ \ \:\/:::::/ \ \:\/:::::/ +# \ \:\/:/ \ \::/~~~~ \ \::/~~~~ +# \ \::/ \ \:\ \ \:\ +# \__\/ \ \:\ \ \:\ +# \__\/ \__\/ + +# Dmenu variables +DMENU1="dmenu -l 10 -b -i -p" +DMENU2="dmenu -b -i -p" + +# Scanning Networks and notification +notify-send "Scanning Networks" +nmcli -t d wifi rescan +scan=$(nmcli --fields SSID,SECURITY,BARS device wifi list | sed '/^--/d' | sed 1d | sed -E "s/WPA*.?\S/~ο€£~/g" | sed "s/~ο€£~ ~ο€£~/~ο€£~/g;s/802\.1X//g;s/--/~ο‚œ~/g;s/ *~/~/g;s/~ */~/g;s/_/ /g" | column -t -s '~') + +# Selecting Network +selectnet() { + bssid=$(echo "$scan" | uniq -u | $DMENU1 "Select Wifi  :" | cut -d' ' -f1) + if [ "$bssid" ]; then + query=$bssid + else + exit 0 + fi +} +selectnet + +# Typing password +selectpass() { + pass=$($DMENU2 "Enter Password  :") + if [ "$pass" ]; then + passqry=$pass + else + exit 0 + fi +} +selectpass + +# Main connection command +nmcli device wifi connect "$query" password "$passqry" || nmcli device wifi connect "$query" + +# Check notification + notify-send "Checking if the connection was successful" + +# Check process + sleep 10 + if ping -q -c 2 -W 2 google.com >/dev/null; then + notify-send "Your internet is working :)" + else + notify-send "Your internet is not working :(" + fi diff --git a/.config/scripts/feh.sh b/.config/scripts/feh.sh new file mode 100755 index 000000000..b809daf39 --- /dev/null +++ b/.config/scripts/feh.sh @@ -0,0 +1,8 @@ +#!/bin/sh +# This is my script to set my wallpaper with feh + +# Wallpapers directory and chosen wallpaper here +walldir="$HOME/Pictures/Wallpapers/" +wallpaper="gruvbox_solaris.png" +# Main command +feh --bg-fill "$walldir/$wallpaper" diff --git a/.config/scripts/lockscreen.sh b/.config/scripts/lockscreen.sh new file mode 100755 index 000000000..79106eff2 --- /dev/null +++ b/.config/scripts/lockscreen.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +betterlockscreen -l && loginctl suspend diff --git a/.doom.d/doom-emacs-dash.png b/.doom.d/doom-emacs-dash.png deleted file mode 100644 index 3c6e0bb6e..000000000 Binary files a/.doom.d/doom-emacs-dash.png and /dev/null differ diff --git a/.shell-scripts/rofi-power-menu.sh b/.shell-scripts/rofi-power-menu.sh deleted file mode 100755 index ac4380392..000000000 --- a/.shell-scripts/rofi-power-menu.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash - -option1="ο€£ lock" -option2=" logout" -option3="ο€ž reboot" -option4=" power off" -option5=" suspend" - -options="$option1\n$option2\n$option3\n$option4\n$option5" - -choice=$(echo -e "$options" | rofi -dmenu -i -no-show-icons -lines 5 -width 20 -p " ") - -case $choice in - $option1) - betterlockscreen -l ;; - $option2) - killall awesome;; - $option3) - systemctl reboot ;; - $option4) - systemctl poweroff ;; - $option5) - systemctl suspend ;; -esac diff --git a/.shell-scripts/rofi-scrot-menu.sh b/.shell-scripts/rofi-scrot-menu.sh deleted file mode 100755 index 3bebc27ab..000000000 --- a/.shell-scripts/rofi-scrot-menu.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env bash - -# This script requires scrot -mkdir -p $HOME/Pictures/Scrot -option1="ο₯ Entire screen" -option2="ο₯ Entire screen with delay" -option3="ο’ˆ Focused window" -option4="ο‰… Select area" - -options="$option1\n$option2\n$option3\n$option4" - -choice=$(echo -e "$options" | rofi -i -dmenu -no-show-icons -no-sidebar-mode -lines 4 -width 20 -p "οž’ ") - -case $choice in - $option1) - scrot -e 'mv $f ~/Pictures/Scrot/' && notify-send -a 'Scrot' 'Screenshot saved.' -i 'dialog-information' -t 2000 ;; - $option2) - delayoption1="Take screenshot with 3 sec delay" - delayoption2="Take screenshot with 5 sec delay" - delayoption3="Take screenshot with 10 sec delay" - delayoptions="$delayoption1\n$delayoption2\n$delayoption3" - delay=$(echo -e "$delayoptions" | rofi -i -dmenu -no-show-icons -no-sidebar-mode -lines 3 -width 20 -p "οž’ ") - - case $delay in - - $delayoption1) - scrot -d 3 -e 'mv $f ~/Pictures/Scrot/' && notify-send -a 'Scrot' 'Screenshot saved.' -i 'dialog-information' -t 2000 ;; - $delayoption2) - scrot -d 5 -e 'mv $f ~/Pictures/Scrot/' && notify-send -a 'Scrot' 'Screenshot saved.' -i 'dialog-information' -t 2000 ;; - $delayoption3) - scrot -d 10 -e 'mv $f ~/Pictures/Scrot/' && notify-send -a 'Scrot' 'Screenshot saved.' -i 'dialog-information' -t 2000 ;; - esac ;; - - $option3) - scrot -u -b -e 'mv $f ~/Pictures/Scrot/' && notify-send -a 'Scrot' 'Screenshot saved.' -i 'dialog-information' -t 2000 ;; - $option4) - scrot -s -e 'mv $f ~/Pictures/Scrot/' && notify-send -a 'Scrot' 'Screenshot saved.' -i 'dialog-information' -t 2000 ;; - -esac diff --git a/.shell-scripts/rofi-wifi-menu.sh b/.shell-scripts/rofi-wifi-menu.sh deleted file mode 100755 index 99f8a3be2..000000000 --- a/.shell-scripts/rofi-wifi-menu.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env bash - -notify-send "Getting list of available Wi-Fi networks..." -nmcli -t d wifi rescan -# Get a list of available wifi connections and morph it into a nice-looking list -LIST=$(nmcli --fields SSID,SECURITY,BARS device wifi list | sed '/^--/d' | sed 1d | sed -E "s/WPA*.?\S/~ο€£~/g" | sed "s/~ο€£~ ~ο€£~/~ο€£~/g;s/802\.1X//g;s/--/~ο‚œ~/g;s/ *~/~/g;s/~ */~/g;s/_/ /g" | column -t -s '~') - -# get current connection status -CONSTATE=$(nmcli -fields WIFI g) -if [[ "$CONSTATE" =~ "enabled" ]]; then - TOGGLE="Disable WiFi οͺ©" -elif [[ "$CONSTATE" =~ "disabled" ]]; then - TOGGLE="Enable WiFi οͺ¨" -fi - -# Use rofi to select wifi network -CHENTRY=$(echo -e "$TOGGLE\n$LIST" | uniq -u | rofi -dmenu -selected-row 1 -p "Wi-Fi SSID: ") -# Get name of connection -CHSSID=$(echo "$CHENTRY" | sed 's/\s\{2,\}/\|/g' | awk -F "|" '{print $1}') - -if [ "$CHENTRY" = "" ]; then - exit -elif [ "$CHENTRY" = "Enable WiFi οͺ¨" ]; then - nmcli radio wifi on -elif [ "$CHENTRY" = "Disable WiFi οͺ©" ]; then - nmcli radio wifi off -else - # get list of known connections - KNOWNCON=$(nmcli connection show) - - # If the connection is already in use, then this will still be able to get the SSID - if [ "$CHSSID" = "*" ]; then - CHSSID=$(echo "$CHENTRY" | sed 's/\s\{2,\}/\|/g' | awk -F "|" '{print $3}') - fi - - # Parses the list of preconfigured connections to see if it already contains the chosen SSID. This speeds up the connection process - if [[ $(echo "$KNOWNCON" | grep "$CHSSID") = "$CHSSID" ]]; then - nmcli con up "$CHSSID" - else - if [[ "$CHENTRY" =~ "ο€£" ]]; then - WIFIPASS=$(echo " Press Enter if network is saved" | rofi -dmenu -p " WiFi Password: " -lines 1 ) - fi - if nmcli dev wifi con "$CHSSID" password "$WIFIPASS" - then - notify-send 'Connection successful' - else - notify-send 'Connection failed' - fi - fi -fi