diff --git a/user/.config/awesome/apps.lua b/user/.config/awesome/apps.lua index 2ac4fbf6b..5ef65103c 100644 --- a/user/.config/awesome/apps.lua +++ b/user/.config/awesome/apps.lua @@ -1,16 +1,28 @@ --- Apps +-- Apps config, see keymaps/keyboard.lua to see how this is handled in keybindings local apps = { - terminal = "wezterm", - editor = "neovide --neovim-bin ./.local/bin/lvim", - music = "wezterm start --class musik -- cmus", - youm = "wezterm start --class youm -- ytfzf -mlstT chafa", - ytfzf = "wezterm start --class ytfzf -- ytfzf -flstT chafa", - ani = "wezterm start --class ani-cli -- ani-cli", - flix = "wezterm start --class flix-cli -- flix-cli", - chat = "revolt-desktop", - game = "retroarch", - file = "wezterm start --class vifm -- ./.config/vifm/scripts/vifmrun", - browser = "firefox", - office = "libreoffice" + terminal = "wezterm", -- Selected terminal emulator + -- Rofi settings + drunner = "rofi -show drun -show-icons", -- Desktop runner + runner = "rofi -show run", -- Normal runner + runner_power = "$HOME/.config/rofi/scripts/rofi_power", -- Power manager + runner_wifi = "$HOME/.config/rofi/scripts/rofi_wifi", -- Wifi manager + runner_scrot = "$HOME/.config/rofi/scripts/rofi_scrot", -- Screenshots manager + runner_emoji = "$HOME/.config/rofi/scripts/rofi_emoji", -- Emojis manager + runner_wall = "$HOME/.config/rofi/scripts/rofi_wall", -- Wallpapers manager + -- Other scripts + ytfzf = "wezterm start --class ytfzf -- ytfzf -flstT chafa", -- Youtube + ytfzf_music = "wezterm start --class ytfzf_music -- ytfzf -mlstT chafa", -- Youtube Music + ani_cli = "wezterm start --class ani-cli -- ani-cli", -- Anime + flix_cli = "wezterm start --class flix-cli -- flix-cli", -- Movies + tut = "wezterm start --class tut -- tut", -- Mastodon + newsboat = "wezterm start --class newsboat -- newsboat -u ~/.config/newsboat/urls", -- Newsboat + -- Selected apps + editor = "neovide --neovim-bin ./.local/bin/lvim", -- TAG 1 + file = "wezterm start --class vifm -- ./.config/vifm/scripts/vifmrun", -- TAG 2 + browser = "firefox", -- TAG 3 + chat = "revolt-desktop", -- TAG 4 + music = "wezterm start --class cmus -- cmus", -- TAG 5 + office = "libreoffice", -- TAG 8 + game = "retroarch" -- TAG 9 } return apps diff --git a/user/.config/awesome/autostart.lua b/user/.config/awesome/autostart.lua index 7ae58392a..5249b0724 100644 --- a/user/.config/awesome/autostart.lua +++ b/user/.config/awesome/autostart.lua @@ -1,6 +1,21 @@ local awful = require("awful") -awful.util.spawn_with_shell("lxpolkit &") -awful.util.spawn_with_shell("$HOME/.fehbg &") -awful.util.spawn_with_shell("unclutter --hide-on-touch &") -awful.util.spawn_with_shell("picom --experimental-backends --config ~/.config/picom/picom.conf &") -awful.util.spawn_with_shell("xfce4-power-manager &") +-- Session manager +awful.util.spawn_with_shell( + "lxpolkit &" +) +-- Wallpapers manager +awful.util.spawn_with_shell( + "$HOME/.fehbg &" +) +-- Automatically hide the cursor +awful.util.spawn_with_shell( + "unclutter --hide-on-touch &" +) +-- Compositor +awful.util.spawn_with_shell( + "picom --experimental-backends --config ~/.config/picom/picom.conf &" +) +-- Power manager +awful.util.spawn_with_shell( + "xfce4-power-manager &" +) diff --git a/user/.config/awesome/keymaps/keyboard.lua b/user/.config/awesome/keymaps/keyboard.lua index 9e1bf791f..836b0267f 100644 --- a/user/.config/awesome/keymaps/keyboard.lua +++ b/user/.config/awesome/keymaps/keyboard.lua @@ -7,6 +7,7 @@ require("awful.autofocus") altkey = "Mod1" modkey = "Mod4" conkey = "Control" +shikey = "Shift" --[[ Main keybinds ]]-- awful.keyboard.append_global_keybindings( @@ -24,7 +25,7 @@ awful.keyboard.append_global_keybindings( ), -- Reload awesome awful.key( - { modkey, "Control" }, + { modkey, conkey }, "r", awesome.restart, { description = @@ -102,7 +103,7 @@ awful.keyboard.append_global_keybindings( }, -- Toggle tags by numbers 1-9 awful.key { - modifiers = { modkey, "Control" }, + modifiers = { modkey, conkey }, keygroup = "numrow", description = "Quickly view contents in another tag with number keys from {1 to 9}", group = "Tag keybinds", @@ -116,7 +117,7 @@ awful.keyboard.append_global_keybindings( }, -- Move focused window to tag by numbers 1-9 awful.key { - modifiers = { modkey, "Shift" }, + modifiers = { modkey, shikey }, keygroup = "numrow", description = "Move focused window to another tag with number keys from {1 to 9}", group = "Tag keybinds", @@ -131,7 +132,7 @@ awful.keyboard.append_global_keybindings( }, -- Toggle focused window on tag by numbers 1-9 awful.key { - modifiers = { modkey, "Control", "Shift" }, + modifiers = { modkey, conkey, shikey }, keygroup = "numrow", description = "View focused window on more than one tag with number keys from {1 to 9}", group = "Tag keybinds", @@ -195,7 +196,7 @@ awful.keyboard.append_global_keybindings( ), -- Focus next screen awful.key( - { modkey, "Control" }, + { modkey, conkey }, "j", function () awful.screen.focus_relative(1) @@ -208,7 +209,7 @@ awful.keyboard.append_global_keybindings( ), -- Focus previous screen awful.key( - { modkey, "Control" }, + { modkey, conkey }, "k", function () awful.screen.focus_relative(-1) @@ -228,7 +229,7 @@ awful.keyboard.append_global_keybindings( { -- Swap with next window by index awful.key( - { modkey, "Shift" }, + { modkey, shikey }, "j", function () awful.client.swap.byidx(1) @@ -241,7 +242,7 @@ awful.keyboard.append_global_keybindings( ), -- Swap with previous window by index awful.key( - { modkey, "Shift" }, + { modkey, shikey }, "k", function () awful.client.swap.byidx(-1) @@ -280,7 +281,7 @@ awful.keyboard.append_global_keybindings( ), -- Increase the number of master window awful.key( - { modkey, "Shift" }, + { modkey, shikey }, "h", function () awful.tag.incnmaster(1, nil, true) @@ -293,7 +294,7 @@ awful.keyboard.append_global_keybindings( ), -- Decrease the number of master windows awful.key( - { modkey, "Shift" }, + { modkey, shikey }, "l", function () awful.tag.incnmaster(-1, nil, true) @@ -306,7 +307,7 @@ awful.keyboard.append_global_keybindings( ), -- Increase the number of columns awful.key( - { modkey, "Control" }, + { modkey, conkey }, "h", function () awful.tag.incncol(1, nil, true) @@ -319,7 +320,7 @@ awful.keyboard.append_global_keybindings( ), -- Decrease the number of columns awful.key( - { modkey, "Control" }, + { modkey, conkey }, "l", function () awful.tag.incncol(-1, nil, true) @@ -345,7 +346,7 @@ awful.keyboard.append_global_keybindings( ), -- Switch to previous layout awful.key( - { modkey, "Shift" }, + { modkey, shikey }, "space", function () awful.layout.inc(-1) @@ -425,7 +426,7 @@ client.connect_signal( ), -- Toggle floating mode on focused window awful.key( - { modkey, "Control" }, + { modkey, conkey }, "space", awful.client.floating.toggle, { description = @@ -436,7 +437,7 @@ client.connect_signal( ), -- Move focused window to master awful.key( - { modkey, "Control" }, + { modkey, conkey }, "Return", function (c) c:swap( @@ -581,7 +582,7 @@ awful.keyboard.append_global_keybindings( group = "Quick keybinds" } ), - -- apps (Super + a followed by KEY) + -- Apps (Super + a followed by KEY) awful.key( { modkey }, "a", @@ -594,19 +595,19 @@ awful.keyboard.append_global_keybindings( return end if key == "1" then - awful.util.spawn(apps.editor) + awful.util.spawn(apps.editor) -- TAG 1 elseif key == "2" then - awful.util.spawn(apps.file) + awful.util.spawn(apps.file) -- TAG 2 elseif key == "3" then - awful.util.spawn(apps.browser) + awful.util.spawn(apps.browser) -- TAG 3 elseif key == "4" then - awful.util.spawn(apps.chat) + awful.util.spawn(apps.chat) -- TAG 4 elseif key == "5" then - awful.util.spawn(apps.music) + awful.util.spawn(apps.music) -- TAG 5 elseif key == "8" then - awful.util.spawn(apps.office) + awful.util.spawn(apps.office) -- TAG 8 elseif key == "9" then - awful.util.spawn(apps.game) + awful.util.spawn(apps.game) -- TAG 9 end awful.keygrabber.stop(grabber) end @@ -645,7 +646,7 @@ awful.keyboard.append_global_keybindings( "Quick keybinds" } ), - -- Dmenu scripts (Super + p followed by KEY) + -- Runners (Super + p followed by KEY) awful.key( { modkey }, "p", @@ -658,21 +659,19 @@ awful.keyboard.append_global_keybindings( return end if key == "d" then - awful.spawn.with_shell("rofi -show drun -show-icons") + awful.util.spawn(apps.drunner) elseif key == "r" then - awful.spawn.with_shell("rofi -show run") - elseif key == "e" then - awful.spawn.with_shell("$HOME/.config/rofi/scripts/rofi_edit") + awful.util.spawn(apps.runner) elseif key == "q" then - awful.spawn.with_shell("$HOME/.config/rofi/scripts/rofi_power") + awful.spawn.with_shell(apps.runner_power) elseif key == "i" then - awful.spawn.with_shell("$HOME/.config/rofi/scripts/rofi_wifi") + awful.spawn.with_shell(apps.runner_wifi) elseif key == "s" then - awful.spawn.with_shell("$HOME/.config/rofi/scripts/rofi_scrot") + awful.spawn.with_shell(apps.runner_scrot) elseif key == "z" then - awful.spawn.with_shell("$HOME/.config/rofi/scripts/rofi_emoji") + awful.spawn.with_shell(apps.runner_emoji) elseif key == "w" then - awful.spawn.with_shell("$HOME/.config/rofi/scripts/rofi_wall") + awful.spawn.with_shell(apps.runner_wall) end awful.keygrabber.stop(grabber) end @@ -683,7 +682,7 @@ awful.keyboard.append_global_keybindings( group = "Quick keybinds" } ), - -- Terminal scripts (Super + t followed by KEY) + -- Multimedia scripts (Super + t followed by KEY) awful.key( { modkey }, "t", @@ -695,14 +694,18 @@ awful.keyboard.append_global_keybindings( if event == "release" then return end - if key == "m" then - awful.util.spawn(apps.youm) - elseif key == "y" then + if key == "y" then awful.util.spawn(apps.ytfzf) + elseif key == "y" then + awful.util.spawn(apps.ytfzf_music) elseif key == "a" then - awful.util.spawn(apps.ani) + awful.util.spawn(apps.ani_cli) elseif key == "f" then - awful.util.spawn(apps.flix) + awful.util.spawn(apps.flix_cli) + elseif key == "t" then + awful.util.spawn(apps.tut) + elseif key == "n" then + awful.util.spawn(apps.newsboat) end awful.keygrabber.stop(grabber) end diff --git a/user/.config/awesome/rc.lua b/user/.config/awesome/rc.lua index 7a43129b4..5008444a6 100644 --- a/user/.config/awesome/rc.lua +++ b/user/.config/awesome/rc.lua @@ -1,12 +1,12 @@ -- Imports local beautiful = require("beautiful") beautiful.init(string.format("%s/.config/awesome/ui/theme.lua", os.getenv("HOME"))) -- Selected theme -require("helpers") -require("apps") -require("ui.layouts") -require("ui.bar") -require("ui.notif") -require("keymaps.keyboard") -require("keymaps.mouse") -require("ui.rules") -require("autostart") +require("helpers") -- Some aditional code for handling +require("apps") -- Selected apps & scripts +require("ui.layouts") -- Predifined tiling layouts +require("ui.bar") -- The bar on the top +require("ui.notif") -- The notification manager +require("keymaps.keyboard") -- Keyboard shortcuts +require("keymaps.mouse") -- Mouse shortcuts +require("ui.rules") -- Window manager rules +require("autostart") -- Startup applications diff --git a/user/.config/awesome/ui/bar.lua b/user/.config/awesome/ui/bar.lua index 731adeabb..1ffb3b471 100644 --- a/user/.config/awesome/ui/bar.lua +++ b/user/.config/awesome/ui/bar.lua @@ -9,13 +9,13 @@ screen.connect_signal("request::desktop_decoration", function(s) -- Tag names for each screen awful.tag( { - "", -- EDITOR + "", -- EDITOR "", -- FILE MANAGER - "󰖟", -- WEB BROWSER + "󰖟", -- WEB BROWSER "󰻞", -- CHAT "󰲹", -- MUSIC - "", -- VIDEO - "󰲶", -- IMAGE/EDIT TOOLS + "", -- VIDEO + "󰧰", -- IMAGE/EDIT TOOLS "󰧮", -- OFFICE "󰸶" -- GAMES }, diff --git a/user/.config/awesome/ui/rules.lua b/user/.config/awesome/ui/rules.lua index 4a371f402..3173619ad 100644 --- a/user/.config/awesome/ui/rules.lua +++ b/user/.config/awesome/ui/rules.lua @@ -52,6 +52,7 @@ ruled.client.connect_signal( rule_any = { class = { "Emacs", + "neovide", "lvim", "Godot", "neovim", @@ -82,7 +83,8 @@ ruled.client.connect_signal( "Chromium", "Bitwarden", "qutebrowser", - "tut" + "tut", + "newsboat" } }, properties = { tag = "󰖟" } @@ -104,8 +106,7 @@ ruled.client.connect_signal( rule_any = { class = { "cmus", - "musik", - "youm", + "ytfzf_music", "Audacity", "Ardour", "Carla2", @@ -145,7 +146,7 @@ ruled.client.connect_signal( "Xournalpp", } }, - properties = { tag = "󰲶" } + properties = { tag = "󰧰" } } -- TAG 8 ruled.client.append_rule { diff --git a/user/.config/awesome/ui/widgets/battery b/user/.config/awesome/ui/widgets/battery index 2879bcf43..98e9043b4 100755 --- a/user/.config/awesome/ui/widgets/battery +++ b/user/.config/awesome/ui/widgets/battery @@ -2,27 +2,27 @@ # Loop through all attached batteries and format the info currntpwr=$(powerprofilesctl get) if [ "${currntpwr}" = "performance" ]; then - pwr=" 󰇙 󰓅 Performance" + pwr=" - 󰓅 Performance" elif [ "${currntpwr}" = "balanced" ]; then - pwr=" 󰇙 󰾅 Balanced" + pwr=" - 󰾅 Balanced" elif [ "${currntpwr}" = "power-saver" ]; then - pwr=" 󰇙 󰾆 PowerSaver" + pwr=" - 󰾆 PowerSaver" fi for battery in /sys/class/power_supply/BAT?*; do # If non-first battery, print a space separator. [ -n "${capacity+x}" ] && printf " " # Sets up the status and capacity case "$(cat "$battery/status" 2>&1)" in - "Full") status=" " ;; - "Discharging") status=" " ;; - "Charging") status=" " ;; - "Not charging") status=" " ;; - "Unknown") status=" " ;; + "Full") status="󱊣" ;; + "Discharging") status="󱊢" ;; + "Charging") status="󱊥" ;; + "Not charging") status="󱊥" ;; + "Unknown") status="󰂎" ;; *) exit 1 ;; esac capacity="$(cat "$battery/capacity" 2>&1)" # Will make a warn variable if discharging and low - [ "$status" = " " ] && [ "$capacity" -le 100 ] && warn="" + [ "$status" = "󰂎" ] && [ "$capacity" -le 100 ] && warn="" # Prints the info printf "%s%s%d%%%s" "$status" "$warn " "$capacity" "$pwr"; unset warn done && printf "\\n" diff --git a/user/.config/awesome/ui/widgets/volume b/user/.config/awesome/ui/widgets/volume index 794ed634c..f4ae852c7 100755 --- a/user/.config/awesome/ui/widgets/volume +++ b/user/.config/awesome/ui/widgets/volume @@ -1,6 +1,6 @@ #!/bin/bash # Prints the current volume or 🔇 if muted. -[ "$(pamixer --get-mute)" = true ] && echo "󰸈" && exit +[ "$(pamixer --get-mute)" = true ] && echo "󰕿x" && exit vol="$(pamixer --get-volume)" if [ "$vol" -gt "50" ]; then icon="󰕾" @@ -9,6 +9,6 @@ elif [ "$vol" -gt "10" ]; then elif [ "$vol" -gt "0" ]; then icon="󰕿" else - echo "󰸈" && exit + echo "󰕿x" && exit fi echo -e "$icon $vol%" diff --git a/user/.config/rofi/config.rasi b/user/.config/rofi/config.rasi index 845de2e72..e9635bfeb 100644 --- a/user/.config/rofi/config.rasi +++ b/user/.config/rofi/config.rasi @@ -1,6 +1,6 @@ configuration{ modi: "run,drun,window"; - lines: 5; + lines: 10; font: "mononoki Nerd Font 14"; show-icons: true; terminal: "alacritty"; @@ -10,8 +10,8 @@ configuration{ hide-scrollbar: true; display-drun: "  Apps "; display-run: "  Run "; - display-window: " 﩯 Window"; - display-Network: " 󰤨 Network"; + display-window: " 﩯 Window "; + display-Network: " 󰤨 Network "; sidebar-mode: true; dpi: 100; } @@ -24,8 +24,8 @@ element-text, element-icon , mode-switcher { } window { - height: 380px; - width: 850; + height: 380; + width: 1000; border: 3px; border-color: @border-col; background-color: @bg-col; @@ -64,9 +64,9 @@ entry { listview { border: 0px 0px 0px; - padding: 6px 0px 0px; - margin: 10px 0px 0px 20px; - columns: 2; + padding: 2px 2px 2px; + margin: 10px 20px 0px 20px; + columns: 1; background-color: @bg-col; } @@ -77,7 +77,7 @@ element { } element-icon { - size: 25px; + size: 28px; } element selected { diff --git a/user/.config/rofi/scripts/rofi_edit b/user/.config/rofi/scripts/rofi_edit deleted file mode 100755 index 32cfe8be3..000000000 --- a/user/.config/rofi/scripts/rofi_edit +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env bash - -# ***This script was made by Clay Gomera (Drake)*** -# - Description: A simple script for file editing in rofi -# - Dependencies: rofi (Everything else can be changed) - -# Show list of options -EDITOR="emacsclient -c -a emacs" -cd "$HOME" || exit 0 -file=1 -while [ "$file" ]; do - file=$(fd -LHpd 1 | rofi -dmenu -p "File to edit: $(basename "$(pwd)")") - if [ -e "$file" ]; then - owd=$(pwd) - if [ -d "$file" ]; then - cd "$file" || exit 0 - else [ -f "$file" ] - if [ "$file" ]; then - $EDITOR "$owd/$file" & - exit 0 - else - exit 0 - fi - fi - fi -done diff --git a/user/.config/rofi/scripts/rofi_power b/user/.config/rofi/scripts/rofi_power index d49da716f..dccea2e66 100755 --- a/user/.config/rofi/scripts/rofi_power +++ b/user/.config/rofi/scripts/rofi_power @@ -26,7 +26,7 @@ pwr4=" Cancel" pwrs="$pwr1\n$pwr2\n$pwr3\n$pwr4" ## MAIN ACTION COMMAND ## -action=$(echo -e "$options" | rofi -dmenu -p "  Power Options ") +action=$(echo -e "$options" | rofi -dmenu -i -p "  Power Options ") case "$action" in $option1*) pkill X;; @@ -47,7 +47,7 @@ case "$action" in elif [ "$currentpwr" = "balanced" ]; then currentpwr=" Balanced" fi - pwraction=$(echo -e "$pwrs" | rofi -dmenu -p "  Power Profile Menu - Currently set to: ${currentpwr} ") + pwraction=$(echo -e "$pwrs" | rofi -dmenu -i -p "  Power Profile Menu - Currently set to: ${currentpwr} ") case "$pwraction" in $pwr1*) powerprofilesctl set performance && notify-send "Power profile switched to performance";; diff --git a/user/.config/rofi/scripts/rofi_scrot b/user/.config/rofi/scripts/rofi_scrot index 33886946a..6641b74c1 100755 --- a/user/.config/rofi/scripts/rofi_scrot +++ b/user/.config/rofi/scripts/rofi_scrot @@ -23,7 +23,7 @@ dels="$del1\n$del2\n$del3" ## DELAY FUNCTION ## delays() { - del=$(echo -e "$dels" | rofi -dmenu -p "  Select Delay "); + del=$(echo -e "$dels" | rofi -dmenu -i -p "  Select Delay "); case $del in "$del1") scrot -d 3 && notify-send "Screenshot saved";; @@ -50,7 +50,7 @@ area() { } ## MAIN ACTION ## -choice=$(echo -e "$chos" | rofi -dmenu -p "  Sreenshot Menu ") +choice=$(echo -e "$chos" | rofi -dmenu -i -p "  Sreenshot Menu ") case $choice in "$cho1") screen;; diff --git a/user/.config/rofi/scripts/rofi_wall b/user/.config/rofi/scripts/rofi_wall index a89483bd5..db3e3dc06 100755 --- a/user/.config/rofi/scripts/rofi_wall +++ b/user/.config/rofi/scripts/rofi_wall @@ -10,7 +10,7 @@ cd "$walldir" || exit ## SELECT PICTURE FUNCTION ## selectpic() { - wallpaper=$(fd -p "$walldir" | rofi -dmenu -p "Select a wallpaper:") + wallpaper=$(fd -p "$walldir" | rofi -dmenu -i -p "Select a wallpaper:") if [ "$wallpaper" ]; then chosenwall=$wallpaper else @@ -28,7 +28,7 @@ option5="Scale" options="$option1\n$option2\n$option3\n$option4\n$option5" ## MAIN ACTION ## -action=$(echo -e "$options" | rofi -dmenu -p "Chose the format:") +action=$(echo -e "$options" | rofi -dmenu -i -p "Chose the format:") case "$action" in $option1*) feh --bg-fill "$chosenwall";; diff --git a/user/.config/rofi/scripts/rofi_wifi b/user/.config/rofi/scripts/rofi_wifi index ac2fafe01..3f6a3cfde 100755 --- a/user/.config/rofi/scripts/rofi_wifi +++ b/user/.config/rofi/scripts/rofi_wifi @@ -5,7 +5,7 @@ # - Dependencies: rofi, NetworkManager ## ROFI VARIABLES ## -ROFI="rofi -dmenu -p" +ROFI="rofi -dmenu -i -p" ## MAIN OPTIONS ## option1=" Turn on WiFi"