├── eww ├── .gitignore ├── modules │ ├── cpu.yuck │ ├── memory.yuck │ ├── temperature.yuck │ ├── base.yuck │ ├── power.yuck │ ├── workspaces.yuck │ ├── time.yuck │ ├── volume.yuck │ ├── net.yuck │ └── music.yuck ├── scripts │ ├── open.sh │ ├── openzen.sh │ ├── colors-zen.scss │ ├── colors-normal.scss │ ├── temperature.sh │ ├── monitor.sh │ ├── net.sh │ ├── music.sh │ ├── battery.sh │ └── workspace.sh ├── windows │ ├── calendar.yuck │ ├── bars.yuck │ └── powermenu.yuck ├── eww.yuck └── eww.scss ├── xorg-screenshot.png ├── wayland-screenshot.png ├── awesome ├── theming │ ├── icons │ │ ├── ac.png │ │ ├── cpu.png │ │ ├── hdd.png │ │ ├── max.png │ │ ├── mem.png │ │ ├── net.png │ │ ├── vol.png │ │ ├── fairh.png │ │ ├── fairv.png │ │ ├── mail.png │ │ ├── net_up.png │ │ ├── note.png │ │ ├── paused.png │ │ ├── spiral.png │ │ ├── task.png │ │ ├── temp.png │ │ ├── tile.png │ │ ├── vol_no.png │ │ ├── battery.png │ │ ├── dwindle.png │ │ ├── floating.png │ │ ├── mail_on.png │ │ ├── net_down.png │ │ ├── note_off.png │ │ ├── note_on.png │ │ ├── scissors.png │ │ ├── submenu.png │ │ ├── termfair.png │ │ ├── tileleft.png │ │ ├── tiletop.png │ │ ├── vol_low.png │ │ ├── vol_mute.png │ │ ├── battery_low.png │ │ ├── centerfair.png │ │ ├── centerwork.png │ │ ├── centerworkh.png │ │ ├── magnifier.png │ │ ├── net_updown.png │ │ ├── net_wired.png │ │ ├── square_sel.png │ │ ├── tilebottom.png │ │ ├── battery_empty.png │ │ ├── square_unsel.png │ │ └── titlebar │ │ │ ├── close_focus.png │ │ │ ├── close_normal.png │ │ │ ├── ontop_focus_active.png │ │ │ ├── ontop_normal_active.png │ │ │ ├── sticky_focus_active.png │ │ │ ├── floating_focus_active.png │ │ │ ├── floating_normal_active.png │ │ │ ├── maximized_focus_active.png │ │ │ ├── ontop_focus_inactive.png │ │ │ ├── ontop_normal_inactive.png │ │ │ ├── sticky_focus_inactive.png │ │ │ ├── sticky_normal_active.png │ │ │ ├── sticky_normal_inactive.png │ │ │ ├── floating_focus_inactive.png │ │ │ ├── floating_normal_inactive.png │ │ │ ├── maximized_focus_inactive.png │ │ │ ├── maximized_normal_active.png │ │ │ └── maximized_normal_inactive.png │ └── theme.lua └── rc.lua ├── wayland ├── hypr │ ├── hyprpaper.conf │ ├── hyprlock.conf │ ├── bluefilter.glsl │ ├── hyprload.toml │ ├── scripts │ │ └── zentoggle.sh │ ├── hyprlandd.conf │ └── hyprland.conf ├── wofi │ └── style.css └── waybar │ ├── config.jsonc │ └── style.css ├── .gitmodules ├── .Xresources ├── setup.sh ├── alacritty ├── alacritty.toml ├── alacritty-awesome.toml ├── darkline.yml └── onedarkish.yml ├── tofi └── config ├── README.md ├── .tmux.conf ├── emacs ├── init.el ├── ux.el ├── mappings.el └── packages.el ├── colorschemes └── darkline.colorscheme ├── swaync ├── config.json └── style.css └── picom └── picom.conf /eww/.gitignore: -------------------------------------------------------------------------------- 1 | eww-colors.scss 2 | -------------------------------------------------------------------------------- /xorg-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/xorg-screenshot.png -------------------------------------------------------------------------------- /wayland-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/wayland-screenshot.png -------------------------------------------------------------------------------- /awesome/theming/icons/ac.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/ac.png -------------------------------------------------------------------------------- /awesome/theming/icons/cpu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/cpu.png -------------------------------------------------------------------------------- /awesome/theming/icons/hdd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/hdd.png -------------------------------------------------------------------------------- /awesome/theming/icons/max.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/max.png -------------------------------------------------------------------------------- /awesome/theming/icons/mem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/mem.png -------------------------------------------------------------------------------- /awesome/theming/icons/net.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/net.png -------------------------------------------------------------------------------- /awesome/theming/icons/vol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/vol.png -------------------------------------------------------------------------------- /awesome/theming/icons/fairh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/fairh.png -------------------------------------------------------------------------------- /awesome/theming/icons/fairv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/fairv.png -------------------------------------------------------------------------------- /awesome/theming/icons/mail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/mail.png -------------------------------------------------------------------------------- /awesome/theming/icons/net_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/net_up.png -------------------------------------------------------------------------------- /awesome/theming/icons/note.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/note.png -------------------------------------------------------------------------------- /awesome/theming/icons/paused.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/paused.png -------------------------------------------------------------------------------- /awesome/theming/icons/spiral.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/spiral.png -------------------------------------------------------------------------------- /awesome/theming/icons/task.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/task.png -------------------------------------------------------------------------------- /awesome/theming/icons/temp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/temp.png -------------------------------------------------------------------------------- /awesome/theming/icons/tile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/tile.png -------------------------------------------------------------------------------- /awesome/theming/icons/vol_no.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/vol_no.png -------------------------------------------------------------------------------- /awesome/theming/icons/battery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/battery.png -------------------------------------------------------------------------------- /awesome/theming/icons/dwindle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/dwindle.png -------------------------------------------------------------------------------- /awesome/theming/icons/floating.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/floating.png -------------------------------------------------------------------------------- /awesome/theming/icons/mail_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/mail_on.png -------------------------------------------------------------------------------- /awesome/theming/icons/net_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/net_down.png -------------------------------------------------------------------------------- /awesome/theming/icons/note_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/note_off.png -------------------------------------------------------------------------------- /awesome/theming/icons/note_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/note_on.png -------------------------------------------------------------------------------- /awesome/theming/icons/scissors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/scissors.png -------------------------------------------------------------------------------- /awesome/theming/icons/submenu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/submenu.png -------------------------------------------------------------------------------- /awesome/theming/icons/termfair.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/termfair.png -------------------------------------------------------------------------------- /awesome/theming/icons/tileleft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/tileleft.png -------------------------------------------------------------------------------- /awesome/theming/icons/tiletop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/tiletop.png -------------------------------------------------------------------------------- /awesome/theming/icons/vol_low.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/vol_low.png -------------------------------------------------------------------------------- /awesome/theming/icons/vol_mute.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/vol_mute.png -------------------------------------------------------------------------------- /awesome/theming/icons/battery_low.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/battery_low.png -------------------------------------------------------------------------------- /awesome/theming/icons/centerfair.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/centerfair.png -------------------------------------------------------------------------------- /awesome/theming/icons/centerwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/centerwork.png -------------------------------------------------------------------------------- /awesome/theming/icons/centerworkh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/centerworkh.png -------------------------------------------------------------------------------- /awesome/theming/icons/magnifier.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/magnifier.png -------------------------------------------------------------------------------- /awesome/theming/icons/net_updown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/net_updown.png -------------------------------------------------------------------------------- /awesome/theming/icons/net_wired.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/net_wired.png -------------------------------------------------------------------------------- /awesome/theming/icons/square_sel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/square_sel.png -------------------------------------------------------------------------------- /awesome/theming/icons/tilebottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/tilebottom.png -------------------------------------------------------------------------------- /awesome/theming/icons/battery_empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/battery_empty.png -------------------------------------------------------------------------------- /awesome/theming/icons/square_unsel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/square_unsel.png -------------------------------------------------------------------------------- /wayland/hypr/hyprpaper.conf: -------------------------------------------------------------------------------- 1 | preload = ~/Pictures/nvimbg.png 2 | wallpaper = ,~/Pictures/nvimbg.png 3 | splash = false 4 | ipc = on 5 | -------------------------------------------------------------------------------- /awesome/theming/icons/titlebar/close_focus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/titlebar/close_focus.png -------------------------------------------------------------------------------- /awesome/theming/icons/titlebar/close_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/titlebar/close_normal.png -------------------------------------------------------------------------------- /awesome/theming/icons/titlebar/ontop_focus_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/titlebar/ontop_focus_active.png -------------------------------------------------------------------------------- /awesome/theming/icons/titlebar/ontop_normal_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/titlebar/ontop_normal_active.png -------------------------------------------------------------------------------- /awesome/theming/icons/titlebar/sticky_focus_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/titlebar/sticky_focus_active.png -------------------------------------------------------------------------------- /awesome/theming/icons/titlebar/floating_focus_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/titlebar/floating_focus_active.png -------------------------------------------------------------------------------- /awesome/theming/icons/titlebar/floating_normal_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/titlebar/floating_normal_active.png -------------------------------------------------------------------------------- /awesome/theming/icons/titlebar/maximized_focus_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/titlebar/maximized_focus_active.png -------------------------------------------------------------------------------- /awesome/theming/icons/titlebar/ontop_focus_inactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/titlebar/ontop_focus_inactive.png -------------------------------------------------------------------------------- /awesome/theming/icons/titlebar/ontop_normal_inactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/titlebar/ontop_normal_inactive.png -------------------------------------------------------------------------------- /awesome/theming/icons/titlebar/sticky_focus_inactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/titlebar/sticky_focus_inactive.png -------------------------------------------------------------------------------- /awesome/theming/icons/titlebar/sticky_normal_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/titlebar/sticky_normal_active.png -------------------------------------------------------------------------------- /awesome/theming/icons/titlebar/sticky_normal_inactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/titlebar/sticky_normal_inactive.png -------------------------------------------------------------------------------- /awesome/theming/icons/titlebar/floating_focus_inactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/titlebar/floating_focus_inactive.png -------------------------------------------------------------------------------- /awesome/theming/icons/titlebar/floating_normal_inactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/titlebar/floating_normal_inactive.png -------------------------------------------------------------------------------- /awesome/theming/icons/titlebar/maximized_focus_inactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/titlebar/maximized_focus_inactive.png -------------------------------------------------------------------------------- /awesome/theming/icons/titlebar/maximized_normal_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/titlebar/maximized_normal_active.png -------------------------------------------------------------------------------- /awesome/theming/icons/titlebar/maximized_normal_inactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Duckonaut/dotfiles/HEAD/awesome/theming/icons/titlebar/maximized_normal_inactive.png -------------------------------------------------------------------------------- /eww/modules/cpu.yuck: -------------------------------------------------------------------------------- 1 | (include "./modules/base.yuck") 2 | 3 | (defwidget cpu [] 4 | (circle-indicator 5 | :class "cpu" 6 | :icon "" 7 | :value "${round(EWW_CPU["avg"], 0)}")) 8 | -------------------------------------------------------------------------------- /wayland/hypr/hyprlock.conf: -------------------------------------------------------------------------------- 1 | background { 2 | monitor = 3 | path = /home/duckonaut/Pictures/nvimbg.png 4 | } 5 | 6 | input-field { 7 | monitor = 8 | size = 256, 64 9 | } 10 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "awesome/freedesktop"] 2 | path = awesome/freedesktop 3 | url = https://github.com/lcpz/awesome-freedesktop 4 | [submodule "awesome/lain"] 5 | path = awesome/lain 6 | url = https://github.com/lcpz/lain 7 | -------------------------------------------------------------------------------- /eww/modules/memory.yuck: -------------------------------------------------------------------------------- 1 | (include "./modules/base.yuck") 2 | 3 | (defwidget memory [] 4 | (circle-indicator 5 | :class "memory" 6 | :icon "" 7 | :value "${round((EWW_RAM["used_mem"] / 1073741824) / 16 * 100, 0)}")) 8 | -------------------------------------------------------------------------------- /eww/scripts/open.sh: -------------------------------------------------------------------------------- 1 | #!/bin/env bash 2 | 3 | ln -s -f "$HOME/.config/eww/scripts/colors-normal.scss" "$HOME/.config/eww/eww-colors.scss" 4 | 5 | monitor_count=$(hyprctl monitors -j | jq -r 'length') 6 | 7 | eww open bar0 8 | 9 | if [ "$monitor_count" -gt 1 ]; then 10 | eww open bar1 11 | fi 12 | -------------------------------------------------------------------------------- /eww/scripts/openzen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/env bash 2 | 3 | ln -s -f "$HOME/.config/eww/scripts/colors-zen.scss" "$HOME/.config/eww/eww-colors.scss" 4 | 5 | monitor_count=$(hyprctl monitors -j | jq -r 'length') 6 | 7 | eww open bar0 8 | 9 | if [ "$monitor_count" -gt 1 ]; then 10 | eww open bar1 11 | fi 12 | 13 | -------------------------------------------------------------------------------- /wayland/hypr/bluefilter.glsl: -------------------------------------------------------------------------------- 1 | precision mediump float; 2 | varying vec2 v_texcoord; 3 | uniform sampler2D tex; 4 | 5 | void main() { 6 | vec4 pixColor = texture2D(tex, v_texcoord); 7 | 8 | pixColor.b = pixColor.b * 0.4; 9 | pixColor.g = pixColor.g * 0.7; 10 | 11 | gl_FragColor = pixColor; 12 | } 13 | -------------------------------------------------------------------------------- /eww/windows/calendar.yuck: -------------------------------------------------------------------------------- 1 | (defwindow calendar 2 | :monitor 0 3 | :geometry (geometry 4 | :x "0%" 5 | :y "0%" 6 | :anchor "top right" 7 | :width "0px" 8 | :height "0px") 9 | (calendar-win)) 10 | 11 | (defwidget calendar-win [] 12 | (box 13 | :class "calendar-win" 14 | (calendar))) 15 | -------------------------------------------------------------------------------- /wayland/hypr/hyprload.toml: -------------------------------------------------------------------------------- 1 | plugins = [ 2 | { local = "/home/duckonaut/repos/split-monitor-workspaces" } 3 | # "Duckonaut/hyprlens" 4 | # { local = "/home/duckonaut/repos/hyprlens" }, 5 | # { git = "hyprwm/hyprland-plugins", name = "borders-plus-plus", rev = "9851a55ae924b045863d50a5e1720e2bbe4941e6" }, 6 | ] 7 | -------------------------------------------------------------------------------- /eww/scripts/colors-zen.scss: -------------------------------------------------------------------------------- 1 | $blue: #8caaee; 2 | $green: #81c8be; 3 | $lime: #a6d189; 4 | $teal: #56b6c2; 5 | $red: #e78284; 6 | $yellow: #e5c890; 7 | $orange: #ef9f76; 8 | $purple: #ca9ef6; 9 | $silver: #99d1db; 10 | $grey1: #9da5b4; 11 | $bg: #101020; 12 | $fg: #abb2bf; 13 | $circle_fill: rgba(16, 16, 32, 0.4); 14 | $bar_bg: rgba(0, 0, 0, 0); 15 | -------------------------------------------------------------------------------- /eww/scripts/colors-normal.scss: -------------------------------------------------------------------------------- 1 | $blue: #8caaee; 2 | $green: #81c8be; 3 | $lime: #a6d189; 4 | $teal: #56b6c2; 5 | $red: #e78284; 6 | $yellow: #e5c890; 7 | $orange: #ef9f76; 8 | $purple: #ca9ef6; 9 | $silver: #99d1db; 10 | $grey1: #9da5b4; 11 | $bg: #101020; 12 | $fg: #abb2bf; 13 | $circle_fill: rgba(16, 16, 32, 0.4); 14 | $bar_bg: rgba(16, 16, 32, 0.2); 15 | -------------------------------------------------------------------------------- /eww/scripts/temperature.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ $(cat /sys/class/thermal/thermal_zone9/temp) -gt 80000 ]; then 4 | echo "hot" 5 | elif [ $(cat /sys/class/thermal/thermal_zone9/temp) -gt 60000 ]; then 6 | echo "normal" 7 | elif [ $(cat /sys/class/thermal/thermal_zone9/temp) -gt 50000 ]; then 8 | echo "cool" 9 | else 10 | echo "cold" 11 | fi 12 | -------------------------------------------------------------------------------- /eww/modules/temperature.yuck: -------------------------------------------------------------------------------- 1 | (include "./modules/base.yuck") 2 | 3 | (defpoll temperature-class 4 | :interval "10s" 5 | :initial "normal" 6 | `~/.config/eww/scripts/temperature.sh` 7 | ) 8 | 9 | (defwidget temperature [] 10 | (circle-indicator 11 | :class "temperature ${temperature-class}" 12 | :icon "" 13 | :value "${EWW_TEMPS["CORETEMP_PACKAGE_ID_0"]}")) 14 | -------------------------------------------------------------------------------- /.Xresources: -------------------------------------------------------------------------------- 1 | *background: #101020 2 | *foreground: #a3b3d9 3 | *color0: #101020 4 | *color1: #c13251 5 | *color2: #449871 6 | *color3: #d19953 7 | *color4: #395fdd 8 | *color5: #5846b9 9 | *color6: #3898c2 10 | *color7: #a3b3d9 11 | *color8: #767676 12 | *color9: #e06c75 13 | *color10: #98c379 14 | *color11: #e5c07b 15 | *color12: #61afef 16 | *color13: #985fdd 17 | *color14: #56b6c2 18 | *color15: #dcdfe4 19 | 20 | Xft.dpi: 96 21 | -------------------------------------------------------------------------------- /eww/modules/base.yuck: -------------------------------------------------------------------------------- 1 | (defwidget circle-indicator [class value icon] 2 | (circular-progress 3 | :halign "end" 4 | :valign "center" 5 | :class {"circle " + class} 6 | :value value 7 | :thickness 3 8 | :start-at 75 9 | :clockwise false 10 | (box :class "circle-inside" 11 | (label 12 | :class "circle-icon" 13 | :text icon 14 | :xalign 0.5 15 | :yalign 0.5)))) 16 | -------------------------------------------------------------------------------- /eww/modules/power.yuck: -------------------------------------------------------------------------------- 1 | (include "./modules/base.yuck") 2 | 3 | (defpoll power-icon 4 | :interval "60s" 5 | :initial " " 6 | `~/.config/eww/scripts/battery.sh icon` 7 | ) 8 | 9 | (defpoll power-status 10 | :interval "60s" 11 | :initial "discharging" 12 | `~/.config/eww/scripts/battery.sh status` 13 | ) 14 | 15 | (defwidget power [] 16 | (circle-indicator 17 | :class "power ${power-status}" 18 | :value "${EWW_BATTERY["BAT0"].capacity}" 19 | :icon "${power-icon}")) 20 | -------------------------------------------------------------------------------- /eww/scripts/monitor.sh: -------------------------------------------------------------------------------- 1 | #!/bin/env bash 2 | 3 | focusedmon=0 4 | 5 | # Listen for current monitor 6 | socat -u UNIX-CONNECT:"$XDG_RUNTIME_DIR"/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock - | rg --line-buffered "workspace|mon(itor)?" | while read -r line; do 7 | case ${line%>>*} in 8 | "focusedmon") 9 | focusedmon=$(echo "$line" | sed 's/.*>>//' | sed 's/,.*//') 10 | ;; 11 | esac 12 | hyprctl monitors -j | jq -r ".[] | select(.name == \"$focusedmon\") | .id" 13 | done 14 | -------------------------------------------------------------------------------- /eww/eww.yuck: -------------------------------------------------------------------------------- 1 | (include "./modules/time.yuck") 2 | (include "./modules/power.yuck") 3 | (include "./modules/temperature.yuck") 4 | (include "./modules/memory.yuck") 5 | (include "./modules/cpu.yuck") 6 | (include "./modules/volume.yuck") 7 | (include "./modules/music.yuck") 8 | (include "./modules/net.yuck") 9 | (include "./modules/workspaces.yuck") 10 | 11 | (include "./windows/bars.yuck") 12 | (include "./windows/calendar.yuck") 13 | (include "./windows/powermenu.yuck") 14 | 15 | (deflisten current-monitor 16 | :initial "0" 17 | `~/.config/eww/scripts/monitor.sh`) 18 | -------------------------------------------------------------------------------- /setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ln -s -f "$PWD/awesome" "$HOME/.config/awesome" 4 | ln -s -f "$PWD/alacritty" "$HOME/.config/alacritty" 5 | ln -s -f "$PWD/.Xresources" "$HOME/.Xresources" 6 | ln -s -f "$PWD/.tmux.conf" "$HOME/.tmux.conf" 7 | ln -s -f "$PWD/wayland/hypr" "$HOME/.config/hypr" 8 | ln -s -f "$PWD/wayland/wofi" "$HOME/.config/wofi" 9 | ln -s -f "$PWD/wayland/waybar" "$HOME/.config/waybar" 10 | ln -s -f "$PWD/eww" "$HOME/.config/eww" 11 | ln -s -f "$PWD/emacs" "$HOME/.config/emacs" 12 | 13 | # picom does not work with links, awesome launches it with a config from ~/repos/dotfiles/picom/picom.conf instead for now. 14 | -------------------------------------------------------------------------------- /wayland/hypr/scripts/zentoggle.sh: -------------------------------------------------------------------------------- 1 | #!/bin/env sh 2 | 3 | # Toggle zen mode on and off 4 | 5 | # make sure /tmp/zen_enabled exists 6 | if [ ! -f /tmp/zen_enabled ]; then 7 | echo "0" > /tmp/zen_enabled 8 | fi 9 | 10 | ZEN_ENABLED=$(cat /tmp/zen_enabled) 11 | 12 | if [ "$ZEN_ENABLED" = "0" ]; then 13 | echo "1" > /tmp/zen_enabled 14 | hyprctl hyprpaper wallpaper ,~/Pictures/nvimbg.png 15 | eww kill 16 | $HOME/.config/eww/scripts/openzen.sh 17 | notify-send "Zen mode enabled" 18 | else 19 | echo "0" > /tmp/zen_enabled 20 | hyprctl hyprpaper wallpaper ,~/Pictures/campsite.jpg 21 | eww kill 22 | $HOME/.config/eww/scripts/open.sh 23 | notify-send "Zen mode disabled" 24 | fi 25 | -------------------------------------------------------------------------------- /eww/modules/workspaces.yuck: -------------------------------------------------------------------------------- 1 | (deflisten workspace0 :initial "[]" "bash ~/.config/eww/scripts/workspace.sh 0") 2 | (deflisten workspace1 :initial "[]" "bash ~/.config/eww/scripts/workspace.sh 1") 3 | (defwidget workspaces [monitor] 4 | (eventbox 5 | :onscroll "echo {} | sed -e \"s/up/-1/g\" -e \"s/down/+1/g\" | xargs hyprctl dispatch workspace" 6 | (box 7 | :class "module workspaces" 8 | (for ws in {monitor == 0 ? workspace0 : workspace1} 9 | (button 10 | :onclick "hyprctl dispatch workspace ${ws.number}" 11 | :class "ws icon ${ws.status}" 12 | ; :tooltip {ws.tooltip} 13 | "${ws.status == "empty" ? "" : (ws.status == "focused" ? "" : "")}"))))) 14 | -------------------------------------------------------------------------------- /alacritty/alacritty.toml: -------------------------------------------------------------------------------- 1 | [colors.bright] 2 | black = "0x767676" 3 | blue = "0x61afef" 4 | cyan = "0x56b6c2" 5 | green = "0x98c379" 6 | magenta = "0x985fdd" 7 | red = "0xe06c75" 8 | white = "0xdcdfe4" 9 | yellow = "0xe5c07b" 10 | 11 | [colors.normal] 12 | black = "0x101020" 13 | blue = "0x395fdd" 14 | cyan = "0x3898c2" 15 | green = "0x449871" 16 | magenta = "0x5846b9" 17 | red = "0xc13251" 18 | white = "0xa3b3d9" 19 | yellow = "0xd19953" 20 | 21 | [colors.primary] 22 | background = "0x101020" 23 | foreground = "0xa3b3d9" 24 | 25 | [font] 26 | size = 10 27 | 28 | [font.bold] 29 | family = "Hack Nerd Font" 30 | style = "Bold" 31 | 32 | [font.bold_italic] 33 | family = "Hack Nerd Font" 34 | style = "Bold Italic" 35 | 36 | [font.italic] 37 | family = "Hack Nerd Font" 38 | style = "Italic" 39 | 40 | [font.normal] 41 | family = "Hack Nerd Font" 42 | style = "Regular" 43 | 44 | [terminal] 45 | 46 | [terminal.shell] 47 | program = "/bin/zsh" 48 | -------------------------------------------------------------------------------- /alacritty/alacritty-awesome.toml: -------------------------------------------------------------------------------- 1 | [colors.bright] 2 | black = "0x767676" 3 | blue = "0x61afef" 4 | cyan = "0x56b6c2" 5 | green = "0x98c379" 6 | magenta = "0x985fdd" 7 | red = "0xe06c75" 8 | white = "0xdcdfe4" 9 | yellow = "0xe5c07b" 10 | 11 | [colors.normal] 12 | black = "0x101020" 13 | blue = "0x395fdd" 14 | cyan = "0x3898c2" 15 | green = "0x449871" 16 | magenta = "0x5846b9" 17 | red = "0xc13251" 18 | white = "0xa3b3d9" 19 | yellow = "0xd19953" 20 | 21 | [colors.primary] 22 | background = "0x101020" 23 | foreground = "0xa3b3d9" 24 | 25 | [font] 26 | size = 10 27 | 28 | [font.bold] 29 | family = "Hack Nerd Font" 30 | style = "Bold" 31 | 32 | [font.bold_italic] 33 | family = "Hack Nerd Font" 34 | style = "Bold Italic" 35 | 36 | [font.italic] 37 | family = "Hack Nerd Font" 38 | style = "Italic" 39 | 40 | [font.normal] 41 | family = "Hack Nerd Font" 42 | style = "Regular" 43 | 44 | [terminal.shell] 45 | program = "/bin/zsh" 46 | 47 | [window] 48 | opacity = 0.3 49 | -------------------------------------------------------------------------------- /wayland/wofi/style.css: -------------------------------------------------------------------------------- 1 | * { 2 | font-family: "Hack Nerd Font"; 3 | font-size: 14px; 4 | margin: 2px; 5 | } 6 | 7 | window { 8 | padding: 8px; 9 | border: 3px solid #61afef; 10 | border-radius: 8px; 11 | background-color: rgba(16, 16, 32, 0.5); 12 | } 13 | 14 | #input { 15 | border: 2px solid #98c379; 16 | background-color: rgba(16, 16, 32, 0.5); 17 | } 18 | 19 | #inner-box { 20 | margin: 2px; 21 | } 22 | 23 | #outer-box { 24 | margin: 2px; 25 | padding: 4px; 26 | } 27 | 28 | #scroll { 29 | margin: 0px -6px 0px -6px; 30 | } 31 | 32 | #entry { 33 | border-radius: 4px; 34 | margin: 2px; 35 | padding: 4px; 36 | border: 2px solid #4040a9; 37 | background-color: rgba(16, 16, 32, 0.5); 38 | } 39 | 40 | #entry:selected { 41 | border: 2px solid #61afef; 42 | background-color: #61afef; 43 | } 44 | 45 | #text { 46 | margin: 0px; 47 | color: #fefefe; 48 | } 49 | 50 | #text:selected { 51 | margin: 0px; 52 | color: #101020; 53 | } 54 | -------------------------------------------------------------------------------- /alacritty/darkline.yml: -------------------------------------------------------------------------------- 1 | colors: 2 | # Default colors 3 | primary: 4 | background: '0x101020' 5 | foreground: '0xa3b3d9' 6 | # Normal colors 7 | normal: 8 | black: '0x101020' 9 | red: '0xc13251' 10 | green: '0x449871' 11 | yellow: '0xd19953' 12 | blue: '0x395fdd' 13 | magenta: '0x5846b9' 14 | cyan: '0x3898c2' 15 | white: '0xa3b3d9' 16 | # Bright colors 17 | bright: 18 | black: '0x767676' 19 | red: '0xe06c75' 20 | green: '0x98c379' 21 | yellow: '0xe5c07b' 22 | blue: '0x61afef' 23 | magenta: '0x985fdd' 24 | cyan: '0x56b6c2' 25 | white: '0xdcdfe4' 26 | 27 | font: 28 | normal: 29 | family: Hack 30 | style: Regular 31 | 32 | bold: 33 | family: Hack 34 | style: Bold 35 | 36 | italic: 37 | family: Hack 38 | style: Italic 39 | 40 | bold_italic: 41 | family: Hack 42 | style: Bold Italic 43 | 44 | size: 6.8 45 | 46 | 47 | shell: 48 | program: /bin/zsh 49 | 50 | window: 51 | opacity: 0.9 52 | -------------------------------------------------------------------------------- /eww/modules/time.yuck: -------------------------------------------------------------------------------- 1 | (defvar clock-expanded false) 2 | 3 | (defpoll time 4 | :interval "60s" 5 | :initial "00\n00" 6 | `date +"%H:%M"`) 7 | 8 | (defpoll date 9 | :interval "120s" 10 | :initial "1 Jan 1970" 11 | :run-while clock-expanded 12 | `date +"| %b %d %Y"`) 13 | 14 | (defvar calendar-open false) 15 | 16 | (defwidget clock [] 17 | (eventbox 18 | :onclick {calendar-open ? "eww update calendar-open=false && eww close calendar" : "eww update calendar-open=true && eww open calendar --screen ${current-monitor}"} 19 | :onhover 20 | "eww update clock-expanded=true" 21 | :onhoverlost 22 | "eww update clock-expanded=false" 23 | (box 24 | :class "clock ${clock-expanded ? 'expanded' : ''}" 25 | :orientation "horizontal" 26 | :halign "end" 27 | :valign "center" 28 | :space-evenly false 29 | (label :class "time-text" :text time :xalign 0.5 :yalign 0.5) 30 | (revealer 31 | :reveal clock-expanded 32 | :transition "slideright" 33 | (box 34 | :class "clock-expanded" 35 | (label :class "date-text" :text date :xalign 0.5 :yalign 0.5)))))) 36 | -------------------------------------------------------------------------------- /alacritty/onedarkish.yml: -------------------------------------------------------------------------------- 1 | colors: 2 | # Default colors 3 | primary: 4 | background: '0x1e232a' 5 | foreground: '0xabb2bf' 6 | # Colors the cursor will use if `custom_cursor_colors` is true 7 | cursor: 8 | text: '0x1e232a' 9 | cursor: '0xfbfcfc' 10 | # Normal colors 11 | normal: 12 | black: '0x171b21' 13 | red: '0xe06c75' 14 | green: '0x449871' 15 | yellow: '0xe6a454' 16 | blue: '0x395fdc' 17 | magenta: '0x5846b9' 18 | cyan: '0x3ab6d4' 19 | white: '0xabb2bf' 20 | # Bright colors 21 | bright: 22 | black: '0x2a2f3e' 23 | red: '0xe06c75' 24 | green: '0x68c379' 25 | yellow: '0xe5c07b' 26 | blue: '0x61afef' 27 | magenta: '0x906cff' 28 | cyan: '0x63dfdf' 29 | white: '0xdcdcdc' 30 | 31 | font: 32 | normal: 33 | family: Hack Nerd Font 34 | style: Regular 35 | 36 | bold: 37 | family: Hack Nerd Font 38 | style: Bold 39 | 40 | italic: 41 | family: Hack Nerd Font 42 | style: Italic 43 | 44 | bold_italic: 45 | family: Hack Nerd Font 46 | style: Bold Italic 47 | 48 | size: 9 49 | 50 | window.opacity: 1.0 51 | -------------------------------------------------------------------------------- /eww/modules/volume.yuck: -------------------------------------------------------------------------------- 1 | (include "./modules/base.yuck") 2 | 3 | (defpoll pulseaudio-volume 4 | :interval "5s" 5 | :initial "0" 6 | `pactl get-sink-volume @DEFAULT_SINK@ | awk '{print $5}' | tr -d '%'`) 7 | 8 | (defvar volume-expanded false) 9 | 10 | (defwidget volume [] 11 | (eventbox 12 | :onhover 13 | "eww update volume-expanded=true" 14 | :onhoverlost 15 | "eww update volume-expanded=false" 16 | (box 17 | :orientation "horizontal" 18 | :space-evenly false 19 | :halign "end" 20 | :valign "center" 21 | :hexpand true 22 | (circle-indicator 23 | :class "volume" 24 | :icon "" 25 | :value "${pulseaudio-volume}") 26 | (revealer 27 | :reveal volume-expanded 28 | :transition "slideright" 29 | (scale 30 | :class "volume" 31 | :value pulseaudio-volume 32 | :marks "0,20,40,60,80,100" 33 | :min 0.0 34 | :max 100.0 35 | :timeout "100ms" 36 | :onchange "pactl set-sink-volume @DEFAULT_SINK@ {}% && eww update pulseaudio-volume={}" 37 | :orientation "horizontal" 38 | ) 39 | ) 40 | ))) 41 | -------------------------------------------------------------------------------- /tofi/config: -------------------------------------------------------------------------------- 1 | # Font 2 | font = Hack Nerd Font 3 | font-size = 13 4 | 5 | # Window Style 6 | horizontal = true 7 | anchor = bottom 8 | width = 1900 9 | height = 40 10 | margin-bottom = 8 11 | 12 | outline-width = 1 13 | outline-color = #61afef 14 | border-width = 0 15 | corner-radius = 12 16 | min-input-width = 120 17 | result-spacing = 24 18 | padding-top = 4 19 | padding-bottom = 4 20 | padding-left = 8 21 | padding-right = 0 22 | 23 | # Text style 24 | prompt-text = "run: " 25 | prompt-padding = 20 26 | 27 | background-color = #10102080 28 | text-color = #101020 29 | 30 | prompt-background = #61afef 31 | prompt-background-padding = 4, 10 32 | prompt-background-corner-radius = 8 33 | 34 | # input-color = # 35 | input-background = #e5c07b 36 | input-background-padding = 4, 10 37 | input-background-corner-radius = 12 38 | 39 | default-result-background = #98c379 40 | default-result-background-padding = 4, 10 41 | default-result-background-corner-radius = 8 42 | 43 | selection-color = #f0d2af 44 | selection-background = #da5d64 45 | selection-background-padding = 4, 10 46 | selection-background-corner-radius = 8 47 | selection-match-color = #fff 48 | 49 | clip-to-padding = false 50 | exclusive-zone = 40 51 | 52 | -------------------------------------------------------------------------------- /eww/scripts/net.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Icon based on network status 4 | icon() { 5 | if [ "$(cat /sys/class/net/enp7s0/operstate)" = "up" ]; then 6 | echo "" 7 | elif [ "$(cat /sys/class/net/wlan0/operstate)" = "up" ]; then 8 | echo "" 9 | else 10 | echo "睊" 11 | fi 12 | } 13 | 14 | kind() { 15 | if [ "$(cat /sys/class/net/enp7s0/operstate)" = "up" ]; then 16 | echo "ether" 17 | elif [ "$(cat /sys/class/net/wlan0/operstate)" = "up" ]; then 18 | echo "wifi" 19 | else 20 | echo "none" 21 | fi 22 | } 23 | 24 | status() { 25 | if [ "$(cat /sys/class/net/enp7s0/operstate)" = "up" ]; then 26 | ip addr show enp7s0 | grep -Po 'inet \K[\d.]+' 27 | elif [ "$(cat /sys/class/net/wlan0/operstate)" = "up" ]; then 28 | # SSID and signal strength percentage 29 | echo "$(iwgetid -r)" 30 | else 31 | echo "disconnected" 32 | fi 33 | } 34 | 35 | case "$1" in 36 | icon) 37 | echo "$(icon)" 38 | ;; 39 | status) 40 | echo "$(status)" 41 | ;; 42 | kind) 43 | echo "$(kind)" 44 | ;; 45 | *) 46 | echo "Usage: $0 {icon|status|kind}" 47 | exit 2 48 | esac 49 | -------------------------------------------------------------------------------- /eww/modules/net.yuck: -------------------------------------------------------------------------------- 1 | (defpoll net-icon 2 | :interval "60s" 3 | :initial "睊 " 4 | `~/.config/eww/scripts/net.sh icon` 5 | ) 6 | 7 | (defpoll net-status 8 | :interval "60s" 9 | :initial "disconnected" 10 | `~/.config/eww/scripts/net.sh status` 11 | ) 12 | 13 | (defpoll net-kind 14 | :interval "60s" 15 | :initial "none" 16 | `~/.config/eww/scripts/net.sh kind` 17 | ) 18 | 19 | (defvar net-expanded false) 20 | 21 | (defwidget net [] 22 | (eventbox 23 | :onhover 24 | "eww update net-expanded=true" 25 | :onhoverlost 26 | "eww update net-expanded=false" 27 | (box 28 | :class "net ${net-status} ${net-expanded ? 'expanded' : ''}" 29 | :orientation "horizontal" 30 | :halign "end" 31 | :valign "center" 32 | :hexpand true 33 | :space-evenly false 34 | (label 35 | :hexpand true 36 | :class "net-icon net-icon-${net-kind}" 37 | :text "${net-icon}" 38 | :xalign 0.5 39 | :yalign 0.5) 40 | (revealer 41 | :reveal "${net-expanded}" 42 | :transition "slideright" 43 | (label 44 | :class "net-status" 45 | :text "${net-status}" 46 | :xalign 0.5 47 | :yalign 0.5))))) 48 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Dotfiles 2 | These are my assorted config files for my Linux utils. My Neovim config is in another repository as it is a largely separate project, check it out [here](https://github.com/duckonaut/nvim). 3 | 4 | ## Screenshots 5 | ![wayland desktop](wayland-screenshot.png) 6 | ![xorg desktop](xorg-screenshot.png) 7 | 8 | # Wayland Config 9 | ## Hyprland 10 | Recreated (and somewhat improved) my Awesome config in Hyprland from scratch. The bindings and workspace rules live there. 11 | 12 | ## Waybar 13 | Since Awesome had its own bar, I used it there. Created a similar configuration using `waybar`, including the media player widget 14 | 15 | ## Wofi 16 | Only styling to fit in with the rest of the desktop 17 | 18 | # Xorg Config 19 | ## Awesome 20 | Based off of [awesome-copycats](https://github.com/lcpz/awesome-copycats) for the structure, it has now grown to something quite different and customized. Still uses some of those components. Also [multiplayerctl](hittps://github.com/duckonaut/multiplayerctl) to media keys. 21 | 22 | ## Picom 23 | Pairs with the Awesome theme to achieve the blur and shadows 24 | 25 | # Alacritty 26 | Uses a custom colorscheme. Two files are provided, alacritty-awesome.yml differs from alacritty.yml by using transparency 27 | -------------------------------------------------------------------------------- /eww/scripts/music.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | title() { 4 | if [ "$(/home/duckonaut/.cargo/bin/multiplayerctl status)" = "Playing" ]; then 5 | echo "$(/home/duckonaut/.cargo/bin/multiplayerctl metadata --format "{{title}} - {{artist}}")" 6 | elif [ "$(/home/duckonaut/.cargo/bin/multiplayerctl status)" = "Paused" ]; then 7 | echo "$(/home/duckonaut/.cargo/bin/multiplayerctl metadata --format "{{title}} - {{artist}}")" 8 | else 9 | echo "Nothing playing" 10 | fi 11 | } 12 | 13 | titlefollow() { 14 | /home/duckonaut/.cargo/bin/multiplayerctl metadata --format '{{title}} - {{artist}}' --follow | sed --unbuffered 's/^$/Nothing playing/g' 15 | } 16 | 17 | icon() { 18 | if [ "$(/home/duckonaut/.cargo/bin/multiplayerctl status)" = "Playing" ]; then 19 | echo "" 20 | elif [ "$(/home/duckonaut/.cargo/bin/multiplayerctl status)" = "Paused" ]; then 21 | echo "" 22 | else 23 | echo "󰝛" 24 | fi 25 | } 26 | 27 | case "$1" in 28 | icon) 29 | echo "$(icon)" 30 | ;; 31 | title) 32 | echo "$(title)" 33 | ;; 34 | titlefollow) 35 | titlefollow 36 | ;; 37 | *) 38 | echo "Usage: $0 {icon|title|titlefollow}" 39 | exit 2 40 | esac 41 | -------------------------------------------------------------------------------- /eww/windows/bars.yuck: -------------------------------------------------------------------------------- 1 | (defwindow bar0 2 | :monitor 0 3 | :geometry (geometry :x "0%" 4 | :y "10px" 5 | :width "1900" 6 | :height "36px" 7 | :anchor "top center") 8 | :stacking "bottom" 9 | :exclusive true 10 | (bar-widget :monitor 0)) 11 | 12 | (defwindow bar1 13 | :monitor 1 14 | :geometry (geometry :x "0%" 15 | :y "10px" 16 | :width "1900" 17 | :height "36px" 18 | :anchor "top center") 19 | :stacking "bottom" 20 | :exclusive true 21 | (bar-widget :monitor 1)) 22 | 23 | (defwidget bar-widget [monitor] 24 | (centerbox 25 | :class "bar" 26 | :orientation "horizontal" 27 | :halign "fill" 28 | :valign "fill" 29 | (box 30 | :class "left" 31 | :halign "start" 32 | :space-evenly false 33 | (net) 34 | (music) 35 | ) 36 | (box 37 | :class "center" 38 | :halign "center" 39 | (workspaces :monitor monitor) 40 | ) 41 | (box 42 | :class "right" 43 | :halign "end" 44 | :space-evenly false 45 | (volume) 46 | (cpu) 47 | (memory) 48 | (temperature) 49 | (power) 50 | (clock) 51 | ) 52 | )) 53 | -------------------------------------------------------------------------------- /.tmux.conf: -------------------------------------------------------------------------------- 1 | # Fixes for zsh with powerlevel10k appearing odd. 2 | set -g default-terminal "tmux-256color" 3 | set -as terminal-overrides ",xterm*:Tc:RGB" 4 | 5 | set -q -g status-utf8 on 6 | setw -q -g utf8 on 7 | 8 | # keybinds 9 | bind | split-window -h -c "#{pane_current_path}" 10 | bind - split-window -v -c "#{pane_current_path}" 11 | 12 | set -g mouse on 13 | 14 | set-option -g default-shell /bin/zsh 15 | 16 | # theme 17 | 18 | # status 19 | set-option -g status-style fg=white,bg=black 20 | 21 | # default window title colors 22 | set-window-option -g window-status-style fg=brightblue,bg=default 23 | 24 | # active window title colors 25 | set-window-option -g window-status-current-style fg=brightred,bg=default 26 | 27 | # pane border 28 | set-option -g pane-border-style fg=blue 29 | set-option -g pane-active-border-style fg=brightblue 30 | 31 | # message text 32 | set-option -g message-style fg=brightred,bg=black 33 | 34 | # pane number display 35 | set-option -g display-panes-active-colour blue 36 | set-option -g display-panes-colour brightred 37 | 38 | set-option -g status-right "#[fg=brightmagenta]#{=21:pane_title}#[fg=brightgreen] %H:%M %d-%b-%y" 39 | 40 | # clock 41 | set-window-option -g clock-mode-colour green 42 | 43 | # bell 44 | set-window-option -g window-status-bell-style fg=black,bg=red 45 | -------------------------------------------------------------------------------- /emacs/init.el: -------------------------------------------------------------------------------- 1 | ;; -*- coding: utf-8; lexical-binding: t -*- 2 | (setq inhibit-startup-message t) 3 | (setq gc-cons-threshold 100000000) 4 | 5 | ;; Package management setup 6 | 7 | (require 'package) 8 | (add-to-list 'package-archives '("gnu" . "https://elpa.gnu.org/packages/")) 9 | (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")) 10 | (package-initialize) 11 | 12 | (unless (package-installed-p 'use-package) 13 | (package-refresh-contents) 14 | (package-install 'use-package)) 15 | (eval-and-compile 16 | (setq use-package-always-ensure t 17 | use-package-expand-minimally t)) 18 | 19 | (ignore-errors (set-frame-font "Hack Nerd Font-11")) 20 | 21 | (defconst duck:configpath "~/.config/emacs/") 22 | 23 | (defun duck:load-config-file (file) 24 | (load (expand-file-name (concat duck:configpath file)))) 25 | 26 | (defun duck:load-config-files (filelist) 27 | (dolist (file filelist) (duck:load-config-file file))) 28 | 29 | (duck:load-config-files '("ux" "packages" "mappings")) 30 | 31 | (add-to-list 'load-path "/home/duckonaut/studia/INZ/jiroscope/target/release") 32 | (require 'jiroscope) 33 | 34 | (defun benchmark-request-el-jiroscope (url) 35 | (dotimes (i 100) 36 | (request-response-data 37 | (request url 38 | :parser 'json-read 39 | :sync t)))) 40 | -------------------------------------------------------------------------------- /colorschemes/darkline.colorscheme: -------------------------------------------------------------------------------- 1 | [Background] 2 | Color=16,16,32 3 | 4 | [BackgroundFaint] 5 | Color=16,16,32 6 | 7 | [BackgroundIntense] 8 | Color=16,16,32 9 | 10 | [Color0] 11 | Color=16,16,32 12 | 13 | [Color0Faint] 14 | Color=16,16,32 15 | 16 | [Color0Intense] 17 | Color=50,58,99 18 | 19 | [Color1] 20 | Color=224,108,117 21 | 22 | [Color1Faint] 23 | Color=224,108,117 24 | 25 | [Color1Intense] 26 | Color=193,50,81 27 | 28 | [Color2] 29 | Color=152,195,121 30 | 31 | [Color2Faint] 32 | Color=152,195,121 33 | 34 | [Color2Intense] 35 | Color=68,152,113 36 | 37 | [Color3] 38 | Color=229,192,123 39 | 40 | [Color3Faint] 41 | Color=229,192,123 42 | 43 | [Color3Intense] 44 | Color=209,153,84 45 | 46 | [Color4] 47 | Color=97,175,239 48 | 49 | [Color4Faint] 50 | Color=97,175,239 51 | 52 | [Color4Intense] 53 | Color=57,95,220 54 | 55 | [Color5] 56 | Color=152,95,221 57 | 58 | [Color5Faint] 59 | Color=152,95,221 60 | 61 | [Color5Intense] 62 | Color=88,70,185 63 | 64 | [Color6] 65 | Color=86,182,194 66 | 67 | [Color6Faint] 68 | Color=86,182,194 69 | 70 | [Color6Intense] 71 | Color=56,152,194 72 | 73 | [Color7] 74 | Color=220,223,228 75 | 76 | [Color7Faint] 77 | Color=220,223,228 78 | 79 | [Color7Intense] 80 | Color=163,179,217 81 | 82 | [Foreground] 83 | Color=171,178,191 84 | 85 | [ForegroundFaint] 86 | Color=92,99,112 87 | 88 | [ForegroundIntense] 89 | Color=130,137,151 90 | 91 | [General] 92 | Blur=true 93 | ColorRandomization=false 94 | Description=darkline 95 | Opacity=0.75 96 | Wallpaper= 97 | -------------------------------------------------------------------------------- /swaync/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "/etc/xdg/swaync/configSchema.json", 3 | "positionX": "center", 4 | "positionY": "top", 5 | "control-center-margin-top": 80, 6 | "control-center-margin-bottom": 80, 7 | "control-center-margin-right": 0, 8 | "control-center-margin-left": 0, 9 | "notification-icon-size": 64, 10 | "notification-body-image-height": 100, 11 | "notification-body-image-width": 200, 12 | "timeout": 10, 13 | "timeout-low": 5, 14 | "timeout-critical": 0, 15 | "fit-to-screen": true, 16 | "control-center-width": 500, 17 | "control-center-height": 600, 18 | "notification-window-width": 500, 19 | "keyboard-shortcuts": true, 20 | "image-visibility": "when-available", 21 | "transition-time": 4, 22 | "hide-on-clear": false, 23 | "hide-on-action": true, 24 | "script-fail-notify": true, 25 | "notification-visibility": { 26 | "example-name": { 27 | "state": "muted", 28 | "urgency": "Low", 29 | "app-name": "Spotify" 30 | } 31 | }, 32 | "widgets": [ 33 | "title", 34 | "dnd", 35 | "notifications", 36 | "mpris" 37 | ], 38 | "widget-config": { 39 | "title": { 40 | "text": "Notifications", 41 | "clear-all-button": true, 42 | "button-text": "Clear All" 43 | }, 44 | "dnd": { 45 | "text": "Do Not Disturb" 46 | }, 47 | "label": { 48 | "max-lines": 5, 49 | "text": "Label Text" 50 | }, 51 | "mpris": { 52 | "image-size": 96, 53 | "image-radius": 12 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /eww/scripts/battery.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | icon() { 4 | if [ "$(cat /sys/class/power_supply/BAT0/status)" = "Charging" ]; then 5 | echo "" 6 | elif [ "$(cat /sys/class/power_supply/BAT0/status)" = "Not charging" ]; then 7 | echo "" 8 | elif [ $(cat /sys/class/power_supply/BAT0/capacity) -gt 90 ]; then 9 | echo "" 10 | elif [ $(cat /sys/class/power_supply/BAT0/capacity) -gt 80 ]; then 11 | echo "" 12 | elif [ $(cat /sys/class/power_supply/BAT0/capacity) -gt 60 ]; then 13 | echo "" 14 | elif [ $(cat /sys/class/power_supply/BAT0/capacity) -gt 40 ]; then 15 | echo "" 16 | elif [ $(cat /sys/class/power_supply/BAT0/capacity) -gt 20 ]; then 17 | echo "" 18 | else 19 | echo "" 20 | fi 21 | } 22 | 23 | info() { 24 | if [ "$(cat /sys/class/power_supply/BAT0/status)" = "Charging" ]; then 25 | echo "charging" 26 | elif [ "$(cat /sys/class/power_supply/BAT0/status)" = "Not charging" ]; then 27 | echo "plugged" 28 | elif [ "$(cat /sys/class/power_supply/BAT0/status)" = "Discharging" ]; then 29 | echo "discharging" 30 | elif [ $(cat /sys/class/power_supply/BAT0/capacity) -gt 90 ]; then 31 | echo "full" 32 | elif [ $(cat /sys/class/power_supply/BAT0/capacity) -gt 25 ]; then 33 | echo "discharging" 34 | else 35 | echo "critical" 36 | fi 37 | } 38 | 39 | case "$1" in 40 | icon) 41 | echo "$(icon)" 42 | ;; 43 | status) 44 | echo "$(info)" 45 | ;; 46 | *) 47 | echo "Usage: $0 {icon|status}" 48 | exit 2 49 | esac 50 | -------------------------------------------------------------------------------- /eww/windows/powermenu.yuck: -------------------------------------------------------------------------------- 1 | (defwindow powermenu 2 | :geometry 3 | (geometry 4 | :x "0%" 5 | :y "0%" 6 | :width "0px" 7 | :height "0px" 8 | :anchor "center") 9 | :stacking "overlay" 10 | :namespace "powermenu" 11 | (powermenu-widget)) 12 | 13 | (defwidget powermenu-widget [] 14 | (box 15 | :class "powermenu" 16 | :space-evenly true 17 | :height 40 18 | :active true 19 | (poweroff-widget) 20 | (reboot-widget) 21 | (suspend-widget) 22 | (logout-widget) 23 | (lock-widget))) 24 | 25 | (defwidget poweroff-widget [] 26 | (eventbox 27 | :class "powermenu-eb" 28 | :onclick "poweroff" 29 | (box 30 | :class "poweroff powermenu-widget" 31 | (label 32 | :class "poweroff-icon powermenu-icon" 33 | :text "")))) 34 | 35 | (defwidget reboot-widget [] 36 | (eventbox 37 | :class "powermenu-eb" 38 | :onclick "reboot" 39 | (box 40 | :class "reboot powermenu-widget" 41 | (label 42 | :class "reboot-icon powermenu-icon" 43 | :text "")))) 44 | 45 | (defwidget suspend-widget [] 46 | (eventbox 47 | :class "powermenu-eb" 48 | :onclick "systemctl suspend" 49 | (box 50 | :class "suspend powermenu-widget" 51 | (label 52 | :class "suspend-icon powermenu-icon" 53 | :text "󰒲")))) 54 | 55 | (defwidget logout-widget [] 56 | (eventbox 57 | :class "powermenu-eb" 58 | :onclick "hyprctl dispatch exit" 59 | (box 60 | :class "logout powermenu-widget" 61 | (label 62 | :class "logout-icon powermenu-icon" 63 | :text "󰗽")))) 64 | 65 | (defwidget lock-widget [] 66 | (eventbox 67 | :class "powermenu-eb" 68 | :onclick "swaylock" 69 | (box 70 | :class "lock powermenu-widget" 71 | (label 72 | :class "lock-icon powermenu-icon" 73 | :text "")))) 74 | 75 | -------------------------------------------------------------------------------- /eww/modules/music.yuck: -------------------------------------------------------------------------------- 1 | (defpoll music-icon 2 | :interval "5s" 3 | `~/.config/eww/scripts/music.sh icon` 4 | ) 5 | 6 | (deflisten music-title 7 | "bash ~/.config/eww/scripts/music.sh titlefollow" 8 | ) 9 | 10 | (defvar music-expanded false) 11 | 12 | (defwidget music [] 13 | (eventbox 14 | :onclick 15 | "/home/duckonaut/.cargo/bin/multiplayerctl toggle; eww update music-icon=$(~/.config/eww/scripts/music.sh icon) ; eww update music-title=\"$(~/.config/eww/scripts/music.sh title)\"" 16 | :onrightclick "/home/duckonaut/.cargo/bin/multiplayerctl switch; eww update music-icon=$(~/.config/eww/scripts/music.sh icon); eww update music-title=\"$(~/.config/eww/scripts/music.sh title)\"" 17 | :onscroll "/home/duckonaut/.cargo/bin/multiplayerctl $(if [ {} = up ]; then echo next; else echo previous; fi) && eww update music-icon=$(~/.config/eww/scripts/music.sh icon)" 18 | :onhover 19 | "eww update music-expanded=true" 20 | :onhoverlost 21 | "eww update music-expanded=false" 22 | :onmiddleclick 23 | "hyprctl dispatch focuswindow title:$(hyprctl clients -j | jq -r '.[] | .title | match(\"(?i)'$(/home/duckonaut/.cargo/bin/multiplayerctl player)'$\") .string')" 24 | (box 25 | :class "music ${music-icon == '' ? 'none' : 'some'} ${music-expanded ? 'expanded' : ''}" 26 | :orientation "horizontal" 27 | :space-evenly false 28 | :halign "end" 29 | :valign "center" 30 | :hexpand true 31 | (label 32 | :hexpand true 33 | :class "music-icon" 34 | :text "${music-icon}" 35 | :xalign 0.5 36 | :yalign 0.5) 37 | (revealer 38 | :reveal "${music-expanded}" 39 | :transition "slideright" 40 | (label 41 | :class "music-title" 42 | :text music-title 43 | :xalign 0.5 44 | :yalign 0.5))))) 45 | -------------------------------------------------------------------------------- /emacs/ux.el: -------------------------------------------------------------------------------- 1 | ;; UX and builtin feature adjustments 2 | 3 | (setq 4 | inhibit-startup-screen t 5 | initial-scratch-message nil 6 | sentence-end-double-space nil 7 | ring-bell-function 'ignore 8 | save-interprogram-paste-before-kill t 9 | use-dialog-box nil 10 | mark-even-if-inactive nil 11 | kill-whole-line t 12 | case-fold-search nil 13 | compilation-read-command nil 14 | compilation-scroll-output 'first-error 15 | use-short-answers t 16 | default-directory "~" 17 | fast-but-imprecise-scrolling t 18 | load-prefer-newer t 19 | confirm-kill-processes nil 20 | native-comp-async-report-warnings-errors 'silent 21 | truncate-string-ellipsis "…" 22 | ) 23 | 24 | (setq-default tab-width 4) 25 | (setq-default indent-tabs-mode nil) 26 | (setq indent-line-function 'tab-insert) 27 | (setq-default basic-offset 4) 28 | (setq 29 | make-backup-files nil 30 | auto-save-default nil 31 | create-lockfiles nil) 32 | (setq custom-file (make-temp-name "/tmp/")) 33 | (setq custom-safe-themes t) 34 | (setq 35 | scroll-conservatively 1000 ;; only 'jump' when moving this far 36 | scroll-margin 4 ;; scroll N lines to screen edge 37 | scroll-step 1 ;; keyboard scroll one line at a time 38 | mouse-wheel-scroll-amount '(6 ((shift) . 1)) ;; mouse scroll N lines 39 | mouse-wheel-progressive-speed nil ;; don't accelerate scrolling 40 | 41 | redisplay-dont-pause t ;; don't pause display on input 42 | 43 | ;; Always redraw immediately when scrolling, 44 | ;; more responsive and doesn't hang! 45 | fast-but-imprecise-scrolling nil 46 | jit-lock-defer-time 0 47 | ) 48 | 49 | (set-charset-priority 'unicode) 50 | (prefer-coding-system 'utf-8-unix) 51 | 52 | 53 | (blink-cursor-mode -1) 54 | (menu-bar-mode 1) 55 | (tool-bar-mode -1) 56 | (scroll-bar-mode -1) 57 | 58 | (global-display-line-numbers-mode 1) 59 | (delete-selection-mode t) 60 | (column-number-mode) 61 | (global-whitespace-mode) 62 | 63 | (setq whitespace-style '(face tabs spaces trailing space-before-tab empty space-after-tab space-mark tab-mark missing-newline-at-eof)) 64 | 65 | (add-hook 'before-save-hook #'delete-trailing-whitespace) 66 | (setq require-final-newline t) 67 | (defalias 'view-emacs-news 'ignore) 68 | (defalias 'describe-gnu-project 'ignore) 69 | -------------------------------------------------------------------------------- /eww/scripts/workspace.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Proudly ripped off from https://github.com/fufexan/dotfiles 3 | 4 | if [ -z "$1" ]; then 5 | monitor_index="0" 6 | else 7 | monitor_index="$1" 8 | fi 9 | 10 | # get initial focused workspace 11 | focusedws=$(hyprctl -j monitors | jq -r '.[] | select(.focused == true) | .activeWorkspace.id') 12 | 13 | declare -A o=([1]=0 [2]=0 [3]=0 [4]=0 [5]=0 [6]=0 [7]=0 [8]=0 [9]=0 [10]=0 [11]=0 [12]=0 [13]=0 [14]=0 [15]=0 [16]=0 [17]=0 [18]=0 [19]=0 [20]=0) 14 | declare -A monitormap 15 | declare -A workspaces 16 | 17 | # set color for each workspace 18 | status() { 19 | if [ "${o[$1]}" -eq 1 ]; then 20 | if [ "$focusedws" -eq "$1" ]; then 21 | echo -n "focused" 22 | else 23 | echo -n "active" 24 | fi 25 | else 26 | echo -n "empty" 27 | fi 28 | } 29 | 30 | # handle workspace create/destroy 31 | workspace_event() { 32 | o[$1]=$2 33 | while read -r k v; do workspaces[$k]="$v"; done < <(hyprctl -j workspaces | jq -r '.[]|"\(.id) \(.monitor)"') 34 | } 35 | # refresh workspaces 36 | refresh_workspaces() { 37 | while read -r k v; do o[$k]=1; done < <(hyprctl -j workspaces | jq -r '.[] | select(.windows > 0) | .id') 38 | while read -r k v; do o[$k]=0; done < <(hyprctl -j workspaces | jq -r '.[] | select(.windows == 0) | .id') 39 | o[$focusedws]=1 40 | } 41 | # handle monitor (dis)connects 42 | monitor_event() { 43 | while read -r k v; do monitormap["$k"]=$v; done < <(hyprctl -j monitors | jq -r '.[]|"\(.name) \(.id) "') 44 | } 45 | 46 | # get all apps titles in a workspace 47 | applist() { 48 | ws="$1" 49 | 50 | apps=$(hyprctl -j clients | jaq -jr '.[] | select(.workspace.id == '"$ws"') | .title + "\\n"') 51 | echo -En "${apps%"\n"}" 52 | } 53 | 54 | # generate the json for eww 55 | generate() { 56 | echo -n '[' 57 | 58 | start=$((monitor_index * 10 + 1)) 59 | end=$((start + 9)) 60 | 61 | for i in $(seq "$start" "$end"); do 62 | echo -n ''"$([ "$i" -eq "$start" ] || echo ,)" '{ "number": "'"$i"'", "status": "'"$(status "$i")"'" }' 63 | done 64 | 65 | echo ']' 66 | } 67 | 68 | # setup 69 | 70 | # add monitors 71 | monitor_event 72 | 73 | # add workspaces 74 | while read -r k v; do workspaces[$k]="$v"; done < <(hyprctl -j workspaces | jq -r '.[]|"\(.id) \(.monitor)"') 75 | 76 | # check occupied workspaces 77 | while read -r k v; do o[$k]=1; done < <(hyprctl -j workspaces | jq -r '.[] | select(.windows > 0) | .id') 78 | 79 | 80 | o[$focusedws]=1 81 | 82 | # generate initial widget 83 | generate 84 | 85 | # main loop 86 | socat -u UNIX-CONNECT:"$XDG_RUNTIME_DIR"/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock - | rg --line-buffered "workspace|mon(itor)?" | while read -r line; do 87 | case ${line%>>*} in 88 | "workspace") 89 | focusedws=${line#*>>} 90 | ;; 91 | "focusedmon") 92 | focusedws=${line#*,} 93 | ;; 94 | "createworkspace") 95 | workspace_event "${line#*>>}" 1 96 | ;; 97 | "destroyworkspace") 98 | workspace_event "${line#*>>}" 0 99 | ;; 100 | "monitor"*) 101 | monitor_event 102 | ;; 103 | esac 104 | refresh_workspaces 105 | generate 106 | done 107 | -------------------------------------------------------------------------------- /emacs/mappings.el: -------------------------------------------------------------------------------- 1 | ;; Mappings 2 | 3 | (-map (lambda (x) (unbind-key x)) '("C-x C-f" ;; find-file-read-only 4 | "C-x C-d" ;; list-directory 5 | "C-z" ;; suspend-frame 6 | "C-x C-z" ;; again 7 | "M-o" ;; facemenu-mode 8 | "" ;; pasting with mouse-wheel click 9 | "" ;; text scale adjust 10 | "" ;; ditto 11 | "s-n" ;; make-frame 12 | "C-x C-q" ;; read-only-mode 13 | )) 14 | 15 | (defun pt/yank () 16 | "Call yank, then indent the pasted region, as TextMate does." 17 | (interactive) 18 | (let ((point-before (point))) 19 | (if mark-active (call-interactively 'delete-backward-char)) 20 | (yank) 21 | (indent-region point-before (point)))) 22 | 23 | (bind-key "C-y" #'pt/yank) 24 | (bind-key "s-v" #'pt/yank) 25 | (bind-key "C-Y" #'yank) 26 | (bind-key "C-s" #'isearch-forward-regexp) 27 | (bind-key "C-c s" #'isearch-forward-symbol) 28 | 29 | (setq evil-motion-state-modes (append evil-emacs-state-modes evil-motion-state-modes)) 30 | (setq evil-emacs-state-modes nil) 31 | (defun my-move-key (keymap-from keymap-to key) 32 | "Moves key binding from one keymap to another, deleting from the old location. " 33 | (define-key keymap-to key (lookup-key keymap-from key)) 34 | (define-key keymap-from key nil)) 35 | (my-move-key evil-motion-state-map evil-normal-state-map (kbd "RET")) 36 | (my-move-key evil-motion-state-map evil-normal-state-map " ") 37 | 38 | ;; Pane focus 39 | 40 | (windmove-default-keybindings) 41 | 42 | ;; Leader mappings 43 | 44 | (define-key evil-normal-state-map " " nil) 45 | (define-key evil-motion-state-map " " nil) 46 | 47 | (define-prefix-command 'leader-map) 48 | 49 | (define-key evil-normal-state-map " " 'leader-map) 50 | (define-key leader-map "e" 'neotree-toggle) 51 | (define-key leader-map "|" 'split-window-right) 52 | (define-key leader-map "-" 'split-window-below) 53 | 54 | (define-key leader-map (kbd "p") 'projectile-command-map) 55 | (define-key leader-map (kbd "lf") 'lsp-format-buffer) 56 | (define-key leader-map (kbd "ls") 'lsp) 57 | (define-key leader-map (kbd "lx") 'lsp-workspace-shutdown) 58 | (define-key leader-map (kbd "li") 'lsp-describe-session) 59 | (define-key leader-map (kbd "lr") 'lsp-rename) 60 | (define-key leader-map (kbd "lh") 'lsp-describe-thing-at-point) 61 | (define-key leader-map (kbd "lc") 'lsp-execute-code-action) 62 | (define-key leader-map (kbd "lgr") 'lsp-find-references) 63 | (define-key leader-map (kbd "lgi") 'lsp-find-implementation) 64 | (define-key leader-map (kbd "lgd") 'lsp-find-definition) 65 | (define-key leader-map (kbd "lgD") 'lsp-find-declaration) 66 | 67 | (evil-define-key 'normal neotree-mode-map (kbd "TAB") 'neotree-enter) 68 | (evil-define-key 'normal neotree-mode-map (kbd "SPC") 'neotree-quick-look) 69 | (evil-define-key 'normal neotree-mode-map (kbd "q") 'neotree-hide) 70 | (evil-define-key 'normal neotree-mode-map (kbd "RET") 'neotree-enter) 71 | (evil-define-key 'normal neotree-mode-map (kbd "g") 'neotree-refresh) 72 | (evil-define-key 'normal neotree-mode-map (kbd "n") 'neotree-next-line) 73 | (evil-define-key 'normal neotree-mode-map (kbd "p") 'neotree-previous-line) 74 | (evil-define-key 'normal neotree-mode-map (kbd "A") 'neotree-stretch-toggle) 75 | (evil-define-key 'normal neotree-mode-map (kbd "H") 'neotree-hidden-file-toggle) 76 | (evil-define-key 'normal neotree-mode-map (kbd "C") 'neotree-change-root) 77 | -------------------------------------------------------------------------------- /wayland/waybar/config.jsonc: -------------------------------------------------------------------------------- 1 | { 2 | "layer": "top", // Waybar at top layer 3 | "position": "top", // Waybar position (top|bottom|left|right) 4 | "height": 30, // Waybar height (to be removed for auto height) 5 | "width": 1900, 6 | "margin-top": 8, 7 | "spacing": 0, // Gaps between modules (4px) 8 | // Choose the order of the modules 9 | "modules-left": ["wlr/workspaces", "network"], 10 | "modules-center": [], 11 | "modules-right": ["tray", "custom/multiplayerctl", "pulseaudio", "cpu", "memory", "temperature", "battery", "clock"], 12 | "wlr/workspaces" : { 13 | "format": "{icon}", 14 | "on-click": "activate", 15 | "active-only": false, 16 | "all-outputs": false, 17 | "sort-by-number": true, 18 | "format-icons": { 19 | "1": "", 20 | "2": "", 21 | "3": "", 22 | "4": "", 23 | "5": "", 24 | "6": "", 25 | "7": "", 26 | "8": "", 27 | "9": "", 28 | "10": "", 29 | "11": "", 30 | "12": "", 31 | "13": "", 32 | "14": "", 33 | "15": "", 34 | "16": "", 35 | "17": "", 36 | "18": "", 37 | "19": "", 38 | "20": "", 39 | "urgent": "", 40 | "default": "" 41 | } 42 | }, 43 | "tray": { 44 | "spacing": 10 45 | }, 46 | "clock": { 47 | "tooltip-format": "{:%Y %B}\n{calendar}", 48 | "format-alt": "{:%Y-%m-%d}" 49 | }, 50 | "cpu": { 51 | "format": " {usage}%", 52 | "tooltip": false 53 | }, 54 | "memory": { 55 | "format": " {used:0.1f}GB" 56 | }, 57 | "temperature": { 58 | "thermal-zone": 9, 59 | "critical-threshold": 80, 60 | "format": "{icon} {temperatureC}°C", 61 | "format-icons": ["", "", "", "", "", ""] 62 | }, 63 | "battery": { 64 | "states": { 65 | "good": 90, 66 | "warning": 30, 67 | "critical": 15 68 | }, 69 | "format": "{icon} {capacity}%", 70 | "format-charging": " {capacity}%", 71 | "format-plugged": " {capacity}%", 72 | "format-icons": ["", "", "", "", ""] 73 | }, 74 | "network": { 75 | "format-wifi": " {essid} ({signalStrength}%)", 76 | "format-ethernet": " {ipaddr}/{cidr}", 77 | "format-disconnected": "⚠ Disconnected", 78 | "tooltip": true, 79 | "tooltip-format": "{ifname} {ipaddr} {bandwidthDownBytes} {bandwidthUpBytes}祝" 80 | }, 81 | "pulseaudio": { 82 | // "scroll-step": 1, // %, can be a float 83 | "format": "{icon} {volume}%", 84 | "format-bluetooth": " {volume}%", 85 | "format-icons": { 86 | "headphone": "", 87 | "hands-free": "", 88 | "headset": "", 89 | "phone": "", 90 | "portable": "", 91 | "car": "", 92 | "default": ["", "", ""] 93 | } 94 | }, 95 | "custom/multiplayerctl": { 96 | "format": "{icon} {}", 97 | "return-type": "json", 98 | "format-icons": { 99 | "Playing": "", 100 | "Paused": "", 101 | "None": " ﱙ" 102 | }, 103 | "escape": true, 104 | "interval": 5, 105 | "signal": 4, 106 | "exec-on-event": true, 107 | "exec": "if [ \"$(multiplayerctl status)\" = \"No players found!\" ]; then echo \"{\\\"alt\\\": \\\"None\\\", \\\"text\\\": \\\"\\\"}\"; else multiplayerctl metadata --format=\"{\\\"text\\\": \\\"{{artist}} - {{title}}\\\", \\\"alt\\\": \\\"{{status}}\\\", \\\"class\\\": \\\"multiplayerctl\\\"}\"; fi", 108 | "on-click": "multiplayerctl toggle && sleep 0.2 && pkill -SIGRTMIN+4 waybar", 109 | "on-click-right": "multiplayerctl switch && sleep 0.2 && pkill -SIGRTMIN+4 waybar", 110 | "on-scroll-up": "multiplayerctl next && sleep 0.2 && pkill -SIGRTMIN+4 waybar", 111 | "on-scroll-down": "multiplayerctl previous && sleep 0.2 && pkill -SIGRTMIN+4 waybar" 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /wayland/waybar/style.css: -------------------------------------------------------------------------------- 1 | * { 2 | /* `otf-font-awesome` is required to be installed for icons */ 3 | font-family: "Hack Nerd Font"; 4 | font-size: 13px; 5 | } 6 | 7 | #window { 8 | padding: 8px; 9 | } 10 | 11 | window#waybar { 12 | background-color: rgba(16, 16, 32, 0.5); 13 | border-top: 8px transparent; 14 | border-radius: 8px; 15 | color: #ffffff; 16 | transition-property: background-color; 17 | transition-duration: .5s; 18 | margin: 16px 16px; 19 | } 20 | 21 | window#waybar.hidden { 22 | opacity: 0.2; 23 | } 24 | 25 | /* 26 | window#waybar.empty { 27 | background-color: transparent; 28 | } 29 | window#waybar.solo { 30 | background-color: #FFFFFF; 31 | } 32 | */ 33 | 34 | window#waybar.termite { 35 | background-color: #3F3F3F; 36 | } 37 | 38 | window#waybar.chromium { 39 | background-color: #000000; 40 | border: none; 41 | } 42 | 43 | #workspaces button { 44 | padding: 0 5px; 45 | background-color: transparent; 46 | color: #ffffff; 47 | /* Use box-shadow instead of border so the text isn't offset */ 48 | box-shadow: inset 0 -3px transparent; 49 | /* Avoid rounded borders under each workspace name */ 50 | border: none; 51 | border-radius: 0; 52 | } 53 | 54 | /* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ 55 | #workspaces button:hover { 56 | background: rgba(0, 0, 0, 0.2); 57 | box-shadow: inset 0 -3px #ffffff; 58 | } 59 | 60 | #workspaces button.focused { 61 | background-color: #64727D; 62 | box-shadow: inset 0 -3px #ffffff; 63 | } 64 | 65 | #workspaces button.urgent { 66 | background-color: #eb4d4b; 67 | } 68 | 69 | #mode { 70 | background-color: #64727D; 71 | border-bottom: 3px solid #ffffff; 72 | } 73 | 74 | #clock, 75 | #battery, 76 | #cpu, 77 | #memory, 78 | #disk, 79 | #temperature, 80 | #backlight, 81 | #network, 82 | #pulseaudio, 83 | #custom-media, 84 | #tray, 85 | #mode, 86 | #idle_inhibitor, 87 | #mpd, 88 | #custom-multiplayerctl { 89 | padding: 4px 4px; 90 | margin: 4px 2px; 91 | border-radius: 4px; 92 | color: #ffffff; 93 | } 94 | 95 | #workspaces { 96 | margin: 0 4px; 97 | } 98 | 99 | /* If workspaces is the leftmost module, omit left margin */ 100 | .modules-left > widget:first-child > #workspaces { 101 | margin-left: 0; 102 | } 103 | 104 | /* If workspaces is the rightmost module, omit right margin */ 105 | .modules-right > widget:last-child > #workspaces { 106 | margin-right: 0px; 107 | } 108 | 109 | .modules-right { 110 | margin-right: 2px; 111 | } 112 | 113 | #clock { 114 | background-color: #56b6c2; 115 | color: #101020; 116 | } 117 | 118 | #battery { 119 | background-color: #e5c07b; 120 | color: #101020; 121 | } 122 | 123 | #battery.charging, #battery.plugged { 124 | background-color: #26A65B; 125 | color: #101020; 126 | } 127 | 128 | @keyframes blink { 129 | to { 130 | background-color: #ffffff; 131 | color: #000000; 132 | } 133 | } 134 | 135 | #battery.critical:not(.charging) { 136 | background-color: #f53c3c; 137 | color: #ffffff; 138 | animation-name: blink; 139 | animation-duration: 0.5s; 140 | animation-timing-function: linear; 141 | animation-iteration-count: infinite; 142 | animation-direction: alternate; 143 | } 144 | 145 | label:focus { 146 | background-color: #000000; 147 | } 148 | 149 | #cpu { 150 | background-color: #44b080; 151 | color: #101020; 152 | } 153 | 154 | #memory { 155 | background-color: #985fdd; 156 | color: #101020; 157 | } 158 | 159 | #disk { 160 | background-color: #964B00; 161 | } 162 | 163 | #backlight { 164 | background-color: #90b1b1; 165 | } 166 | 167 | #network { 168 | background-color: #61afef; 169 | color: #101020; 170 | } 171 | 172 | #network.disconnected { 173 | background-color: #c13251; 174 | color: #101020; 175 | } 176 | 177 | #pulseaudio { 178 | background-color: #aaddee; 179 | color: #101020; 180 | } 181 | 182 | #pulseaudio.muted { 183 | background-color: #8090aa; 184 | color: #101020; 185 | } 186 | 187 | #custom-multiplayerctl { 188 | background-color: #98c379; 189 | color: #101020; 190 | } 191 | 192 | #temperature { 193 | background-color: #c13251; 194 | color: #101020; 195 | } 196 | 197 | #temperature.critical { 198 | background-color: #ffffff; 199 | } 200 | 201 | #tray { 202 | background-color: #2980b9; 203 | } 204 | 205 | #tray > .passive { 206 | -gtk-icon-effect: dim; 207 | } 208 | 209 | #tray > .needs-attention { 210 | -gtk-icon-effect: highlight; 211 | background-color: #eb4d4b; 212 | } 213 | 214 | #language { 215 | background: #00b093; 216 | color: #740864; 217 | padding: 0 5px; 218 | margin: 0 5px; 219 | min-width: 16px; 220 | } 221 | 222 | #keyboard-state { 223 | background: #97e1ad; 224 | color: #000000; 225 | padding: 0 0px; 226 | margin: 0 5px; 227 | min-width: 16px; 228 | } 229 | 230 | #keyboard-state > label { 231 | padding: 0 5px; 232 | } 233 | 234 | #keyboard-state > label.locked { 235 | background: rgba(0, 0, 0, 0.2); 236 | } 237 | -------------------------------------------------------------------------------- /emacs/packages.el: -------------------------------------------------------------------------------- 1 | ;; Packages 2 | 3 | (use-package recentf 4 | :config 5 | (add-to-list 'recentf-exclude "\\elpa") 6 | (add-to-list 'recentf-exclude "private/tmp") 7 | (recentf-mode)) 8 | 9 | (use-package request 10 | :ensure t) 11 | (use-package s) 12 | (use-package dash) 13 | 14 | (use-package undo-tree 15 | :diminish 16 | :bind (("C-c _" . undo-tree-visualize)) 17 | :init 18 | (global-undo-tree-mode +1) 19 | (unbind-key "M-_" undo-tree-map)) 20 | 21 | (use-package dabbrev 22 | :bind (("C-/" . #'dabbrev-completion)) 23 | :custom 24 | (dabbrev-case-replace nil)) 25 | 26 | ;; TODO: I want to use the fancy-dabbrev package everywhere, 27 | ;; but it uses popup.el rather than read-completion, and 28 | ;; I don't like how quickly it operates on its inline suggestions 29 | 30 | (use-package all-the-icons) 31 | 32 | (use-package all-the-icons-dired 33 | :after all-the-icons 34 | :hook (dired-mode . all-the-icons-dired-mode)) 35 | 36 | (use-package doom-themes 37 | :config 38 | (let ((chosen-theme 'doom-one)) 39 | (doom-themes-visual-bell-config) 40 | (doom-themes-org-config) 41 | (setq doom-challenger-deep-brighter-comments t 42 | doom-challenger-deep-brighter-modeline t 43 | doom-ir-black-brighter-comments t 44 | modus-themes-org-blocks 'gray-background 45 | doom-dark+-blue-modeline nil) 46 | (load-theme chosen-theme))) 47 | 48 | (use-package diminish 49 | :config 50 | (diminish 'visual-line-mode)) 51 | 52 | (use-package doom-modeline 53 | :ensure t 54 | :init (doom-modeline-mode 1)) 55 | 56 | (use-package evil 57 | :ensure t 58 | :init 59 | (evil-mode 1) 60 | :config 61 | (custom-set-variables 62 | '(evil-undo-system 'undo-tree)) 63 | (add-hook 'evil-local-mode-hook 'turn-on-undo-tree-mode)) 64 | 65 | (use-package neotree 66 | :ensure t 67 | :config 68 | (setq neo-smart-open t)) 69 | 70 | (use-package which-key 71 | :ensure t 72 | :init (which-key-mode)) 73 | 74 | (use-package tree-sitter 75 | :ensure t 76 | :init 77 | (global-tree-sitter-mode) 78 | (add-hook 'tree-sitter-after-on-hook #'tree-sitter-hl-mode)) 79 | 80 | (use-package tree-sitter-langs 81 | :ensure t) 82 | 83 | (use-package tree-sitter-indent 84 | :ensure t) 85 | 86 | (use-package rust-mode 87 | :ensure t) 88 | 89 | (use-package csharp-mode 90 | :ensure t 91 | :config 92 | (add-to-list 'auto-mode-alist '("\\.cs\\'" . csharp-tree-sitter-mode))) 93 | 94 | (use-package lsp-mode 95 | :ensure t 96 | :init 97 | ;; set prefix for lsp-command-keymap (few alternatives - "C-l", "C-c l") 98 | (setq lsp-keymap-prefix "C-c l") 99 | :hook (;; replace XXX-mode with concrete major-mode(e. g. python-mode) 100 | (rust-mode . lsp) 101 | (charp-mode . lsp) 102 | (c++-mode . lsp) 103 | (c-mode . lsp) 104 | ;; if you want which-key integration 105 | (lsp-mode . lsp-enable-which-key-integration)) 106 | :commands lsp) 107 | 108 | 109 | (use-package flycheck 110 | :ensure t) 111 | 112 | (use-package company 113 | :ensure t 114 | :config 115 | (setq company-idle-delay 0.0) 116 | (setq company-minimum-prefix-length 1) 117 | :init 118 | (company-mode)) 119 | 120 | (use-package projectile 121 | :ensure t 122 | :init 123 | (projectile-mode +1)) 124 | 125 | (use-package vterm 126 | :ensure t) 127 | 128 | (use-package markdown-mode 129 | :ensure t 130 | :mode ("README\\.md\\'" . gfm-mode) 131 | :init (setq markdown-command "multimarkdown")) 132 | 133 | (use-package dashboard 134 | :ensure t 135 | :config 136 | (setq dashboard-banner-logo-title "It's Emacs Time") 137 | (setq dashboard-startup-banner 'logo) 138 | (setq dashboard-center-content t) 139 | (setq dashboard-items '((recents . 5) 140 | (bookmarks . 5) 141 | (projects . 5) 142 | (registers . 5))) 143 | (setq dashboard-set-navigator t) 144 | (setq dashboard-navigator-buttons 145 | `( 146 | ( 147 | (,(all-the-icons-octicon "mark-github" :height 1.1 :v-adjust 0.0) 148 | "Github" 149 | "Browse github" 150 | (lambda (&rest _) (browse-url "https://github.com"))) 151 | (,(all-the-icons-faicon "gitlab" :height 1.1 :v-adjust 0.0) 152 | "Gitlab" 153 | "Browse gitlab" 154 | (lambda (&rest _) (browse-url "https://gitlab-stud.elka.pw.edu.pl")) error) 155 | ) 156 | ( 157 | (,(all-the-icons-octicon "globe" :height 1.1 :v-adjust 0.0) 158 | "Homepage" 159 | "Browse homepage" 160 | (lambda (&rest _) (browse-url "https://duckonaut.me")) warning) 161 | ) 162 | ) 163 | ) 164 | (dashboard-setup-startup-hook)) 165 | 166 | (use-package git-gutter 167 | :hook (prog-mode . git-gutter-mode) 168 | :config 169 | (setq git-gutter:update-interval 0.02)) 170 | 171 | 172 | (use-package git-gutter-fringe 173 | :ensure t) 174 | 175 | (define-fringe-bitmap 'git-gutter-fr:added [224] nil nil '(center repeated)) 176 | (define-fringe-bitmap 'git-gutter-fr:modified [224] nil nil '(center repeated)) 177 | (define-fringe-bitmap 'git-gutter-fr:deleted [128 192 224 240] nil nil 'bottom) 178 | -------------------------------------------------------------------------------- /eww/eww.scss: -------------------------------------------------------------------------------- 1 | @import "eww-colors.scss"; 2 | 3 | * { 4 | all: unset; 5 | font-family: "Hack Nerd Font"; 6 | } 7 | 8 | .bar { 9 | padding: 2px; 10 | border-radius: 12px; 11 | } 12 | 13 | .right, .center { 14 | border-radius: 40px; 15 | background: $bar_bg; 16 | margin: 0px; 17 | padding: 2px 8px; 18 | } 19 | 20 | .left { 21 | border-radius: 12px; 22 | background: $bar_bg; 23 | margin: 0px; 24 | padding: 2px 8px; 25 | } 26 | 27 | .circle { 28 | background-color: $circle_fill; 29 | 30 | } 31 | 32 | .circle-inside { 33 | min-width: 2rem; 34 | min-height: 2rem; 35 | border-radius: 50%; 36 | } 37 | 38 | .circle-icon { 39 | font-size: 1rem; 40 | } 41 | 42 | .net, 43 | .clock { 44 | margin: 4px 2px; 45 | padding: 4px; 46 | color: $blue; 47 | font-size: 14px; 48 | border-radius: 4px; 49 | border-radius: 16px; 50 | border: 3px solid $blue; 51 | transition: 0.5s; 52 | } 53 | 54 | .date-text { 55 | padding-left: 6px; 56 | } 57 | 58 | .net.expanded, .clock.expanded { 59 | transition: 0.5s; 60 | border-radius: 4px; 61 | } 62 | 63 | .net-icon-ether { 64 | padding-right: 5px; 65 | padding-left: 2px; 66 | } 67 | 68 | .net-icon-wifi { 69 | padding-right: 8px; 70 | padding-left: 2px; 71 | } 72 | .net-icon-none { 73 | padding-right: 8px; 74 | padding-left: 2px; 75 | } 76 | 77 | .power, 78 | .temperature, 79 | .memory, 80 | .cpu, 81 | .volume { 82 | margin: 4px 2px; 83 | padding: 4px; 84 | font-size: 13px; 85 | border-radius: 4px; 86 | } 87 | 88 | .music { 89 | margin: 4px 2px; 90 | padding: 4px; 91 | color: $silver; 92 | font-size: 15px; 93 | border-radius: 16px; 94 | border: 3px solid $silver; 95 | transition: 0.5s; 96 | } 97 | 98 | .music.expanded { 99 | transition: 0.5s; 100 | border-radius: 6px; 101 | // background-color: $silver; 102 | // color: $bg; 103 | } 104 | 105 | .music-icon { 106 | padding-right: 5px; 107 | padding-left: 2px; 108 | } 109 | 110 | .music-title { 111 | padding-left: 5px; 112 | font-size: 13px; 113 | } 114 | 115 | .power { 116 | color: $yellow; 117 | border-radius: 4px; 118 | border: 1px solid $fg; 119 | } 120 | 121 | .power.full .circle-icon { 122 | padding-right: 7px; 123 | font-size: 0.95rem; 124 | } 125 | 126 | .power.discharging .circle-icon { 127 | padding-right: 7px; 128 | font-size: 0.95rem; 129 | } 130 | 131 | .power.charging { 132 | color: $lime; 133 | } 134 | 135 | .power.charging > .circle-icon { 136 | padding-right: 2px; 137 | } 138 | 139 | .power.plugged { 140 | color: $green; 141 | } 142 | 143 | .power.plugged .circle-icon { 144 | padding-right: 0.4rem; 145 | } 146 | 147 | .temperature { 148 | color: $red; 149 | } 150 | 151 | .temperature .circle-icon { 152 | padding-left: 2px; 153 | } 154 | 155 | /* 156 | .temperature.hot { 157 | background-color: #ffffff; 158 | } 159 | 160 | .temperature.normal { 161 | background-color: #c13251; 162 | } 163 | 164 | .temperature.cool { 165 | background-color: #80c080; 166 | } 167 | 168 | .temperature.cold { 169 | background-color: #80c0ff; 170 | } 171 | */ 172 | 173 | .memory { 174 | color: $orange; 175 | } 176 | 177 | .memory .circle-icon { 178 | font-size: 1.2rem; 179 | } 180 | 181 | .cpu { 182 | color: $yellow; 183 | } 184 | 185 | .cpu .circle-icon { 186 | font-size: 1.04rem; 187 | padding-right: 5px; 188 | } 189 | 190 | .volume { 191 | color: $lime; 192 | } 193 | 194 | .volume .circle-icon { 195 | padding-right: 5px; 196 | } 197 | 198 | .volume highlight { 199 | background-color: $lime; 200 | } 201 | 202 | .volume slider { 203 | background-color: $lime; 204 | } 205 | 206 | .workspaces { 207 | padding: 2px; 208 | margin: 2px; 209 | } 210 | 211 | .ws.icon { 212 | font-size: 22px; 213 | margin: 0px 4px; 214 | padding-right: 4px; 215 | } 216 | 217 | .ws.icon.active { 218 | color: $lime;; 219 | } 220 | 221 | .ws.icon.empty { 222 | color: $grey1; 223 | } 224 | 225 | .ws.icon.focused { 226 | color: $blue; 227 | } 228 | 229 | $scaleh: .5rem; 230 | 231 | scale { 232 | trough { 233 | background-color: $bg; 234 | border-radius: 0.5rem; 235 | min-width: 5rem; 236 | padding: 0 0.25rem; 237 | margin: 0; 238 | min-width: 8rem; 239 | } 240 | 241 | highlight { 242 | border-radius: 0.5rem; 243 | margin: 0 -0.25rem; 244 | min-height: 0.5rem; 245 | } 246 | 247 | slider { 248 | margin: -0.5rem; 249 | min-width: 1rem; 250 | min-height: 1rem; 251 | border-radius: 0.5rem; 252 | } 253 | } 254 | 255 | // powermenu 256 | 257 | .powermenu { 258 | font-size: 8rem; 259 | padding: 10px; 260 | } 261 | 262 | .powermenu-widget { 263 | background-color: rgba(16, 16, 32, 0.4); 264 | border-color: rgba(127, 127, 255, 0.15); 265 | border-style: solid; 266 | border-width: 4px; 267 | border-radius: 16px; 268 | margin: 12px; 269 | } 270 | 271 | .powermenu-eb:hover > .powermenu-widget { 272 | transition: 0.2s; 273 | border-radius: 12px; 274 | border-color: $blue; 275 | border-width: 4px; 276 | border-style: solid; 277 | margin: 12px; 278 | } 279 | 280 | .poweroff-icon, .reboot-icon, .suspend-icon { 281 | font-size: 8rem; 282 | padding: 10px 56px 10px 24px; 283 | } 284 | 285 | .lock-icon { 286 | font-size: 8rem; 287 | padding: 10px 42px 10px 30px; 288 | } 289 | 290 | .logout-icon { 291 | font-size: 8rem; 292 | padding: 10px 40px 10px 32px; 293 | } 294 | 295 | .poweroff-icon { 296 | color: $red; 297 | } 298 | 299 | .reboot-icon { 300 | color: $green; 301 | } 302 | 303 | .suspend-icon { 304 | color: $purple; 305 | } 306 | 307 | .logout-icon { 308 | color: $blue; 309 | } 310 | 311 | .lock-icon { 312 | color: $yellow; 313 | } 314 | -------------------------------------------------------------------------------- /swaync/style.css: -------------------------------------------------------------------------------- 1 | /* 2 | * vim: ft=less 3 | */ 4 | 5 | @define-color cc-bg rgba(0, 0, 0, 0.7); 6 | 7 | @define-color noti-border-color rgba(255, 255, 255, 0.15); 8 | @define-color noti-bg rgb(48, 48, 48); 9 | @define-color noti-bg-hover rgb(56, 56, 56); 10 | @define-color noti-bg-focus transparent; 11 | @define-color noti-close-bg rgba(255, 255, 255, 0.4); 12 | @define-color noti-close-bg-hover rgba(255, 255, 255, 0.15); 13 | 14 | @define-color bg-selected rgb(0, 128, 255); 15 | 16 | * { 17 | font-family: 'Hack Nerd Font'; 18 | } 19 | 20 | button { 21 | border-radius: 8px; 22 | background-color: transparent; 23 | } 24 | 25 | .notification-row { 26 | outline: none; 27 | } 28 | 29 | .notification-row:focus, 30 | .notification-row:hover { 31 | background: @noti-bg-focus; 32 | } 33 | 34 | .notification { 35 | border-radius: 8px; 36 | margin: 6px 12px; 37 | box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.7), 38 | 0 2px 6px 2px rgba(0, 0, 0, 0.3); 39 | padding: 0; 40 | } 41 | 42 | /* Uncomment to enable specific urgency colors 43 | .low { 44 | background: yellow; 45 | padding: 6px; 46 | border-radius: 12px; 47 | } 48 | 49 | .normal { 50 | background: green; 51 | padding: 6px; 52 | border-radius: 12px; 53 | } 54 | 55 | .critical { 56 | background: red; 57 | padding: 6px; 58 | border-radius: 12px; 59 | } 60 | */ 61 | 62 | .notification-content { 63 | background: transparent; 64 | padding: 6px; 65 | border-radius: 12px; 66 | } 67 | 68 | .close-button { 69 | background: @noti-close-bg; 70 | color: white; 71 | text-shadow: none; 72 | padding: 0; 73 | border-radius: 100%; 74 | margin-top: 10px; 75 | margin-right: 16px; 76 | box-shadow: none; 77 | border: none; 78 | min-width: 24px; 79 | min-height: 24px; 80 | } 81 | 82 | .close-button:hover { 83 | box-shadow: none; 84 | background: @noti-close-bg-hover; 85 | transition: all 0.15s ease-in-out; 86 | border: none; 87 | } 88 | 89 | .notification-default-action, 90 | .notification-action { 91 | padding: 4px; 92 | margin: 0; 93 | box-shadow: none; 94 | background: @noti-bg; 95 | border: 1px solid @noti-border-color; 96 | color: white; 97 | } 98 | 99 | .notification-default-action:hover, 100 | .notification-action:hover { 101 | -gtk-icon-effect: none; 102 | background: @noti-bg-hover; 103 | } 104 | 105 | .notification-default-action { 106 | border-radius: 12px; 107 | } 108 | 109 | /* When alternative actions are visible */ 110 | .notification-default-action:not(:only-child) { 111 | border-bottom-left-radius: 0px; 112 | border-bottom-right-radius: 0px; 113 | } 114 | 115 | .notification-action { 116 | border-radius: 0px; 117 | border-top: none; 118 | border-right: none; 119 | } 120 | 121 | /* add bottom border radius to eliminate clipping */ 122 | .notification-action:first-child { 123 | border-bottom-left-radius: 10px; 124 | } 125 | 126 | .notification-action:last-child { 127 | border-bottom-right-radius: 10px; 128 | border-right: 1px solid @noti-border-color; 129 | } 130 | 131 | .image { 132 | } 133 | 134 | .body-image { 135 | margin-top: 6px; 136 | background-color: white; 137 | border-radius: 12px; 138 | } 139 | 140 | .summary { 141 | font-size: 16px; 142 | font-weight: bold; 143 | background: transparent; 144 | color: white; 145 | text-shadow: none; 146 | } 147 | 148 | .time { 149 | font-size: 16px; 150 | font-weight: bold; 151 | background: transparent; 152 | color: white; 153 | text-shadow: none; 154 | margin-right: 18px; 155 | } 156 | 157 | .body { 158 | font-size: 15px; 159 | font-weight: normal; 160 | background: transparent; 161 | color: white; 162 | text-shadow: none; 163 | } 164 | 165 | /* The "Notifications" and "Do Not Disturb" text widget */ 166 | .top-action-title { 167 | color: white; 168 | text-shadow: none; 169 | } 170 | 171 | .control-center { 172 | background: rgba(127, 127, 255, 0.15); 173 | border-radius: 12px; 174 | border: 2px solid rgba(127, 127, 255, 0.3); 175 | } 176 | 177 | .control-center-list { 178 | background: transparent; 179 | } 180 | 181 | .floating-notifications { 182 | background: transparent; 183 | } 184 | 185 | /* Window behind control center and on all other monitors */ 186 | .blank-window { 187 | background: transparent; 188 | } 189 | 190 | /*** Widgets ***/ 191 | 192 | /* Title widget */ 193 | .widget-title { 194 | margin: 12px; 195 | font-size: 1.5rem; 196 | } 197 | .widget-title > button { 198 | font-size: initial; 199 | color: white; 200 | text-shadow: none; 201 | border: none; 202 | background: rgba(16, 16, 32, 0.4); 203 | border-radius: 12px; 204 | } 205 | .widget-title > button:hover { 206 | background: rgba(127, 127, 255, 0.4); 207 | } 208 | .widget-title > button:active { 209 | background: rgba(127, 127, 255, 0.5); 210 | } 211 | 212 | /* DND widget */ 213 | .widget-dnd { 214 | margin: 12px; 215 | font-size: 1.1rem; 216 | } 217 | .widget-dnd > switch { 218 | font-size: initial; 219 | border-radius: 12px; 220 | background: rgba(16, 16, 32, 0.4); 221 | transition: all 0.15s linear; 222 | border: none; 223 | } 224 | .widget-dnd > switch:checked { 225 | border: none; 226 | transition: all 0.15s linear; 227 | background: rgba(127, 127, 255, 0.4); 228 | } 229 | .widget-dnd > switch slider { 230 | border: none; 231 | background: @noti-border-color; 232 | border-radius: 12px; 233 | } 234 | .widget-dnd > switch:checked slider { 235 | border: none; 236 | background: rgba(255, 255, 255, 1); 237 | border-radius: 12px; 238 | } 239 | 240 | /* Label widget */ 241 | .widget-label { 242 | margin: 8px; 243 | } 244 | .widget-label > label { 245 | font-size: 1.1rem; 246 | } 247 | 248 | /* Mpris widget */ 249 | .widget-mpris { 250 | /* The parent to all players */ 251 | } 252 | .widget-mpris-player { 253 | padding: 8px; 254 | margin: 8px; 255 | } 256 | .widget-mpris-title { 257 | font-weight: bold; 258 | font-size: 1.25rem; 259 | } 260 | .widget-mpris-subtitle { 261 | font-size: 1.1rem; 262 | } 263 | -------------------------------------------------------------------------------- /wayland/hypr/hyprlandd.conf: -------------------------------------------------------------------------------- 1 | # This is an example Hyprland config file. 2 | # Syntax is the same as in Hypr, but settings might differ. 3 | # 4 | # Refer to the wiki for more information. 5 | 6 | # 7 | # Please note not all available settings / options are set here. 8 | # For a full list, see the wiki (basic and advanced configuring) 9 | # 10 | 11 | monitor=WL-1,preferred,0x0,1 12 | 13 | input { 14 | kb_layout=pl 15 | kb_variant= 16 | kb_model= 17 | kb_options= 18 | kb_rules= 19 | 20 | follow_mouse=1 21 | 22 | repeat_delay=400 23 | repeat_rate=30 24 | 25 | touchpad { 26 | natural_scroll=true 27 | clickfinger_behavior=true 28 | } 29 | } 30 | 31 | general { 32 | sensitivity=1.0 # for mouse cursor 33 | 34 | gaps_in=5 35 | gaps_out=10 36 | border_size=2 37 | col.active_border=0xFF61AFEF 38 | col.inactive_border=0x00101020 39 | 40 | apply_sens_to_raw=0 # whether to apply the sensitivity to raw input (e.g. used by games where you aim using your mouse) 41 | } 42 | 43 | decoration { 44 | rounding=10 45 | blur { 46 | enabled=true 47 | size=8 # minimum 1 48 | passes=3 # minimum 1, more passes = more resource intensive. 49 | new_optimizations=true 50 | xray=true 51 | # Your blur "amount" is blur_size * blur_passes, but high blur_size (over around 5-ish) will produce artifacts. 52 | # if you want heavy blur, you need to up the blur_passes. 53 | # the more passes, the more you can up the blur_size without noticing artifacts. 54 | } 55 | } 56 | 57 | bezier=overshot,0.05,0.9,0.1,1.1 58 | 59 | animations { 60 | enabled=1 61 | animation=windows,1,4,overshot 62 | animation=border,1,4,overshot 63 | animation=fade,1,4,default 64 | animation=workspaces,1,6,default 65 | } 66 | 67 | dwindle { 68 | pseudotile=true 69 | preserve_split=true 70 | } 71 | 72 | gestures { 73 | workspace_swipe=yes 74 | } 75 | 76 | misc { 77 | focus_on_activate=true 78 | } 79 | 80 | plugin { 81 | hyprload { 82 | root=/home/duckonaut/.local/share/hyprload 83 | debug = 1 84 | quiet = 0 85 | overlay { 86 | animation_curve=default 87 | animation_speed=0.5 88 | } 89 | config=/home/duckonaut/.config/hypr/hyprload.toml 90 | } 91 | 92 | borders-plus-plus { 93 | add_borders = 2 # 0 - 2 94 | col.border_1 = rgb(ffffff) # example col for border 1 95 | col.border_2 = rgb(2222ff) # example col for border 2 96 | } 97 | 98 | hyprlens { 99 | background=/home/duckonaut/Pictures/TiledGalaxy.png 100 | nearest=1 101 | tiled=1 102 | } 103 | } 104 | 105 | # example window rules 106 | # for windows named/classed as abc and xyz 107 | #windowrule=move 69 420,abc 108 | #windowrule=size 420 69,abc 109 | #windowrule=tile,xyz 110 | #windowrule=float,abc 111 | #windowrule=pseudo,abc 112 | 113 | bind=ALTSHIFT,1,split-movetoworkspace,1 114 | bind=ALTSHIFT,2,split-movetoworkspace,2 115 | bind=ALTSHIFT,3,split-movetoworkspace,3 116 | bind=ALTSHIFT,4,split-movetoworkspace,4 117 | bind=ALTSHIFT,5,split-movetoworkspace,5 118 | bind=ALTSHIFT,6,split-movetoworkspace,6 119 | bind=ALTSHIFT,7,split-movetoworkspace,7 120 | bind=ALTSHIFT,8,split-movetoworkspace,8 121 | bind=ALTSHIFT,9,split-movetoworkspace,9 122 | bind=ALTSHIFT,0,split-movetoworkspace,10 123 | #windowrule=monitor 0,xyz 124 | 125 | # example binds 126 | bind=ALT,Q,exec,firefox 127 | bind=ALT,return,exec,RUST_BACKTRACE=1 alacritty --config-file ~/.config/alacritty/alacritty-awesome.yml -vv >> ~/.local/var/log/alacritty.log 2>&1 128 | bind=ALTSHIFT,C,killactive, 129 | bind=ALTSHIFT,Q,exit, 130 | bind=ALT,E,exec,nautilus 131 | bind=ALT,F,fullscreen,0 132 | bind=ALT,V,togglefloating, 133 | bind=ALT,SPACE,exec,wofi --show drun -o DP-3 134 | 135 | bindm=ALT,mouse:272,movewindow 136 | bindm=ALT,mouse:273,resizewindow 137 | 138 | bind=ALTSHIFT,left,resizeactive,-20 0 139 | bind=ALTSHIFT,right,resizeactive,20 0 140 | bind=ALTSHIFT,up,resizeactive,0 -20 141 | bind=ALTSHIFT,down,resizeactive,0 20 142 | 143 | bind=ALT,left,movefocus,l 144 | bind=ALT,right,movefocus,r 145 | bind=ALT,up,movefocus,u 146 | bind=ALT,down,movefocus,d 147 | 148 | bind=ALT,H,movefocus,l 149 | bind=ALT,L,movefocus,r 150 | bind=ALT,K,movefocus,u 151 | bind=ALT,J,movefocus,d 152 | 153 | bind=ALT,1,split-workspace,1 154 | bind=ALT,2,split-workspace,2 155 | bind=ALT,3,split-workspace,3 156 | bind=ALT,4,split-workspace,4 157 | bind=ALT,5,split-workspace,5 158 | bind=ALT,6,split-workspace,6 159 | bind=ALT,7,split-workspace,7 160 | bind=ALT,8,split-workspace,8 161 | bind=ALT,9,split-workspace,9 162 | bind=ALT,0,split-workspace,10 163 | 164 | bind=ALTCONTROL,1,split-movetoworkspacesilent,1 165 | bind=ALTCONTROL,2,split-movetoworkspacesilent,2 166 | bind=ALTCONTROL,3,split-movetoworkspacesilent,3 167 | bind=ALTCONTROL,4,split-movetoworkspacesilent,4 168 | bind=ALTCONTROL,5,split-movetoworkspacesilent,5 169 | bind=ALTCONTROL,6,split-movetoworkspacesilent,6 170 | bind=ALTCONTROL,7,split-movetoworkspacesilent,7 171 | bind=ALTCONTROL,8,split-movetoworkspacesilent,8 172 | bind=ALTCONTROL,9,split-movetoworkspacesilent,9 173 | bind=ALTCONTROL,0,split-movetoworkspacesilent,10 174 | 175 | bind=ALT,mouse_up,workspace,m+1 176 | bind=ALT,mouse_down,workspace,m-1 177 | 178 | bind=,xf86audioplay,exec,multiplayerctl toggle && sleep 0.2 && pkill -SIGRTMIN+4 waybar 179 | bind=,xf86audiostop,exec,multiplayerctl switch && sleep 0.2 && pkill -SIGRTMIN+4 waybar 180 | bind=,xf86audioprev,exec,multiplayerctl previous && sleep 0.2 && pkill -SIGRTMIN+4 waybar 181 | bind=,xf86audionext,exec,multiplayerctl next && sleep 0.2 && pkill -SIGRTMIN+4 waybar 182 | bind=,xf86monbrightnessup,exec,brightnessctl set +10 183 | bind=,xf86monbrightnessdown,exec,brightnessctl set 10- 184 | bind=,xf86audioraisevolume,exec,pactl set-sink-volume @DEFAULT_SINK@ +5% 185 | bind=,xf86audiolowervolume,exec,pactl set-sink-volume @DEFAULT_SINK@ -5% 186 | 187 | bind=ALTSHIFT,S,exec,grim -g "$(slurp)" -t png - | wl-copy 188 | bind=ALTCONTROL,S,exec,grim -g "$(slurp)" -o $(xdg-user-dir PICTURES)/grim/$(date +%Y-%m-%d-%H-%M-%S).png 189 | bind=ALT,N,exec,swaync-client -t 190 | bind=ALTSHIFT,R,hyprload,reload 191 | bind=ALTSHIFT,U,hyprload,update 192 | bind=ALTSHIFT,O,hyprload,overlay 193 | 194 | env=_JAVA_AWT_WM_NONEPARENTING,1 195 | env=XCURSOR_SIZE,24 196 | env=LIBVA_DRIVER_NAME,nvidia 197 | env=XDG_SESSION_TYPE,wayland 198 | env=GBM_BACKEND,nvidia-drm 199 | env=__GLX_VENDOR_LIBRARY_NAME,nvidia 200 | env=WLR_NO_HARDWARE_CURSORS,1 201 | 202 | exec-once=$HOME/.local/share/hyprload/hyprload.sh 203 | -------------------------------------------------------------------------------- /wayland/hypr/hyprland.conf: -------------------------------------------------------------------------------- 1 | # This is an example Hyprland config file. 2 | # Syntax is the same as in Hypr, but settings might differ. 3 | # 4 | # Refer to the wiki for more information. 5 | 6 | # 7 | # Please note not all available settings / options are set here. 8 | # For a full list, see the wiki (basic and advanced configuring) 9 | # 10 | 11 | monitor=eDP-1,preferred,0x1080,1 12 | monitor=HDMI-A-1,preferred,0x0,1 13 | workspace=eDP-1,11 14 | workspace=HDMI-A-1,1 15 | 16 | input { 17 | kb_layout=pl 18 | kb_variant= 19 | kb_model= 20 | kb_options= 21 | kb_rules= 22 | 23 | follow_mouse=1 24 | 25 | repeat_delay=400 26 | repeat_rate=30 27 | 28 | touchpad { 29 | natural_scroll=true 30 | clickfinger_behavior=true 31 | disable_while_typing=false 32 | } 33 | } 34 | 35 | cursor { 36 | no_hardware_cursors = true 37 | } 38 | 39 | general { 40 | gaps_in=5 41 | gaps_out=10 42 | border_size=2 43 | col.active_border=0xFF61AFEF 44 | col.inactive_border=0x50101020 45 | } 46 | 47 | decoration { 48 | rounding=10 49 | blur { 50 | enabled=true 51 | size=8 # minimum 1 52 | passes=3 # minimum 1, more passes = more resource intensive. 53 | new_optimizations=true 54 | xray=true 55 | # Your blur "amount" is blur_size * blur_passes, but high blur_size (over around 5-ish) will produce artifacts. 56 | # if you want heavy blur, you need to up the blur_passes. 57 | # the more passes, the more you can up the blur_size without noticing artifacts. 58 | } 59 | shadow { 60 | render_power=2 61 | color=0x30101020 62 | } 63 | # screen_shader=/home/duckonaut/.config/hypr/bluefilter.glsl 64 | } 65 | 66 | # layerrule=blur,gtk-layer-shell 67 | layerrule=blur,swaync-control-center 68 | layerrule=xray 0,swaync-control-center 69 | layerrule=ignorezero,swaync-control-center 70 | layerrule=ignorezero,gtk-layer-shell 71 | 72 | bezier=overshot,0.05,0.9,0.1,1.1 73 | 74 | animations { 75 | enabled=1 76 | animation=windows,1,4,overshot 77 | animation=border,1,4,overshot 78 | animation=fade,1,4,default 79 | animation=workspaces,1,6,default 80 | } 81 | 82 | dwindle { 83 | pseudotile=true 84 | preserve_split=true 85 | } 86 | 87 | gesture = 3, horizontal, workspace 88 | 89 | misc { 90 | force_default_wallpaper=0 91 | focus_on_activate=true 92 | animate_manual_resizes=false 93 | animate_mouse_windowdragging=false 94 | } 95 | 96 | plugin { 97 | hyprload { 98 | debug = 1 99 | quiet = 0 100 | } 101 | 102 | split-monitor-workspaces { 103 | count = 10 104 | keep_focused = 1 105 | } 106 | 107 | borders-plus-plus { 108 | add_borders = 0 # 0 - 2 109 | col.border_1 = rgb(ffffff) # example col for border 1 110 | col.border_2 = rgb(2222ff) # example col for border 2 111 | } 112 | 113 | hyprbars { 114 | bar_text_font=Hack 115 | bar_text_size=13 116 | bar_text_color=rgba(ffffffee) 117 | bar_color=rgba(000000ee) 118 | } 119 | 120 | hyprlens { 121 | background=/home/duckonaut/Pictures/TiledGalaxy.png 122 | nearest=1 123 | tiled=1 124 | } 125 | } 126 | 127 | debug { 128 | manual_crash = 0 129 | disable_logs = false 130 | } 131 | 132 | # example window rules 133 | # for windows named/classed as abc and xyz 134 | #windowrule=move 69 420,abc 135 | #windowrule=size 420 69,abc 136 | #windowrule=tile,xyz 137 | #windowrule=float,abc 138 | #windowrule=pseudo,abc 139 | 140 | windowrulev2=float,title:^(dev:).* 141 | windowrulev2=float,title:^(greachermania).* 142 | windowrulev2=float,class:^(desmume).* 143 | 144 | 145 | # example binds 146 | bind=SUPER,Q,exec,firefox 147 | bind=SUPER,return,exec,RUST_BACKTRACE=1 alacritty --config-file ~/.config/alacritty/alacritty-awesome.toml -vv >> ~/.local/var/log/alacritty.log 2>&1 148 | bind=SUPERSHIFT,C,killactive, 149 | bind=SUPERSHIFT,Q,exit, 150 | bind=SUPER,E,exec,nautilus 151 | bind=SUPER,F,fullscreen,0 152 | bind=SUPER,V,togglefloating, 153 | bind=ALT,SPACE,exec,tofi-drun | xargs hyprctl dispatch exec -- 154 | 155 | bindm=SUPER,mouse:272,movewindow 156 | bindm=SUPER,mouse:273,resizewindow 157 | 158 | bind=SUPERSHIFT,left,resizeactive,-20 0 159 | bind=SUPERSHIFT,right,resizeactive,20 0 160 | bind=SUPERSHIFT,up,resizeactive,0 -20 161 | bind=SUPERSHIFT,down,resizeactive,0 20 162 | 163 | bind=SUPER,left,movefocus,l 164 | bind=SUPER,right,movefocus,r 165 | bind=SUPER,up,movefocus,u 166 | bind=SUPER,down,movefocus,d 167 | 168 | bind=SUPER,H,movefocus,l 169 | bind=SUPER,L,movefocus,r 170 | bind=SUPER,K,movefocus,u 171 | bind=SUPER,J,movefocus,d 172 | 173 | bind=SUPER,1,split-workspace,1 174 | bind=SUPER,2,split-workspace,2 175 | bind=SUPER,3,split-workspace,3 176 | bind=SUPER,4,split-workspace,4 177 | bind=SUPER,5,split-workspace,5 178 | bind=SUPER,6,split-workspace,6 179 | bind=SUPER,7,split-workspace,7 180 | bind=SUPER,8,split-workspace,8 181 | bind=SUPER,9,split-workspace,9 182 | bind=SUPER,0,split-workspace,10 183 | 184 | bind=SUPER,M,split-changemonitor,next 185 | 186 | bind=SUPERSHIFT,1,split-movetoworkspace,1 187 | bind=SUPERSHIFT,2,split-movetoworkspace,2 188 | bind=SUPERSHIFT,3,split-movetoworkspace,3 189 | bind=SUPERSHIFT,4,split-movetoworkspace,4 190 | bind=SUPERSHIFT,5,split-movetoworkspace,5 191 | bind=SUPERSHIFT,6,split-movetoworkspace,6 192 | bind=SUPERSHIFT,7,split-movetoworkspace,7 193 | bind=SUPERSHIFT,8,split-movetoworkspace,8 194 | bind=SUPERSHIFT,9,split-movetoworkspace,9 195 | bind=SUPERSHIFT,0,split-movetoworkspace,10 196 | 197 | bind=SUPERCONTROL,1,split-movetoworkspacesilent,1 198 | bind=SUPERCONTROL,2,split-movetoworkspacesilent,2 199 | bind=SUPERCONTROL,3,split-movetoworkspacesilent,3 200 | bind=SUPERCONTROL,4,split-movetoworkspacesilent,4 201 | bind=SUPERCONTROL,5,split-movetoworkspacesilent,5 202 | bind=SUPERCONTROL,6,split-movetoworkspacesilent,6 203 | bind=SUPERCONTROL,7,split-movetoworkspacesilent,7 204 | bind=SUPERCONTROL,8,split-movetoworkspacesilent,8 205 | bind=SUPERCONTROL,9,split-movetoworkspacesilent,9 206 | bind=SUPERCONTROL,0,split-movetoworkspacesilent,10 207 | 208 | bind=SUPER,mouse_up,workspace,m+1 209 | bind=SUPER,mouse_down,workspace,m-1 210 | 211 | bind=,XF86AudioPlay,exec,/home/duckonaut/.cargo/bin/multiplayerctl toggle 212 | bind=,XF86AudioStop,exec,/home/duckonaut/.cargo/bin/multiplayerctl switch 213 | bind=,XF86AudioPrev,exec,/home/duckonaut/.cargo/bin/multiplayerctl previous 214 | bind=,XF86AudioNext,exec,/home/duckonaut/.cargo/bin/multiplayerctl next 215 | bind=,XF86MonBrightnessUp,exec,brightnessctl set +10 216 | bind=,XF86MonBrightnessDown,exec,brightnessctl set 10- 217 | bind=,XF86AudioRaiseVolume,exec,pactl set-sink-volume @DEFAULT_SINK@ +5% 218 | bind=,XF86AudioLowerVolume,exec,pactl set-sink-volume @DEFAULT_SINK@ -5% 219 | 220 | bind=SUPERSHIFT,S,exec,grim -g "$(slurp)" -t png - | wl-copy 221 | bind=SUPERCONTROL,S,exec,grim -g "$(slurp)" -o $(xdg-user-dir PICTURES)/grim/$(date +%Y-%m-%d-%H-%M-%S).png 222 | bind=,print,exec,grim -t png - | wl-copy 223 | 224 | bind=SUPER,N,exec,swaync-client -t 225 | bind=SUPER,P,exec,eww open --toggle --screen "$(hyprctl monitors -j | jq -r '.[] | select(.focused) | .id')" powermenu 226 | bind=SUPER,Z,exec,$HOME/.config/hypr/scripts/zentoggle.sh 227 | 228 | # bind=SUPERSHIFT,R,hyprload,reload 229 | # bind=SUPERSHIFT,U,hyprload,update 230 | 231 | env=_JAVA_AWT_WM_NONEPARENTING,1 232 | env=XCURSOR_SIZE,24 233 | env=LIBVA_DRIVER_NAME,nvidia 234 | env=XDG_SESSION_TYPE,wayland 235 | #env=GB_BACKEND,nvidia-drm 236 | #env=__GLX_VENDOR_LIBRARY_NAME,nvidia 237 | #env=WLR_NO_HARDWARE_CURSORS,1 238 | env=QT_QPA_PLATFORMTHEME,qt5ct 239 | 240 | exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP 241 | exec-once=hyprpaper 242 | exec-once=swaync 243 | exec-once=$HOME/.config/eww/scripts/open.sh 244 | exec-once=systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP 245 | exec-once=lxpolkit 246 | # exec-once=$HOME/.local/share/hyprload/hyprload.sh 247 | exec-once=hyprpm reload 248 | # exec-once=hyprctl plugin load /home/duckonaut/repos/split-monitor-workspaces/split-monitor-workspaces.so 249 | 250 | -------------------------------------------------------------------------------- /picom/picom.conf: -------------------------------------------------------------------------------- 1 | ################################# 2 | # Shadows # 3 | ################################# 4 | 5 | 6 | # Enabled client-side shadows on windows. Note desktop windows 7 | # (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow, 8 | # unless explicitly requested using the wintypes option. 9 | # 10 | # shadow = false 11 | shadow = true; 12 | 13 | # The blur radius for shadows, in pixels. (defaults to 12) 14 | # shadow-radius = 12 15 | shadow-radius = 12; 16 | 17 | # The opacity of shadows. (0.0 - 1.0, defaults to 0.75) 18 | shadow-opacity = .5 19 | 20 | # The left offset for shadows, in pixels. (defaults to -15) 21 | # shadow-offset-x = -15 22 | shadow-offset-x = -10; 23 | 24 | # The top offset for shadows, in pixels. (defaults to -15) 25 | # shadow-offset-y = -15 26 | shadow-offset-y = -10; 27 | 28 | # Red color value of shadow (0.0 - 1.0, defaults to 0). 29 | # shadow-red = 0 30 | 31 | # Green color value of shadow (0.0 - 1.0, defaults to 0). 32 | # shadow-green = 0 33 | 34 | # Blue color value of shadow (0.0 - 1.0, defaults to 0). 35 | # shadow-blue = 0 36 | 37 | # Hex string color value of shadow (#000000 - #FFFFFF, defaults to #000000). This option will override options set shadow-(red/green/blue) 38 | # shadow-color = "#000000" 39 | 40 | # Specify a list of conditions of windows that should have no shadow. 41 | # 42 | # examples: 43 | # shadow-exclude = "n:e:Notification"; 44 | # 45 | # shadow-exclude = [] 46 | shadow-exclude = [ 47 | "name = 'Notification'", 48 | "class_g = 'Conky'", 49 | "class_g ?= 'Notify-osd'", 50 | "class_g = 'Cairo-clock'", 51 | "_GTK_FRAME_EXTENTS@:c", 52 | "_NET_WM_WINDOW_TYPE@:a *= 'NOTIFICATION'" 53 | ]; 54 | 55 | # Specify a list of conditions of windows that should have no shadow painted over, such as a dock window. 56 | # clip-shadow-above = [] 57 | 58 | # Specify a X geometry that describes the region in which shadow should not 59 | # be painted in, such as a dock window region. Use 60 | # shadow-exclude-reg = "x10+0+0" 61 | # for example, if the 10 pixels on the bottom of the screen should not have shadows painted on. 62 | # 63 | # shadow-exclude-reg = "" 64 | 65 | # Crop shadow of a window fully on a particular Xinerama screen to the screen. 66 | # xinerama-shadow-crop = false 67 | 68 | 69 | ################################# 70 | # Fading # 71 | ################################# 72 | 73 | 74 | # Fade windows in/out when opening/closing and when opacity changes, 75 | # unless no-fading-openclose is used. 76 | # fading = false 77 | fading = true; 78 | 79 | # Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028) 80 | # fade-in-step = 0.028 81 | fade-in-step = 0.03; 82 | 83 | # Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03) 84 | # fade-out-step = 0.03 85 | fade-out-step = 0.03; 86 | 87 | # The time between steps in fade step, in milliseconds. (> 0, defaults to 10) 88 | # fade-delta = 10 89 | 90 | # Specify a list of conditions of windows that should not be faded. 91 | # fade-exclude = [] 92 | 93 | # Do not fade on window open/close. 94 | # no-fading-openclose = false 95 | 96 | # Do not fade destroyed ARGB windows with WM frame. Workaround of bugs in Openbox, Fluxbox, etc. 97 | # no-fading-destroyed-argb = false 98 | 99 | 100 | ################################# 101 | # Transparency / Opacity # 102 | ################################# 103 | 104 | 105 | # Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0) 106 | # inactive-opacity = 1 107 | inactive-opacity = 1.0; 108 | 109 | # Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default) 110 | # frame-opacity = 1.0 111 | frame-opacity = 0.7; 112 | 113 | # Let inactive opacity set by -i override the '_NET_WM_WINDOW_OPACITY' values of windows. 114 | # inactive-opacity-override = true 115 | inactive-opacity-override = false; 116 | 117 | # Default opacity for active windows. (0.0 - 1.0, defaults to 1.0) 118 | # active-opacity = 1.0 119 | 120 | # Dim inactive windows. (0.0 - 1.0, defaults to 0.0) 121 | # inactive-dim = 0.0 122 | 123 | # Specify a list of conditions of windows that should never be considered focused. 124 | # focus-exclude = [] 125 | focus-exclude = [ "class_g = 'Cairo-clock'", "class_g = 'firefox'", "name ^= 'nvim'" ]; 126 | 127 | # Use fixed inactive dim value, instead of adjusting according to window opacity. 128 | # inactive-dim-fixed = 1.0 129 | 130 | # Specify a list of opacity rules, in the format `PERCENT:PATTERN`, 131 | # like `50:name *= "Firefox"`. picom-trans is recommended over this. 132 | # Note we don't make any guarantee about possible conflicts with other 133 | # programs that set '_NET_WM_WINDOW_OPACITY' on frame or client windows. 134 | # example: 135 | # opacity-rule = [ "80:class_g = 'URxvt'" ]; 136 | # 137 | # opacity-rule = ["100:class_g = 'Firefox'"]; 138 | 139 | 140 | ################################# 141 | # Corners # 142 | ################################# 143 | 144 | # Sets the radius of rounded window corners. When > 0, the compositor will 145 | # round the corners of windows. Does not interact well with 146 | # `transparent-clipping`. 147 | corner-radius = 8 148 | rounded-borders = 1 149 | 150 | # Exclude conditions for rounded corners. 151 | rounded-corners-exclude = [ 152 | "window_type = 'dock'", 153 | #"window_type = 'desktop'" 154 | ]; 155 | 156 | 157 | ################################# 158 | # Background-Blurring # 159 | ################################# 160 | 161 | 162 | # Parameters for background blurring, see the *BLUR* section for more information. 163 | blur-method = "gaussian" 164 | blur-size = 15 165 | # 166 | blur-deviation = 15 167 | # 168 | blur-strength = 5 169 | 170 | # Blur background of semi-transparent / ARGB windows. 171 | # Bad in performance, with driver-dependent behavior. 172 | # The name of the switch may change without prior notifications. 173 | # 174 | blur-background = true 175 | 176 | # Blur background of windows when the window frame is not opaque. 177 | # Implies: 178 | # blur-background 179 | # Bad in performance, with driver-dependent behavior. The name may change. 180 | # 181 | blur-background-frame = false 182 | 183 | 184 | # Use fixed blur strength rather than adjusting according to window opacity. 185 | # blur-background-fixed = false 186 | 187 | 188 | # Specify the blur convolution kernel, with the following format: 189 | # example: 190 | # blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1"; 191 | # 192 | # blur-kern = "" 193 | # blur-kern = "5x5box"; 194 | 195 | 196 | # Exclude conditions for background blur. 197 | # blur-background-exclude = [] 198 | blur-background-exclude = [ 199 | "window_type = 'dock'", 200 | "window_type = 'desktop'", 201 | "_GTK_FRAME_EXTENTS@:c" 202 | ]; 203 | 204 | ################################# 205 | # General Settings # 206 | ################################# 207 | 208 | # Enable remote control via D-Bus. See the man page for more details. 209 | # dbus = true 210 | 211 | # Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers. 212 | # daemon = false 213 | 214 | # Specify the backend to use: `xrender`, `glx`, or `xr_glx_hybrid`. 215 | # `xrender` is the default one. 216 | # 217 | # backend = "glx" 218 | backend = "glx"; 219 | 220 | # Enable/disable VSync. 221 | # vsync = false 222 | vsync = true; 223 | 224 | # Enable remote control via D-Bus. See the *D-BUS API* section below for more details. 225 | # dbus = false 226 | 227 | # Try to detect WM windows (a non-override-redirect window with no 228 | # child that has 'WM_STATE') and mark them as active. 229 | # 230 | # mark-wmwin-focused = false 231 | mark-wmwin-focused = true; 232 | 233 | # Mark override-redirect windows that doesn't have a child window with 'WM_STATE' focused. 234 | # mark-ovredir-focused = false 235 | mark-ovredir-focused = true; 236 | 237 | # Try to detect windows with rounded corners and don't consider them 238 | # shaped windows. The accuracy is not very high, unfortunately. 239 | # 240 | # detect-rounded-corners = false 241 | detect-rounded-corners = true; 242 | 243 | # Detect '_NET_WM_WINDOW_OPACITY' on client windows, useful for window managers 244 | # not passing '_NET_WM_WINDOW_OPACITY' of client windows to frame windows. 245 | # 246 | # detect-client-opacity = false 247 | detect-client-opacity = true; 248 | 249 | # Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window, 250 | # rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy, 251 | # provided that the WM supports it. 252 | # 253 | # use-ewmh-active-win = false 254 | 255 | # Unredirect all windows if a full-screen opaque window is detected, 256 | # to maximize performance for full-screen windows. Known to cause flickering 257 | # when redirecting/unredirecting windows. 258 | # 259 | # unredir-if-possible = false 260 | 261 | # Delay before unredirecting the window, in milliseconds. Defaults to 0. 262 | # unredir-if-possible-delay = 0 263 | 264 | # Conditions of windows that shouldn't be considered full-screen for unredirecting screen. 265 | # unredir-if-possible-exclude = [] 266 | 267 | # Use 'WM_TRANSIENT_FOR' to group windows, and consider windows 268 | # in the same group focused at the same time. 269 | # 270 | # detect-transient = false 271 | detect-transient = true; 272 | 273 | # Use 'WM_CLIENT_LEADER' to group windows, and consider windows in the same 274 | # group focused at the same time. This usually means windows from the same application 275 | # will be considered focused or unfocused at the same time. 276 | # 'WM_TRANSIENT_FOR' has higher priority if detect-transient is enabled, too. 277 | # 278 | # detect-client-leader = false 279 | 280 | # Resize damaged region by a specific number of pixels. 281 | # A positive value enlarges it while a negative one shrinks it. 282 | # If the value is positive, those additional pixels will not be actually painted 283 | # to screen, only used in blur calculation, and such. (Due to technical limitations, 284 | # with use-damage, those pixels will still be incorrectly painted to screen.) 285 | # Primarily used to fix the line corruption issues of blur, 286 | # in which case you should use the blur radius value here 287 | # (e.g. with a 3x3 kernel, you should use `--resize-damage 1`, 288 | # with a 5x5 one you use `--resize-damage 2`, and so on). 289 | # May or may not work with *--glx-no-stencil*. Shrinking doesn't function correctly. 290 | # 291 | # resize-damage = 1 292 | 293 | # Specify a list of conditions of windows that should be painted with inverted color. 294 | # Resource-hogging, and is not well tested. 295 | # 296 | # invert-color-include = [] 297 | 298 | # GLX backend: Avoid using stencil buffer, useful if you don't have a stencil buffer. 299 | # Might cause incorrect opacity when rendering transparent content (but never 300 | # practically happened) and may not work with blur-background. 301 | # My tests show a 15% performance boost. Recommended. 302 | # 303 | # glx-no-stencil = false 304 | 305 | # GLX backend: Avoid rebinding pixmap on window damage. 306 | # Probably could improve performance on rapid window content changes, 307 | # but is known to break things on some drivers (LLVMpipe, xf86-video-intel, etc.). 308 | # Recommended if it works. 309 | # 310 | # glx-no-rebind-pixmap = false 311 | 312 | # Disable the use of damage information. 313 | # This cause the whole screen to be redrawn everytime, instead of the part of the screen 314 | # has actually changed. Potentially degrades the performance, but might fix some artifacts. 315 | # The opposing option is use-damage 316 | # 317 | # no-use-damage = false 318 | use-damage = true; 319 | 320 | # Use X Sync fence to sync clients' draw calls, to make sure all draw 321 | # calls are finished before picom starts drawing. Needed on nvidia-drivers 322 | # with GLX backend for some users. 323 | # 324 | # xrender-sync-fence = false 325 | 326 | # GLX backend: Use specified GLSL fragment shader for rendering window contents. 327 | # See `compton-default-fshader-win.glsl` and `compton-fake-transparency-fshader-win.glsl` 328 | # in the source tree for examples. 329 | # 330 | # glx-fshader-win = "" 331 | 332 | # Force all windows to be painted with blending. Useful if you 333 | # have a glx-fshader-win that could turn opaque pixels transparent. 334 | # 335 | # force-win-blend = false 336 | 337 | # Do not use EWMH to detect fullscreen windows. 338 | # Reverts to checking if a window is fullscreen based only on its size and coordinates. 339 | # 340 | # no-ewmh-fullscreen = false 341 | 342 | # Dimming bright windows so their brightness doesn't exceed this set value. 343 | # Brightness of a window is estimated by averaging all pixels in the window, 344 | # so this could comes with a performance hit. 345 | # Setting this to 1.0 disables this behaviour. Requires --use-damage to be disabled. (default: 1.0) 346 | # 347 | # max-brightness = 1.0 348 | 349 | # Make transparent windows clip other windows like non-transparent windows do, 350 | # instead of blending on top of them. 351 | # 352 | # transparent-clipping = false 353 | 354 | # Set the log level. Possible values are: 355 | # "trace", "debug", "info", "warn", "error" 356 | # in increasing level of importance. Case doesn't matter. 357 | # If using the "TRACE" log level, it's better to log into a file 358 | # using *--log-file*, since it can generate a huge stream of logs. 359 | # 360 | # log-level = "debug" 361 | log-level = "warn"; 362 | 363 | # Set the log file. 364 | # If *--log-file* is never specified, logs will be written to stderr. 365 | # Otherwise, logs will to written to the given file, though some of the early 366 | # logs might still be written to the stderr. 367 | # When setting this option from the config file, it is recommended to use an absolute path. 368 | # 369 | # log-file = "/path/to/your/log/file" 370 | 371 | # Show all X errors (for debugging) 372 | # show-all-xerrors = false 373 | 374 | # Write process ID to a file. 375 | # write-pid-path = "/path/to/your/log/file" 376 | 377 | # Window type settings 378 | # 379 | # 'WINDOW_TYPE' is one of the 15 window types defined in EWMH standard: 380 | # "unknown", "desktop", "dock", "toolbar", "menu", "utility", 381 | # "splash", "dialog", "normal", "dropdown_menu", "popup_menu", 382 | # "tooltip", "notification", "combo", and "dnd". 383 | # 384 | # Following per window-type options are available: :: 385 | # 386 | # fade, shadow::: 387 | # Controls window-type-specific shadow and fade settings. 388 | # 389 | # opacity::: 390 | # Controls default opacity of the window type. 391 | # 392 | # focus::: 393 | # Controls whether the window of this type is to be always considered focused. 394 | # (By default, all window types except "normal" and "dialog" has this on.) 395 | # 396 | # full-shadow::: 397 | # Controls whether shadow is drawn under the parts of the window that you 398 | # normally won't be able to see. Useful when the window has parts of it 399 | # transparent, and you want shadows in those areas. 400 | # 401 | # clip-shadow-above::: 402 | # Controls wether shadows that would have been drawn above the window should 403 | # be clipped. Useful for dock windows that should have no shadow painted on top. 404 | # 405 | # redir-ignore::: 406 | # Controls whether this type of windows should cause screen to become 407 | # redirected again after been unredirected. If you have unredir-if-possible 408 | # set, and doesn't want certain window to cause unnecessary screen redirection, 409 | # you can set this to `true`. 410 | # 411 | wintypes: 412 | { 413 | tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; }; 414 | dock = { shadow = false; clip-shadow-above = true; } 415 | dnd = { shadow = false; } 416 | popup_menu = { opacity = 0.9; } 417 | dropdown_menu = { opacity = 0.9; shadow = false; full-shadow = false; } 418 | }; 419 | -------------------------------------------------------------------------------- /awesome/theming/theme.lua: -------------------------------------------------------------------------------- 1 | local gears = require("gears") 2 | local lain = require("lain") 3 | local awful = require("awful") 4 | local wibox = require("wibox") 5 | local dpi = require("beautiful.xresources").apply_dpi 6 | local naughty = require("naughty") 7 | 8 | local os = os 9 | local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility 10 | 11 | local highlight_col = "#61AFEF" 12 | local base_col = "#101020" 13 | local base_col_transluscent = "#10102090" 14 | 15 | local round_shape = function(cr, w, h) 16 | gears.shape.rounded_rect(cr, w, h, dpi(4)) 17 | end 18 | 19 | local theme = {} 20 | theme.dir = os.getenv("HOME") .. "/.config/awesome/theming" 21 | theme.wallpaper = os.getenv("HOME") .. "/Pictures/campsite.jpg" 22 | theme.font = "Hack Nerd Font 11" 23 | theme.fg_normal = "#ffffff" 24 | theme.fg_focus = base_col 25 | theme.fg_urgent = base_col 26 | theme.bg_normal = base_col 27 | theme.bg_focus = highlight_col 28 | theme.bg_urgent = "#ba6840" 29 | theme.clock_color = "#56b6c2" 30 | theme.mem_color = "#985fdd" 31 | theme.cpu_color = "#44b080" 32 | theme.temp_color = "#c13251" 33 | theme.bat_color = "#e5c07b" 34 | theme.net_color = highlight_col 35 | theme.music_color = "#98c379" 36 | theme.volume_color = "#aaddee" 37 | theme.network_color = "#61afef" 38 | theme.systray_color = "#2980b9" 39 | theme.border_width = dpi(2) 40 | theme.border_normal = theme.bg_normal 41 | theme.border_focus = theme.bg_focus 42 | theme.border_marked = theme.bg_urgent 43 | theme.tasklist_bg_focus = "#395fdc" 44 | theme.titlebar_bg_focus = theme.bg_focus 45 | theme.titlebar_bg_normal = theme.bg_normal 46 | theme.titlebar_fg_focus = theme.fg_focus 47 | theme.bg_systray = theme.systray_color 48 | theme.menu_height = dpi(24) 49 | theme.menu_width = dpi(160) 50 | theme.taglist_bg_empty = "#00000000" 51 | theme.taglist_bg_occupied = "#395fdc" 52 | theme.taglist_fg_occupied = base_col 53 | theme.taglist_bg_focus = theme.bg_focus 54 | theme.menu_submenu_icon = theme.dir .. "/icons/submenu.png" 55 | theme.taglist_squares_sel = theme.dir .. "/icons/square_sel.png" 56 | theme.taglist_squares_unsel = theme.dir .. "/icons/square_unsel.png" 57 | theme.layout_tile = theme.dir .. "/icons/tile.png" 58 | theme.layout_tileleft = theme.dir .. "/icons/tileleft.png" 59 | theme.layout_tilebottom = theme.dir .. "/icons/tilebottom.png" 60 | theme.layout_tiletop = theme.dir .. "/icons/tiletop.png" 61 | theme.layout_fairv = theme.dir .. "/icons/fairv.png" 62 | theme.layout_fairh = theme.dir .. "/icons/fairh.png" 63 | theme.layout_spiral = theme.dir .. "/icons/spiral.png" 64 | theme.layout_dwindle = theme.dir .. "/icons/dwindle.png" 65 | theme.layout_max = theme.dir .. "/icons/max.png" 66 | theme.layout_fullscreen = theme.dir .. "/icons/fullscreen.png" 67 | theme.layout_magnifier = theme.dir .. "/icons/magnifier.png" 68 | theme.layout_floating = theme.dir .. "/icons/floating.png" 69 | theme.widget_ac = theme.dir .. "/icons/ac.png" 70 | theme.widget_battery = theme.dir .. "/icons/battery.png" 71 | theme.widget_battery_low = theme.dir .. "/icons/battery_low.png" 72 | theme.widget_battery_empty = theme.dir .. "/icons/battery_empty.png" 73 | theme.widget_mem = theme.dir .. "/icons/mem.png" 74 | theme.widget_cpu = theme.dir .. "/icons/cpu.png" 75 | theme.widget_temp = theme.dir .. "/icons/temp.png" 76 | theme.widget_net = theme.dir .. "/icons/net.png" 77 | theme.widget_net_up = theme.dir .. "/icons/net_up.png" 78 | theme.widget_net_updown = theme.dir .. "/icons/net_updown.png" 79 | theme.widget_net_down = theme.dir .. "/icons/net_down.png" 80 | theme.widget_hdd = theme.dir .. "/icons/hdd.png" 81 | theme.widget_music = theme.dir .. "/icons/note.png" 82 | theme.widget_music_off = theme.dir .. "/icons/note_off.png" 83 | theme.widget_music_paused = theme.dir .. "/icons/paused.png" 84 | theme.widget_vol = theme.dir .. "/icons/vol.png" 85 | theme.widget_vol_low = theme.dir .. "/icons/vol_low.png" 86 | theme.widget_vol_no = theme.dir .. "/icons/vol_no.png" 87 | theme.widget_vol_mute = theme.dir .. "/icons/vol_mute.png" 88 | theme.widget_mail = theme.dir .. "/icons/mail.png" 89 | theme.widget_mail_on = theme.dir .. "/icons/mail_on.png" 90 | theme.tasklist_plain_task_name = true 91 | theme.tasklist_bg_focus = "#d19953" 92 | theme.tasklist_disable_icon = true 93 | theme.useless_gap = dpi(4) 94 | theme.titlebar_close_button_focus = theme.dir .. "/icons/titlebar/close_focus.png" 95 | theme.titlebar_close_button_normal = theme.dir .. "/icons/titlebar/close_normal.png" 96 | theme.titlebar_ontop_button_focus_active = theme.dir .. "/icons/titlebar/ontop_focus_active.png" 97 | theme.titlebar_ontop_button_normal_active = theme.dir .. "/icons/titlebar/ontop_normal_active.png" 98 | theme.titlebar_ontop_button_focus_inactive = theme.dir .. "/icons/titlebar/ontop_focus_inactive.png" 99 | theme.titlebar_ontop_button_normal_inactive = theme.dir .. "/icons/titlebar/ontop_normal_inactive.png" 100 | theme.titlebar_sticky_button_focus_active = theme.dir .. "/icons/titlebar/sticky_focus_active.png" 101 | theme.titlebar_sticky_button_normal_active = theme.dir .. "/icons/titlebar/sticky_normal_active.png" 102 | theme.titlebar_sticky_button_focus_inactive = theme.dir .. "/icons/titlebar/sticky_focus_inactive.png" 103 | theme.titlebar_sticky_button_normal_inactive = theme.dir .. "/icons/titlebar/sticky_normal_inactive.png" 104 | theme.titlebar_floating_button_focus_active = theme.dir .. "/icons/titlebar/floating_focus_active.png" 105 | theme.titlebar_floating_button_normal_active = theme.dir .. "/icons/titlebar/floating_normal_active.png" 106 | theme.titlebar_floating_button_focus_inactive = theme.dir .. "/icons/titlebar/floating_focus_inactive.png" 107 | theme.titlebar_floating_button_normal_inactive = theme.dir .. "/icons/titlebar/floating_normal_inactive.png" 108 | theme.titlebar_maximized_button_focus_active = theme.dir .. "/icons/titlebar/maximized_focus_active.png" 109 | theme.titlebar_maximized_button_normal_active = theme.dir .. "/icons/titlebar/maximized_normal_active.png" 110 | theme.titlebar_maximized_button_focus_inactive = theme.dir .. "/icons/titlebar/maximized_focus_inactive.png" 111 | theme.titlebar_maximized_button_normal_inactive = theme.dir .. "/icons/titlebar/maximized_normal_inactive.png" 112 | 113 | theme.notification_font = "Hack Nerd Font 12" 114 | theme.notification_shape = function(cr, w, h) 115 | gears.shape.rounded_rect(cr, w, h, dpi(12)) 116 | end 117 | theme.notification_border_color = theme.bg_focus 118 | theme.notification_border_width = dpi(20) 119 | theme.notification_margin = dpi(30) 120 | 121 | theme.notification_max_width = dpi(500) 122 | theme.notification_max_height = dpi(160) 123 | theme.notification_icon_resize_strategy = "scale" 124 | 125 | local markup = lain.util.markup 126 | 127 | local block = function(widgets, color) 128 | return wibox.container.margin( 129 | wibox.container.background( 130 | wibox.container.margin( 131 | wibox.widget(widgets), 132 | dpi(2), dpi(6), dpi(2), dpi(2) 133 | ), 134 | color, round_shape), 135 | dpi(4), dpi(0), dpi(4), dpi(4)) 136 | end 137 | 138 | -- Textclock 139 | local clocktext = awful.widget.watch( 140 | "date +' %R'", 60, 141 | function(widget, stdout) 142 | widget:set_markup(" " .. markup.font(theme.font, markup.fg.color(base_col, stdout))) 143 | end 144 | ) 145 | 146 | local clock = block({ 147 | clocktext, 148 | layout = wibox.layout.align.horizontal 149 | }, 150 | theme.clock_color) 151 | 152 | -- Calendar 153 | theme.cal = lain.widget.cal({ 154 | attach_to = { clock }, 155 | notification_preset = { 156 | font = "Hack Nerd Font 10", 157 | fg = theme.fg_normal, 158 | bg = base_col 159 | } 160 | }) 161 | 162 | -- MEM 163 | local memicon = wibox.widget.imagebox(theme.widget_mem) 164 | local memtext = lain.widget.mem({ 165 | settings = function() 166 | widget:set_markup(" " .. markup.font(theme.font, markup.fg.color(base_col, " " .. mem_now.used .. "MB"))) 167 | end 168 | }) 169 | local mem = block({ 170 | --memicon, 171 | memtext, 172 | layout = wibox.layout.align.horizontal 173 | }, 174 | theme.mem_color) 175 | 176 | -- CPU 177 | local cpuicon = wibox.widget.imagebox(theme.widget_cpu) 178 | local cputext = lain.widget.cpu({ 179 | settings = function() 180 | widget:set_markup(" " .. markup.font(theme.font, markup.fg.color(base_col, " " .. cpu_now.usage .. "%"))) 181 | end 182 | }) 183 | 184 | local cpu = block({ 185 | --cpuicon, 186 | cputext, 187 | layout = wibox.layout.align.horizontal 188 | }, 189 | theme.cpu_color) 190 | 191 | 192 | -- Coretemp 193 | local tempicon = wibox.widget.imagebox(theme.widget_temp) 194 | local temptext = awful.widget.watch( 195 | "cat /sys/class/thermal/thermal_zone9/temp", 10, 196 | function(widget, stdout) 197 | local tmp = string.sub(stdout, 1, -2) 198 | tmp = tonumber(tmp) / 1000 199 | tmp = string.format("%.1f", tmp) 200 | widget:set_markup(" " .. markup.font(theme.font, markup.fg.color(base_col, " " .. tmp .. "°C"))) 201 | end 202 | ) 203 | 204 | local temp = block({ 205 | --tempicon, 206 | temptext, 207 | layout = wibox.layout.align.horizontal 208 | }, 209 | theme.temp_color) 210 | 211 | 212 | -- Battery 213 | local baticon = wibox.widget.imagebox(theme.widget_battery) 214 | local battext = awful.widget.watch( 215 | "cat /sys/class/power_supply/BAT0/capacity", 20, 216 | function(widget, stdout) 217 | widget:set_markup(" " .. 218 | markup.font(theme.font, markup.fg.color(base_col, " " .. string.sub(stdout, 1, -2) .. "%"))) 219 | end 220 | ) 221 | 222 | local bat = block({ 223 | --baticon, 224 | battext, 225 | layout = wibox.layout.align.horizontal 226 | }, 227 | theme.bat_color) 228 | 229 | -- Music 230 | local musicicon = wibox.widget.imagebox(theme.widget_music) 231 | local musictext = awful.widget.watch( 232 | 'multiplayerctl metadata --format="{{artist}} :=:{{title}}:=:{{status}}"', 10, 233 | function(widget, stdout) 234 | local out = string.sub(stdout, 1, -2) 235 | 236 | local artist, title, status = string.match(out, "(.*):=:(.*):=:(.*)") 237 | 238 | if stdout == nil or 239 | artist == '' or 240 | artist == nil or 241 | status == '' or 242 | status == nil 243 | then 244 | musicicon.image = nil 245 | widget:set_markup("") 246 | else 247 | local text = artist 248 | if title ~= nil then 249 | text = text .. "- " .. title 250 | end 251 | 252 | widget:set_markup(" " .. markup.font(theme.font, markup.fg.color(base_col, text))) 253 | 254 | if status == "Playing" then 255 | musicicon.image = theme.widget_music 256 | elseif status == "Paused" then 257 | musicicon.image = theme.widget_music_paused 258 | else 259 | musicicon.image = nil 260 | end 261 | end 262 | end 263 | ) 264 | 265 | function theme.update_music(command) 266 | awful.spawn.easy_async_with_shell( 267 | command .. '&& sleep 0.2 && multiplayerctl metadata --format="{{artist}} :=:{{title}}:=:{{status}}"', 268 | function(stdout) 269 | local out = string.sub(stdout, 1, -2) 270 | 271 | local artist, title, status = string.match(out, "(.*):=:(.*):=:(.*)") 272 | 273 | if stdout == nil or 274 | artist == '' or 275 | artist == nil or 276 | status == '' or 277 | status == nil 278 | then 279 | musicicon.image = nil 280 | musictext:set_markup("") 281 | else 282 | local text = artist 283 | if title ~= nil then 284 | text = text .. "- " .. title 285 | end 286 | 287 | musictext:set_markup(" " .. markup.font(theme.font, markup.fg.color(base_col, text))) 288 | 289 | if status == "Playing" then 290 | musicicon.image = theme.widget_music 291 | elseif status == "Paused" then 292 | musicicon.image = theme.widget_music_paused 293 | else 294 | musicicon.image = nil 295 | end 296 | end 297 | end 298 | ) 299 | end 300 | 301 | local music = block({ 302 | musicicon, 303 | musictext, 304 | layout = wibox.layout.align.horizontal 305 | }, 306 | theme.music_color) 307 | 308 | local function go_to_player() 309 | awful.spawn.easy_async_with_shell( 310 | 'cat ' .. (os.getenv("XDG_CACHE_HOME") or (os.getenv("HOME") .. '/.cache')) .. '/multiplayerctl/currentplayer', 311 | function(stdout) 312 | local player = string.sub(stdout, 1, -2) 313 | 314 | local lower_player = string.lower(player) 315 | 316 | for _, c in ipairs(client.get()) do 317 | if string.lower(c.class) == lower_player then 318 | c.minimized = false 319 | c:raise() 320 | c:jump_to(false) 321 | break 322 | end 323 | end 324 | end) 325 | end 326 | 327 | music:buttons(my_table.join( 328 | awful.button({}, 1, 329 | function() 330 | theme.update_music('multiplayerctl toggle') 331 | end 332 | ), 333 | awful.button({}, 2, 334 | go_to_player 335 | ), 336 | awful.button({}, 3, 337 | function() 338 | theme.update_music('multiplayerctl switch') 339 | end 340 | ), 341 | awful.button({}, 4, 342 | function() 343 | theme.update_music('multiplayerctl switch --back') 344 | end 345 | ), 346 | awful.button({}, 5, 347 | function() 348 | theme.update_music('multiplayerctl switch --next') 349 | end 350 | ) 351 | )) 352 | 353 | local volumetext = lain.widget.alsa({ 354 | settings = function() 355 | local volicon = " " 356 | if volume_now.status == "off" then 357 | volicon = " " 358 | elseif tonumber(volume_now.level) == 0 then 359 | volicon = " " 360 | elseif tonumber(volume_now.level) <= 50 then 361 | volicon = " " 362 | else 363 | volicon = " " 364 | end 365 | 366 | widget:set_markup(" " .. markup.font(theme.font, markup.fg.color(base_col, volicon .. volume_now.level .. "%"))) 367 | end 368 | }) 369 | 370 | local volume = block({ 371 | --volumeicon, 372 | volumetext, 373 | layout = wibox.layout.align.horizontal 374 | }, 375 | theme.volume_color) 376 | 377 | -- {{ systray 378 | local systray_proto = wibox.widget.systray() 379 | 380 | local systray = wibox.container.margin( 381 | wibox.container.background( 382 | wibox.container.margin( 383 | systray_proto, 384 | dpi(2), dpi(2), dpi(2), dpi(2) 385 | ), 386 | theme.systray_color, round_shape), 387 | dpi(4), dpi(0), dpi(4), dpi(4)) 388 | -- }} 389 | 390 | -- Separators 391 | local spr = wibox.widget.textbox(' ') 392 | 393 | function theme.at_screen_connect(s) 394 | -- If wallpaper is a function, call it with the screen 395 | local wallpaper = theme.wallpaper 396 | if type(wallpaper) == "function" then 397 | wallpaper = wallpaper(s) 398 | end 399 | gears.wallpaper.maximized(wallpaper, s, true) 400 | 401 | -- Tags 402 | awful.tag(awful.util.tagnames, s, awful.layout.layouts) 403 | 404 | -- Create a promptbox for each screen 405 | s.mypromptbox = awful.widget.prompt() 406 | -- Create an imagebox widget which will contains an icon indicating which layout we're using. 407 | -- We need one layoutbox per screen. 408 | s.mylayoutbox = awful.widget.layoutbox(s) 409 | s.mylayoutbox:buttons(my_table.join( 410 | awful.button({}, 1, function() awful.layout.inc(1) end), 411 | awful.button({}, 2, function() awful.layout.set(awful.layout.layouts[1]) end), 412 | awful.button({}, 3, function() awful.layout.inc(-1) end), 413 | awful.button({}, 4, function() awful.layout.inc(1) end), 414 | awful.button({}, 5, function() awful.layout.inc(-1) end))) 415 | 416 | -- Create a taglist widget 417 | s.mytaglist = awful.widget.taglist { 418 | screen = s, 419 | filter = awful.widget.taglist.filter.all, 420 | buttons = awful.util.taglist_buttons, 421 | style = { 422 | shape = round_shape, 423 | }, 424 | layout = { 425 | spacing = 3, 426 | layout = wibox.layout.fixed.horizontal 427 | }, 428 | widget_template = { 429 | layout = wibox.layout.fixed.horizontal, 430 | widget = wibox.container.margin, 431 | { 432 | widget = wibox.container.background, 433 | id = 'background_role', 434 | bg = theme.bg_normal, 435 | { 436 | widget = wibox.container.margin, 437 | left = 4, 438 | right = 1, 439 | top = 4, 440 | bottom = 4, 441 | { 442 | id = 'text_role', 443 | widget = wibox.widget.textbox, 444 | bg = theme.bg_focus, 445 | }, 446 | }, 447 | }, 448 | }, 449 | } 450 | 451 | s.mytaglist = wibox.container.margin(s.mytaglist, dpi(4), dpi(4), dpi(4), dpi(4)) 452 | 453 | -- Create a tasklist widget 454 | s.mytasklist = awful.widget.tasklist { 455 | screen = s, 456 | filter = awful.widget.tasklist.filter.currenttags, 457 | buttons = awful.util.tasklist_buttons, 458 | style = { 459 | shape = round_shape, 460 | }, 461 | layout = { 462 | spacing = 4, 463 | layout = wibox.layout.fixed.horizontal 464 | }, 465 | widget_template = { 466 | layout = wibox.layout.flex.horizontal, 467 | margins = 4, 468 | widget = wibox.container.margin, 469 | { 470 | id = 'background_role', 471 | widget = wibox.container.background, 472 | { 473 | widget = wibox.container.margin, 474 | margins = 4, 475 | { 476 | id = 'text_role', 477 | widget = wibox.widget.textbox, 478 | bg = theme.bg_focus, 479 | }, 480 | }, 481 | }, 482 | } 483 | } 484 | 485 | s.mytasklist = wibox.container.margin(s.mytasklist, dpi(4), dpi(4), dpi(4), dpi(4)) 486 | 487 | -- Create the wibox 488 | s.mywibox = awful.wibar({ 489 | screen = s, 490 | height = dpi(40), 491 | bg = '#00000000', 492 | fg = theme.fg_normal, 493 | shape = function(cr, w, h) 494 | gears.shape.rounded_rect(cr, w, h, dpi(12)) 495 | end 496 | }) 497 | 498 | -- Add widgets to the wibox 499 | s.mywibox:setup { 500 | widget = wibox.container.margin, 501 | left = dpi(8), 502 | right = dpi(8), 503 | top = dpi(8), 504 | bottom = dpi(0), 505 | { 506 | widget = wibox.container.background, 507 | bg = base_col_transluscent, 508 | shape = function(cr, w, h) 509 | gears.shape.rounded_rect(cr, w, h, dpi(6)) 510 | end, 511 | { 512 | layout = wibox.layout.align.horizontal, 513 | { -- Left widgets 514 | layout = wibox.layout.fixed.horizontal, 515 | --spr, 516 | s.mytaglist, 517 | s.mypromptbox, 518 | }, 519 | -- s.mytasklist, -- Middle widget 520 | spr, 521 | { -- Right widgets 522 | layout = wibox.layout.fixed.horizontal, 523 | systray, 524 | music, 525 | volume, 526 | cpu, 527 | mem, 528 | temp, 529 | bat, 530 | clock, 531 | s.mylayoutbox, 532 | }, 533 | } 534 | } 535 | } 536 | end 537 | 538 | return theme 539 | -------------------------------------------------------------------------------- /awesome/rc.lua: -------------------------------------------------------------------------------- 1 | -- {{{ Required libraries 2 | 3 | -- If LuaRocks is installed, make sure that packages installed through it are 4 | -- found (e.g. lgi). If LuaRocks is not installed, do nothing. 5 | pcall(require, "luarocks.loader") 6 | 7 | local gears = require("gears") 8 | local awful = require("awful") 9 | require("awful.autofocus") 10 | local wibox = require("wibox") 11 | local beautiful = require("beautiful") 12 | local naughty = require("naughty") 13 | local lain = require("lain") 14 | local menubar = require("menubar") 15 | local freedesktop = require("freedesktop") 16 | local hotkeys_popup = require("awful.hotkeys_popup") 17 | require("awful.hotkeys_popup.keys") 18 | local mytable = awful.util.table or gears.table -- 4.{0,1} compatibility 19 | 20 | local dpi = require("beautiful.xresources").apply_dpi 21 | 22 | naughty.config.padding = dpi(12) 23 | naughty.config.spacing = dpi(8) 24 | naughty.config.defaults.border_width = dpi(3) 25 | naughty.config.defaults.margin = dpi(8) 26 | 27 | -- }}} 28 | 29 | -- {{{ Error handling 30 | 31 | -- Check if awesome encountered an error during startup and fell back to 32 | -- another config (This code will only ever execute for the fallback config) 33 | if awesome.startup_errors then 34 | naughty.notify { 35 | preset = naughty.config.presets.critical, 36 | title = "Oops, there were errors during startup!", 37 | text = awesome.startup_errors 38 | } 39 | end 40 | 41 | -- Handle runtime errors after startup 42 | do 43 | local in_error = false 44 | 45 | awesome.connect_signal("debug::error", function(err) 46 | if in_error then return end 47 | 48 | in_error = true 49 | 50 | naughty.notify { 51 | preset = naughty.config.presets.critical, 52 | title = "Oops, an error happened!", 53 | text = tostring(err) 54 | } 55 | 56 | in_error = false 57 | end) 58 | end 59 | 60 | -- }}} 61 | 62 | -- {{{ Autostart windowless processes 63 | 64 | -- This function will run once every time Awesome is started 65 | local function run_once(cmd_arr) 66 | for _, cmd in ipairs(cmd_arr) do 67 | awful.spawn.with_shell(string.format("pgrep -u $USER -fx '%s' > /dev/null || (%s)", cmd, cmd)) 68 | end 69 | end 70 | 71 | run_once({ 72 | -- os.getenv("HOME") .. "/.screenlayout/hdmi-top.sh", 73 | "picom --experimental-backend --config ~/repos/dotfiles/picom/picom.conf", 74 | "setxkbmap pl", 75 | }) -- comma-separated entries 76 | 77 | -- {{{ Variable definitions 78 | 79 | local chosen_theme = "theming" 80 | local modkey = "Mod4" 81 | local altkey = "Mod1" 82 | local terminal = "alacritty --config-file " .. os.getenv("HOME") .. "/.config/alacritty/alacritty-awesome.yml" 83 | local vi_focus = false -- vi-like client focus https://github.com/lcpz/awesome-copycats/issues/275 84 | local cycle_prev = true -- cycle with only the previously focused client or all https://github.com/lcpz/awesome-copycats/issues/274 85 | local editor = os.getenv("EDITOR") or "nvim" 86 | local browser = "firefox" 87 | 88 | awful.util.terminal = terminal 89 | awful.util.tagnames = { " ", " ", " ", " ", " " } 90 | awful.layout.layouts = { 91 | awful.layout.suit.tile, 92 | awful.layout.suit.tile.left, 93 | --awful.layout.suit.tile.bottom, 94 | awful.layout.suit.tile.top, 95 | awful.layout.suit.fair, 96 | awful.layout.suit.fair.horizontal, 97 | awful.layout.suit.spiral, 98 | --awful.layout.suit.spiral.dwindle, 99 | awful.layout.suit.floating, 100 | awful.layout.suit.max, 101 | awful.layout.suit.max.fullscreen, 102 | --awful.layout.suit.magnifier, 103 | --awful.layout.suit.corner.nw, 104 | --awful.layout.suit.corner.ne, 105 | --awful.layout.suit.corner.sw, 106 | --awful.layout.suit.corner.se, 107 | --lain.layout.cascade, 108 | --lain.layout.cascade.tile, 109 | --lain.layout.centerwork, 110 | --lain.layout.centerwork.horizontal, 111 | --lain.layout.termfair, 112 | --lain.layout.termfair.center 113 | } 114 | 115 | lain.layout.termfair.nmaster = 3 116 | lain.layout.termfair.ncol = 1 117 | lain.layout.termfair.center.nmaster = 3 118 | lain.layout.termfair.center.ncol = 1 119 | lain.layout.cascade.tile.offset_x = 2 120 | lain.layout.cascade.tile.offset_y = 32 121 | lain.layout.cascade.tile.extra_padding = 5 122 | lain.layout.cascade.tile.nmaster = 5 123 | lain.layout.cascade.tile.ncol = 2 124 | 125 | awful.util.taglist_buttons = mytable.join( 126 | awful.button({}, 1, function(t) t:view_only() end), 127 | awful.button({ modkey }, 1, function(t) 128 | if client.focus then client.focus:move_to_tag(t) end 129 | end), 130 | awful.button({}, 3, awful.tag.viewtoggle), 131 | awful.button({ modkey }, 3, function(t) 132 | if client.focus then client.focus:toggle_tag(t) end 133 | end), 134 | awful.button({}, 4, function(t) awful.tag.viewnext(t.screen) end), 135 | awful.button({}, 5, function(t) awful.tag.viewprev(t.screen) end) 136 | ) 137 | 138 | awful.util.tasklist_buttons = mytable.join( 139 | awful.button({}, 1, function(c) 140 | if c == client.focus then 141 | c.minimized = true 142 | else 143 | c:emit_signal("request::activate", "tasklist", { raise = true }) 144 | end 145 | end), 146 | awful.button({}, 3, function() 147 | awful.menu.client_list({ theme = { width = 250 } }) 148 | end), 149 | awful.button({}, 4, function() awful.client.focus.byidx(1) end), 150 | awful.button({}, 5, function() awful.client.focus.byidx(-1) end) 151 | ) 152 | 153 | beautiful.init(string.format("%s/.config/awesome/%s/theme.lua", os.getenv("HOME"), chosen_theme)) 154 | 155 | -- }}} 156 | 157 | -- {{{ Menu 158 | 159 | -- Create a launcher widget and a main menu 160 | local myawesomemenu = { 161 | { "Hotkeys", function() hotkeys_popup.show_help(nil, awful.screen.focused()) end }, 162 | { "Manual", string.format("%s -e man awesome", terminal) }, 163 | { "Edit config", string.format("%s -e %s %s", terminal, editor, awesome.conffile) }, 164 | { "Restart", awesome.restart }, 165 | { "Quit", function() awesome.quit() end }, 166 | } 167 | 168 | awful.util.mymainmenu = freedesktop.menu.build { 169 | before = { 170 | { "Awesome", myawesomemenu, beautiful.awesome_icon }, 171 | -- other triads can be put here 172 | }, 173 | after = { 174 | { "Open terminal", terminal }, 175 | -- other triads can be put here 176 | } 177 | } 178 | 179 | -- Hide the menu when the mouse leaves it 180 | awful.util.mymainmenu.wibox:connect_signal("mouse::leave", function() 181 | if not awful.util.mymainmenu.active_child or 182 | (awful.util.mymainmenu.wibox ~= mouse.current_wibox and 183 | awful.util.mymainmenu.active_child.wibox ~= mouse.current_wibox) then 184 | awful.util.mymainmenu:hide() 185 | else 186 | awful.util.mymainmenu.active_child.wibox:connect_signal("mouse::leave", 187 | function() 188 | if awful.util.mymainmenu.wibox ~= mouse.current_wibox then 189 | awful.util.mymainmenu:hide() 190 | end 191 | end) 192 | end 193 | end) 194 | 195 | -- Set the Menubar terminal for applications that require it 196 | menubar.utils.terminal = terminal 197 | 198 | -- }}} 199 | 200 | -- {{{ Screen 201 | 202 | -- Re-set wallpaper when a screen's geometry changes (e.g. different resolution) 203 | screen.connect_signal("property::geometry", function(s) 204 | -- Wallpaper 205 | if beautiful.wallpaper then 206 | local wallpaper = beautiful.wallpaper 207 | -- If wallpaper is a function, call it with the screen 208 | if type(wallpaper) == "function" then 209 | wallpaper = wallpaper(s) 210 | end 211 | gears.wallpaper.maximized(wallpaper, s, true) 212 | end 213 | end) 214 | 215 | -- No borders when rearranging only 1 non-floating or maximized client 216 | screen.connect_signal("arrange", function(s) 217 | local only_one = #s.tiled_clients == 1 218 | for _, c in pairs(s.clients) do 219 | if only_one and not c.floating or c.maximized or c.fullscreen then 220 | c.border_width = 0 221 | else 222 | c.border_width = beautiful.border_width 223 | end 224 | end 225 | end) 226 | 227 | -- Create a wibox for each screen and add it 228 | awful.screen.connect_for_each_screen(function(s) beautiful.at_screen_connect(s) end) 229 | 230 | -- }}} 231 | 232 | -- {{{ Mouse bindings 233 | 234 | root.buttons(mytable.join( 235 | awful.button({}, 3, function() awful.util.mymainmenu:toggle() end), 236 | awful.button({}, 4, awful.tag.viewprev), 237 | awful.button({}, 5, awful.tag.viewnext) 238 | )) 239 | 240 | -- }}} 241 | 242 | -- {{{ Key bindings 243 | 244 | globalkeys = mytable.join( 245 | -- Destroy all notifications 246 | awful.key({ "Control", }, "space", function() naughty.destroy_all_notifications() end, 247 | { description = "destroy all notifications", group = "hotkeys" }), 248 | -- Take a screenshot 249 | -- https://github.com/lcpz/dots/blob/master/bin/screenshot 250 | awful.key({ altkey }, "p", function() os.execute("screenshot") end, 251 | { description = "take a screenshot", group = "hotkeys" }), 252 | 253 | -- X screen locker 254 | awful.key({ altkey, "Control" }, "l", function() os.execute(scrlocker) end, 255 | { description = "lock screen", group = "hotkeys" }), 256 | 257 | -- Show help 258 | awful.key({ modkey, }, "s", hotkeys_popup.show_help, 259 | { description = "show help", group = "awesome" }), 260 | 261 | -- Tag browsing 262 | awful.key({ modkey, }, "Left", awful.tag.viewprev, 263 | { description = "view previous", group = "tag" }), 264 | awful.key({ modkey, }, "Right", awful.tag.viewnext, 265 | { description = "view next", group = "tag" }), 266 | awful.key({ modkey, }, "Escape", awful.tag.history.restore, 267 | { description = "go back", group = "tag" }), 268 | 269 | -- Non-empty tag browsing 270 | awful.key({ altkey }, "Left", function() lain.util.tag_view_nonempty(-1) end, 271 | { description = "view previous nonempty", group = "tag" }), 272 | awful.key({ altkey }, "Right", function() lain.util.tag_view_nonempty(1) end, 273 | { description = "view previous nonempty", group = "tag" }), 274 | 275 | -- Default client focus 276 | awful.key({ altkey, }, "j", 277 | function() 278 | awful.client.focus.byidx(1) 279 | end, 280 | { description = "focus next by index", group = "client" } 281 | ), 282 | awful.key({ altkey, }, "k", 283 | function() 284 | awful.client.focus.byidx(-1) 285 | end, 286 | { description = "focus previous by index", group = "client" } 287 | ), 288 | 289 | -- By-direction client focus 290 | awful.key({ modkey }, "j", 291 | function() 292 | awful.client.focus.global_bydirection("down") 293 | if client.focus then client.focus:raise() end 294 | end, 295 | { description = "focus down", group = "client" }), 296 | awful.key({ modkey }, "k", 297 | function() 298 | awful.client.focus.global_bydirection("up") 299 | if client.focus then client.focus:raise() end 300 | end, 301 | { description = "focus up", group = "client" }), 302 | awful.key({ modkey }, "h", 303 | function() 304 | awful.client.focus.global_bydirection("left") 305 | if client.focus then client.focus:raise() end 306 | end, 307 | { description = "focus left", group = "client" }), 308 | awful.key({ modkey }, "l", 309 | function() 310 | awful.client.focus.global_bydirection("right") 311 | if client.focus then client.focus:raise() end 312 | end, 313 | { description = "focus right", group = "client" }), 314 | 315 | -- Menu 316 | awful.key({ modkey, }, "w", function() awful.util.mymainmenu:show() end, 317 | { description = "show main menu", group = "awesome" }), 318 | 319 | -- Layout manipulation 320 | awful.key({ modkey, "Shift" }, "j", function() awful.client.swap.byidx(1) end, 321 | { description = "swap with next client by index", group = "client" }), 322 | awful.key({ modkey, "Shift" }, "k", function() awful.client.swap.byidx(-1) end, 323 | { description = "swap with previous client by index", group = "client" }), 324 | awful.key({ modkey, "Control" }, "j", function() awful.screen.focus_relative(1) end, 325 | { description = "focus the next screen", group = "screen" }), 326 | awful.key({ modkey, "Control" }, "k", function() awful.screen.focus_relative(-1) end, 327 | { description = "focus the previous screen", group = "screen" }), 328 | awful.key({ modkey, }, "u", awful.client.urgent.jumpto, 329 | { description = "jump to urgent client", group = "client" }), 330 | awful.key({ modkey, }, "Tab", 331 | function() 332 | if cycle_prev then 333 | awful.client.focus.history.previous() 334 | else 335 | awful.client.focus.byidx(-1) 336 | end 337 | if client.focus then 338 | client.focus:raise() 339 | end 340 | end, 341 | { description = "cycle with previous/go back", group = "client" }), 342 | 343 | -- Show/hide wibox 344 | awful.key({ modkey }, "b", function() 345 | for s in screen do 346 | s.mywibox.visible = not s.mywibox.visible 347 | if s.mybottomwibox then 348 | s.mybottomwibox.visible = not s.mybottomwibox.visible 349 | end 350 | end 351 | end, 352 | { description = "toggle wibox", group = "awesome" }), 353 | 354 | -- On-the-fly useless gaps change 355 | awful.key({ altkey, "Control" }, "+", function() lain.util.useless_gaps_resize(1) end, 356 | { description = "increment useless gaps", group = "tag" }), 357 | awful.key({ altkey, "Control" }, "-", function() lain.util.useless_gaps_resize(-1) end, 358 | { description = "decrement useless gaps", group = "tag" }), 359 | 360 | -- Dynamic tagging 361 | awful.key({ modkey, "Shift" }, "n", function() lain.util.add_tag() end, 362 | { description = "add new tag", group = "tag" }), 363 | awful.key({ modkey, "Shift" }, "r", function() lain.util.rename_tag() end, 364 | { description = "rename tag", group = "tag" }), 365 | awful.key({ modkey, "Shift" }, "Left", function() lain.util.move_tag(-1) end, 366 | { description = "move tag to the left", group = "tag" }), 367 | awful.key({ modkey, "Shift" }, "Right", function() lain.util.move_tag(1) end, 368 | { description = "move tag to the right", group = "tag" }), 369 | awful.key({ modkey, "Shift" }, "d", function() lain.util.delete_tag() end, 370 | { description = "delete tag", group = "tag" }), 371 | 372 | -- Standard program 373 | awful.key({ modkey, }, "Return", function() awful.spawn(terminal) end, 374 | { description = "open a terminal", group = "launcher" }), 375 | awful.key({ modkey, "Control" }, "r", awesome.restart, 376 | { description = "reload awesome", group = "awesome" }), 377 | awful.key({ modkey, "Shift" }, "q", awesome.quit, 378 | { description = "quit awesome", group = "awesome" }), 379 | 380 | awful.key({ modkey, altkey }, "l", function() awful.tag.incmwfact(0.05) end, 381 | { description = "increase master width factor", group = "layout" }), 382 | awful.key({ modkey, altkey }, "h", function() awful.tag.incmwfact(-0.05) end, 383 | { description = "decrease master width factor", group = "layout" }), 384 | awful.key({ modkey, "Shift" }, "h", function() awful.tag.incnmaster(1, nil, true) end, 385 | { description = "increase the number of master clients", group = "layout" }), 386 | awful.key({ modkey, "Shift" }, "l", function() awful.tag.incnmaster(-1, nil, true) end, 387 | { description = "decrease the number of master clients", group = "layout" }), 388 | awful.key({ modkey, "Control" }, "h", function() awful.tag.incncol(1, nil, true) end, 389 | { description = "increase the number of columns", group = "layout" }), 390 | awful.key({ modkey, "Control" }, "l", function() awful.tag.incncol(-1, nil, true) end, 391 | { description = "decrease the number of columns", group = "layout" }), 392 | awful.key({ modkey, }, "space", function() awful.layout.inc(1) end, 393 | { description = "select next", group = "layout" }), 394 | awful.key({ modkey, "Shift" }, "space", function() awful.layout.inc(-1) end, 395 | { description = "select previous", group = "layout" }), 396 | 397 | awful.key({ modkey, "Control" }, "n", function() 398 | local c = awful.client.restore() 399 | -- Focus restored client 400 | if c then 401 | c:emit_signal("request::activate", "key.unminimize", { raise = true }) 402 | end 403 | end, { description = "restore minimized", group = "client" }), 404 | 405 | -- Dropdown application 406 | awful.key({ modkey, }, "z", function() awful.screen.focused().quake:toggle() end, 407 | { description = "dropdown application", group = "launcher" }), 408 | 409 | -- Widgets popups 410 | awful.key({ altkey, }, "c", function() if beautiful.cal then beautiful.cal.show(7) end end, 411 | { description = "show calendar", group = "widgets" }), 412 | awful.key({ altkey, }, "h", function() if beautiful.fs then beautiful.fs.show(7) end end, 413 | { description = "show filesystem", group = "widgets" }), 414 | awful.key({ altkey, }, "w", function() if beautiful.weather then beautiful.weather.show(7) end end, 415 | { description = "show weather", group = "widgets" }), 416 | 417 | -- Screen brightness 418 | awful.key({}, "XF86MonBrightnessUp", function() os.execute("brightnessctl s 10+") end, 419 | { description = "+10%", group = "hotkeys" }), 420 | awful.key({}, "XF86MonBrightnessDown", function() os.execute("brightnessctl s 10-") end, 421 | { description = "-10%", group = "hotkeys" }), 422 | 423 | -- Volume Keys 424 | awful.key({}, "XF86AudioLowerVolume", function() 425 | awful.util.spawn("amixer -q -D pulse sset Master 5%-", false) 426 | end), 427 | awful.key({}, "XF86AudioRaiseVolume", function() 428 | awful.util.spawn("amixer -q -D pulse sset Master 5%+", false) 429 | end), 430 | awful.key({}, "XF86AudioMute", function() 431 | awful.util.spawn("amixer -D pulse set Master 1+ toggle", false) 432 | end), 433 | -- Media Keys 434 | awful.key({}, "XF86AudioPlay", function() 435 | --awful.spawn.with_shell() 436 | beautiful.update_music("multiplayerctl toggle") 437 | end), 438 | awful.key({}, "XF86AudioNext", function() 439 | --awful.spawn.with_shell("multiplayerctl next") 440 | beautiful.update_music("multiplayerctl next") 441 | end), 442 | awful.key({}, "XF86AudioPrev", function() 443 | --awful.spawn.with_shell("multiplayerctl previous") 444 | beautiful.update_music("multiplayerctl previous") 445 | end), 446 | awful.key({}, "XF86AudioStop", function() 447 | --awful.spawn.with_shell("multiplayerctl switch") 448 | beautiful.update_music("multiplayerctl switch") 449 | end), 450 | -- Copy primary to clipboard (terminals to gtk) 451 | awful.key({ modkey }, "c", function() awful.spawn.with_shell("xsel | xsel -i -b") end, 452 | { description = "copy terminal to gtk", group = "hotkeys" }), 453 | -- Copy clipboard to primary (gtk to terminals) 454 | awful.key({ modkey }, "v", function() awful.spawn.with_shell("xsel -b | xsel") end, 455 | { description = "copy gtk to terminal", group = "hotkeys" }), 456 | 457 | -- User programs 458 | awful.key({ modkey }, "q", function() awful.spawn(browser) end, 459 | { description = "run browser", group = "launcher" }), 460 | 461 | awful.key({ modkey }, "e", function() awful.spawn('nautilus') end, 462 | { description = "run filemanager", group = "launcher" }), 463 | 464 | awful.key({ modkey, "Control", "Shift" }, "s", function() awful.spawn.with_shell("scrot -s -e 'mv $f ~/Pictures/Screenshots/scrot/ 2>/dev/null'") end, 465 | { description = "take a screenshot of a region to file", group = "hotkeys" }), 466 | 467 | awful.key({ modkey, "Shift" }, "s", function() awful.spawn.with_shell("scrot -s - | xclip -selection 'clipboard' -t image/png") end, 468 | { description = "take a screenshot of a region to clipboard", group = "hotkeys" }), 469 | 470 | 471 | -- Default 472 | --[[ Menubar 473 | awful.key({ modkey }, "p", function() menubar.show() end, 474 | {description = "show the menubar", group = "launcher"}), 475 | --]] 476 | --[[ dmenu 477 | awful.key({ modkey }, "x", function () 478 | os.execute(string.format("dmenu_run -i -fn 'Monospace' -nb '%s' -nf '%s' -sb '%s' -sf '%s'", 479 | beautiful.bg_normal, beautiful.fg_normal, beautiful.bg_focus, beautiful.fg_focus)) 480 | end, 481 | {description = "show dmenu", group = "launcher"}), 482 | --]] 483 | -- alternatively use rofi, a dmenu-like application with more features 484 | -- check https://github.com/DaveDavenport/rofi for more details 485 | 486 | awful.key({ altkey }, "space", function() 487 | os.execute(string.format("rofi -show %s -theme %s", 488 | 'run', 'dmenu')) 489 | end, 490 | { description = "show rofi", group = "launcher" }), 491 | 492 | -- Prompt 493 | awful.key({ modkey }, "r", function() awful.screen.focused().mypromptbox:run() end, 494 | { description = "run prompt", group = "launcher" }) 495 | ) 496 | 497 | clientkeys = mytable.join( 498 | awful.key({ altkey, "Shift" }, "m", lain.util.magnify_client, 499 | { description = "magnify client", group = "client" }), 500 | awful.key({ modkey, }, "f", 501 | function(c) 502 | c.fullscreen = not c.fullscreen 503 | c:raise() 504 | end, 505 | { description = "toggle fullscreen", group = "client" }), 506 | awful.key({ modkey, "Shift" }, "c", function(c) c:kill() end, 507 | { description = "close", group = "client" }), 508 | awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle, 509 | { description = "toggle floating", group = "client" }), 510 | awful.key({ modkey, "Control" }, "Return", function(c) c:swap(awful.client.getmaster()) end, 511 | { description = "move to master", group = "client" }), 512 | awful.key({ modkey, }, "o", function(c) c:move_to_screen() end, 513 | { description = "move to screen", group = "client" }), 514 | awful.key({ modkey, }, "t", function(c) c.ontop = not c.ontop end, 515 | { description = "toggle keep on top", group = "client" }), 516 | awful.key({ modkey, }, "n", 517 | function(c) 518 | -- The client currently has the input focus, so it cannot be 519 | -- minimized, since minimized clients can't have the focus. 520 | c.minimized = true 521 | end, 522 | { description = "minimize", group = "client" }), 523 | awful.key({ modkey, }, "m", 524 | function(c) 525 | c.maximized = not c.maximized 526 | c:raise() 527 | end, 528 | { description = "(un)maximize", group = "client" }), 529 | awful.key({ modkey, "Control" }, "m", 530 | function(c) 531 | c.maximized_vertical = not c.maximized_vertical 532 | c:raise() 533 | end, 534 | { description = "(un)maximize vertically", group = "client" }), 535 | awful.key({ modkey, "Shift" }, "m", 536 | function(c) 537 | c.maximized_horizontal = not c.maximized_horizontal 538 | c:raise() 539 | end, 540 | { description = "(un)maximize horizontally", group = "client" }) 541 | ) 542 | 543 | -- Bind all key numbers to tags. 544 | -- Be careful: we use keycodes to make it work on any keyboard layout. 545 | -- This should map on the top row of your keyboard, usually 1 to 9. 546 | for i = 1, 9 do 547 | globalkeys = mytable.join(globalkeys, 548 | -- View tag only. 549 | awful.key({ modkey }, "#" .. i + 9, 550 | function() 551 | local screen = awful.screen.focused() 552 | local tag = screen.tags[i] 553 | if tag then 554 | tag:view_only() 555 | end 556 | end, 557 | { description = "view tag #" .. i, group = "tag" }), 558 | -- Toggle tag display. 559 | awful.key({ modkey, "Control" }, "#" .. i + 9, 560 | function() 561 | local screen = awful.screen.focused() 562 | local tag = screen.tags[i] 563 | if tag then 564 | awful.tag.viewtoggle(tag) 565 | end 566 | end, 567 | { description = "toggle tag #" .. i, group = "tag" }), 568 | -- Move client to tag. 569 | awful.key({ modkey, "Shift" }, "#" .. i + 9, 570 | function() 571 | if client.focus then 572 | local tag = client.focus.screen.tags[i] 573 | if tag then 574 | client.focus:move_to_tag(tag) 575 | end 576 | end 577 | end, 578 | { description = "move focused client to tag #" .. i, group = "tag" }), 579 | -- Toggle tag on focused client. 580 | awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9, 581 | function() 582 | if client.focus then 583 | local tag = client.focus.screen.tags[i] 584 | if tag then 585 | client.focus:toggle_tag(tag) 586 | end 587 | end 588 | end, 589 | { description = "toggle focused client on tag #" .. i, group = "tag" }) 590 | ) 591 | end 592 | 593 | clientbuttons = mytable.join( 594 | awful.button({}, 1, function(c) 595 | c:emit_signal("request::activate", "mouse_click", { raise = true }) 596 | end), 597 | awful.button({ modkey }, 1, function(c) 598 | c:emit_signal("request::activate", "mouse_click", { raise = true }) 599 | awful.mouse.client.move(c) 600 | end), 601 | awful.button({ modkey }, 3, function(c) 602 | c:emit_signal("request::activate", "mouse_click", { raise = true }) 603 | awful.mouse.client.resize(c) 604 | end) 605 | ) 606 | 607 | -- Set keys 608 | root.keys(globalkeys) 609 | 610 | -- }}} 611 | 612 | -- {{{ Rules 613 | 614 | -- Rules to apply to new clients (through the "manage" signal). 615 | awful.rules.rules = { 616 | -- All clients will match this rule. 617 | { rule = {}, 618 | properties = { border_width = beautiful.border_width, 619 | border_color = beautiful.border_normal, 620 | focus = awful.client.focus.filter, 621 | raise = true, 622 | keys = clientkeys, 623 | buttons = clientbuttons, 624 | screen = awful.screen.preferred, 625 | placement = awful.placement.no_overlap + awful.placement.no_offscreen, 626 | size_hints_honor = false, 627 | maximized = false, 628 | } 629 | }, 630 | 631 | -- Floating clients. 632 | { rule_any = { 633 | instance = { 634 | "DTA", -- Firefox addon DownThemAll. 635 | "copyq", -- Includes session name in class. 636 | "pinentry", 637 | }, 638 | class = { 639 | "Arandr", 640 | "Blueman-manager", 641 | "Gpick", 642 | "Kruler", 643 | "MessageWin", -- kalarm. 644 | "Sxiv", 645 | "Tor Browser", -- Needs a fixed window size to avoid fingerprinting by screen size. 646 | "Wpa_gui", 647 | "veromix", 648 | "xtightvncviewer" }, 649 | 650 | -- Note that the name property shown in xprop might be set slightly after creation of the client 651 | -- and the name shown there might not match defined rules here. 652 | name = { 653 | "Event Tester", -- xev. 654 | }, 655 | role = { 656 | "AlarmWindow", -- Thunderbird's calendar. 657 | "ConfigManager", -- Thunderbird's about:config. 658 | "pop-up", -- e.g. Google Chrome's (detached) Developer Tools. 659 | } 660 | }, properties = { floating = true } }, 661 | 662 | -- Add titlebars to normal clients and dialogs 663 | { rule_any = { type = { "normal", "dialog" } 664 | }, properties = { titlebars_enabled = false } 665 | }, 666 | 667 | -- Set Firefox to always map on the tag named "2" on screen 1. 668 | -- { rule = { class = "Firefox" }, 669 | -- properties = { screen = 1, tag = "2" } }, 670 | } 671 | 672 | -- }}} 673 | 674 | -- {{{ Signals 675 | 676 | -- Signal function to execute when a new client appears. 677 | client.connect_signal("manage", function(c) 678 | -- Set the windows at the slave, 679 | -- i.e. put it at the end of others instead of setting it master. 680 | -- if not awesome.startup then awful.client.setslave(c) end 681 | 682 | if awesome.startup 683 | and not c.size_hints.user_position 684 | and not c.size_hints.program_position then 685 | -- Prevent clients from being unreachable after screen count changes. 686 | awful.placement.no_offscreen(c) 687 | end 688 | 689 | c.shape = function(cr, w, h) 690 | gears.shape.rounded_rect(cr, w, h, dpi(8)) 691 | end 692 | end) 693 | 694 | -- Add a titlebar if titlebars_enabled is set to true in the rules. 695 | client.connect_signal("request::titlebars", function(c) 696 | -- Custom 697 | if beautiful.titlebar_fun then 698 | beautiful.titlebar_fun(c) 699 | return 700 | end 701 | 702 | -- Default 703 | -- buttons for the titlebar 704 | local buttons = mytable.join( 705 | awful.button({}, 1, function() 706 | c:emit_signal("request::activate", "titlebar", { raise = true }) 707 | awful.mouse.client.move(c) 708 | end), 709 | awful.button({}, 3, function() 710 | c:emit_signal("request::activate", "titlebar", { raise = true }) 711 | awful.mouse.client.resize(c) 712 | end) 713 | ) 714 | 715 | awful.titlebar(c, { size = 16 }):setup { 716 | { -- Left 717 | awful.titlebar.widget.iconwidget(c), 718 | buttons = buttons, 719 | layout = wibox.layout.fixed.horizontal 720 | }, 721 | { -- Middle 722 | { -- Title 723 | align = "center", 724 | widget = awful.titlebar.widget.titlewidget(c) 725 | }, 726 | buttons = buttons, 727 | layout = wibox.layout.flex.horizontal 728 | }, 729 | { -- Right 730 | awful.titlebar.widget.floatingbutton(c), 731 | awful.titlebar.widget.maximizedbutton(c), 732 | awful.titlebar.widget.stickybutton(c), 733 | awful.titlebar.widget.ontopbutton(c), 734 | awful.titlebar.widget.closebutton(c), 735 | layout = wibox.layout.fixed.horizontal() 736 | }, 737 | layout = wibox.layout.align.horizontal 738 | } 739 | end) 740 | 741 | -- Enable sloppy focus, so that focus follows mouse. 742 | client.connect_signal("mouse::enter", function(c) 743 | c:emit_signal("request::activate", "mouse_enter", { raise = vi_focus }) 744 | end) 745 | 746 | client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end) 747 | client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end) 748 | 749 | -- }}} 750 | --------------------------------------------------------------------------------