diff options
| author | dacctal <donotcontactmevia@email.invalid> | 2026-07-10 10:49:55 +0000 |
|---|---|---|
| committer | dacctal <donotcontactmevia@email.invalid> | 2026-07-10 10:49:55 +0000 |
| commit | 9ea4e05127e7aaf79a58f98076288b25973e949f (patch) | |
| tree | 38e526e572e48a4c9e9cf08d6d1a6dabacb893c9 /.config | |
| parent | dd03d22b6605aa26ceb9d2fbaf9b24c4ceb0e0fb (diff) | |
backup
Diffstat (limited to '.config')
40 files changed, 940 insertions, 539 deletions
diff --git a/.config/fetchit/init.lua b/.config/fetchit/init.lua new file mode 100644 index 0000000..b804f86 --- /dev/null +++ b/.config/fetchit/init.lua @@ -0,0 +1,21 @@ +column_padding = 2 + +art = { + source = "./logos/logo.txt" +} + +function fetch() + return { + columns = { + art.out, + { + color.white(user.name .. "@" .. host.name), + color.red("os: ") .. string.lower("dacctal os (tm)"), + color.yellow("kernel: ") .. "linux " .. kernel.release, + color.green("cpu: ") .. string.lower(cpu.name), + color.blue("gpu: ") .. "amd radeon rx 7700 xt", + color.magenta("ram: ") .. string.format("%.1fGB/%.1fGB (%.1f%%)", memory.used_gb, memory.total_gb, memory.percent), + } + } +} +end diff --git a/.config/fetchit/logos/logo.txt b/.config/fetchit/logos/logo.txt new file mode 100644 index 0000000..7e7099b --- /dev/null +++ b/.config/fetchit/logos/logo.txt @@ -0,0 +1,7 @@ + , + / \ +_.--' '--._ +`'--, ,--'` + _- \ / -_ +'-_ ' _-' + `'-.-'` diff --git a/.config/foot/foot.ini b/.config/foot/foot.ini index f9dedaa..20eccf8 100755 --- a/.config/foot/foot.ini +++ b/.config/foot/foot.ini @@ -1,33 +1,21 @@ term=foot title=foot -#font=Cartograph Mono CF:size=14 -#font=ProFont IIx Nerd Font:size=12 -#font=CaskaydiaCove NF:size=14 -#font=MapleMono NF Medium:size=14 -#font=IBM EGA 8x14:size=19 -#font=Departure Mono:size=14 -#font=Terminess Nerd Font:size=14 -#font=GohuFont 11 Nerd Font:size=13 -#font=GohuFont 14 Nerd Font:size=13 -#font=JetBrains Mono NF:size=14 -#font=IBM VGA 8x16:size=19 -#font=IBM Plex Mono:size=14 -#font=NotoMono NF:size=14 -#font=Monocraft:size=13 -font=B612 Mono:size=14 -font=RobotoMono Nerd Font:size=14 +font=caelusevka:size=16 pad=8x8 dpi-aware=yes -[cursor] -# style=block -# blink=no -# blink-rate=500 -# beam-thickness=1.5 -# underline-thickness=<font underline thickness> +[csd] +preferred=none + +#[cursor] +#style=block +#blink=no +#blink-rate=500 +#beam-thickness=1.5 +#underline-thickness=<font underline thickness> [colors] alpha=1 @@ -35,7 +23,7 @@ background=0f0f0f foreground=f4decd # black -regular0 = 1e1f1e +regular0 = 0f0f0f bright0 = 3b403c # red diff --git a/.config/hypr/binds.lua b/.config/hypr/binds.lua new file mode 100644 index 0000000..0d373b0 --- /dev/null +++ b/.config/hypr/binds.lua @@ -0,0 +1,53 @@ +local mainMod = "SUPER" + +-- https://wiki.hypr.land/Configuring/Basics/Binds/ +hl.bind(mainMod.." + Return", hl.dsp.exec_cmd(terminal)) +local closeWindowBind = hl.bind(mainMod.." + C", hl.dsp.window.close()) +-- closeWindowBind:set_enabled(false) +hl.bind(mainMod.." + SHIFT + E", hl.dsp.exec_cmd("command -v hyprshutdown >/dev/null 2>&1 && hyprshutdown || hyprctl dispatch 'hl.dsp.exit()'")) +hl.bind(mainMod.." + Space", hl.dsp.window.float({ action = "toggle" })) +hl.bind(mainMod.." + R", hl.dsp.exec_cmd(menu)) +hl.bind(mainMod.." + P", hl.dsp.window.pseudo()) + +-- Move focus with mainMod + arrow keys +hl.bind(mainMod.." + H", hl.dsp.focus({ direction = "left" })) +hl.bind(mainMod.." + L", hl.dsp.focus({ direction = "right" })) +hl.bind(mainMod.." + K", hl.dsp.focus({ direction = "up" })) +hl.bind(mainMod.." + J", hl.dsp.focus({ direction = "down" })) + +-- Switch workspaces with mainMod + [0-9] +-- Move active window to a workspace with mainMod + SHIFT + [0-9] +for i = 1, 10 do + local key = i % 10 -- 10 maps to key 0 + hl.bind(mainMod.." + "..key, hl.dsp.focus({ workspace = i})) + hl.bind(mainMod.." + SHIFT + "..key, hl.dsp.window.move({ workspace = i })) +end + +-- Example special workspace (scratchpad) +hl.bind(mainMod.." + S", hl.dsp.workspace.toggle_special("magic")) +hl.bind(mainMod.." + SHIFT + S", hl.dsp.window.move({ workspace = "special:magic" })) + +-- Scroll through existing workspaces with mainMod + scroll +hl.bind(mainMod.." + mouse_down", hl.dsp.focus({ workspace = "e+1" })) +hl.bind(mainMod.." + mouse_up", hl.dsp.focus({ workspace = "e-1" })) + +-- Move/resize windows with mainMod + LMB/RMB and dragging +hl.bind(mainMod.." + mouse:272", hl.dsp.window.drag(), { mouse = true }) +hl.bind(mainMod.." + mouse:273", hl.dsp.window.resize(), { mouse = true }) + +-- media +hl.bind("XF86AudioNext", hl.dsp.exec_cmd("playerctl next"), { locked = true }) +hl.bind("XF86AudioPause", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true }) +hl.bind("XF86AudioPlay", hl.dsp.exec_cmd("playerctl play-pause"), { locked = true }) +hl.bind("XF86AudioPrev", hl.dsp.exec_cmd("playerctl previous"), { locked = true }) +-- volume +hl.bind("XF86AudioRaiseVolume", hl.dsp.exec_cmd("wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"), { locked = true, repeating = true }) +hl.bind("XF86AudioLowerVolume", hl.dsp.exec_cmd("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"), { locked = true, repeating = true }) +hl.bind("XF86AudioMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"), { locked = true, repeating = true }) +hl.bind("XF86AudioMicMute", hl.dsp.exec_cmd("wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"), { locked = true, repeating = true }) +-- brightness +hl.bind("XF86MonBrightnessUp", hl.dsp.exec_cmd("brightnessctl -e4 -n2 set 5%+"), { locked = true, repeating = true }) +hl.bind("XF86MonBrightnessDown", hl.dsp.exec_cmd("brightnessctl -e4 -n2 set 5%-"), { locked = true, repeating = true }) + +-- screenshots +hl.bind("Print", hl.dsp.exec_cmd("grim -g \"$(slurp)\" - | wl-copy")) diff --git a/.config/hypr/env.lua b/.config/hypr/env.lua new file mode 100644 index 0000000..a5d2af3 --- /dev/null +++ b/.config/hypr/env.lua @@ -0,0 +1,4 @@ +-- https://wiki.hypr.land/Configuring/Advanced-and-Cool/Environment-variables/ + +hl.env("XCURSOR_SIZE", "24") +hl.env("HYPRCURSOR_SIZE", "24") diff --git a/.config/hypr/hyprland.lua b/.config/hypr/hyprland.lua new file mode 100644 index 0000000..37f96e8 --- /dev/null +++ b/.config/hypr/hyprland.lua @@ -0,0 +1,15 @@ +-- https://wiki.hypr.land/Configuring/Start/ + +mainMod = "SUPER" +terminal = "foot" +menu = "foot --app-id tux -T foot tux" + +require("monitors") +require("env") +require("start") +require("perms") +require("visual") +--require("workspace-rules") +require("input") +require("binds") +require("windows") diff --git a/.config/hypr/input.lua b/.config/hypr/input.lua new file mode 100644 index 0000000..3d549ad --- /dev/null +++ b/.config/hypr/input.lua @@ -0,0 +1,26 @@ +hl.config({ + input = { + kb_layout = "us", + kb_variant = "", + kb_model = "", + kb_options = "", + kb_rules = "", + + follow_mouse = 1, + sensitivity = 0, --[[ -1.0 - 1.0, 0 means no modification. ]] + touchpad = { natural_scroll = false, }, + }, +}) + +hl.gesture({ + fingers = 3, + direction = "horizontal", + action = "workspace" +}) + +-- https://wiki.hypr.land/Configuring/Advanced-and-Cool/Devices/ +--hl.device({ +-- name = "epic-mouse-v1", +-- sensitivity = -0.5, +--}) + diff --git a/.config/hypr/monitors.lua b/.config/hypr/monitors.lua new file mode 100644 index 0000000..8ed2443 --- /dev/null +++ b/.config/hypr/monitors.lua @@ -0,0 +1,18 @@ +hl.monitor({ + output = "DP-2", + mode = "1920x1080@144", + position = "0x0", + scale = "1", +}) +hl.monitor({ + output = "DP-1", + mode = "1920x1080@75", + position = "1920x0", + scale = "1", +}) +hl.monitor({ + output = "HDMI-A-1", + mode = "1920x1080@50", + position = "960x-1080", + scale = "1", +}) diff --git a/.config/hypr/perms.lua b/.config/hypr/perms.lua new file mode 100644 index 0000000..c7b92d8 --- /dev/null +++ b/.config/hypr/perms.lua @@ -0,0 +1,18 @@ +----------------------- +----- PERMISSIONS ----- +----------------------- + +-- See https://wiki.hypr.land/Configuring/Advanced-and-Cool/Permissions/ +-- Please note permission changes here require a Hyprland restart and are not applied on-the-fly +-- for security reasons + +-- hl.config({ +-- ecosystem = { +-- enforce_permissions = true, +-- }, +-- }) + +-- hl.permission("/usr/(bin|local/bin)/grim", "screencopy", "allow") +-- hl.permission("/usr/(lib|libexec|lib64)/xdg-desktop-portal-hyprland", "screencopy", "allow") +-- hl.permission("/usr/(bin|local/bin)/hyprpm", "plugin", "allow") + diff --git a/.config/hypr/start.lua b/.config/hypr/start.lua new file mode 100644 index 0000000..65a9074 --- /dev/null +++ b/.config/hypr/start.lua @@ -0,0 +1,7 @@ +-- https://wiki.hypr.land/Configuring/Basics/Autostart/ + +hl.on("hyprland.start", function () + hl.exec_cmd("gentoo-pipewire-launcher") + hl.exec_cmd("gentoo-pipewire-launcher restart") + hl.exec_cmd(terminal) +end) diff --git a/.config/hypr/visual.lua b/.config/hypr/visual.lua new file mode 100644 index 0000000..b8ed8d5 --- /dev/null +++ b/.config/hypr/visual.lua @@ -0,0 +1,34 @@ +----------------------- +---- LOOK AND FEEL ---- +----------------------- +-- https://wiki.hypr.land/Configuring/Basics/Variables/ + +hl.config({ + general = { + gaps_in = 2, + gaps_out = 2, + border_size = 2, + col = { + active_border = "rgba(ef934dff)", + inactive_border = "rgba(3b403cff)", + }, + resize_on_border = false, + -- https://wiki.hypr.land/Configuring/Advanced-and-Cool/Tearing/ + allow_tearing = false, + layout = "master", + }, + + decoration = { + rounding = 0, + shadow = { enabled = false, }, + blur = { enabled = false, }, + }, + + animations = { enabled = false, }, + + misc = { + force_default_wallpaper = 0, + disable_hyprland_logo = true, + }, +}) + diff --git a/.config/hypr/windows.lua b/.config/hypr/windows.lua new file mode 100644 index 0000000..4eb2a98 --- /dev/null +++ b/.config/hypr/windows.lua @@ -0,0 +1,43 @@ +-- https://wiki.hypr.land/Configuring/Basics/Window-Rules/ +-- https://wiki.hypr.land/Configuring/Basics/Workspace-Rules/ + +local suppressMaximizeRule = hl.window_rule({ + -- Ignore maximize requests from all apps. You'll probably like this. + name = "suppress-maximize-events", + match = { class = ".*" }, + + suppress_event = "maximize", +}) +-- suppressMaximizeRule:set_enabled(false) + +hl.window_rule({ + -- Fix some dragging issues with XWayland + name = "fix-xwayland-drags", + match = { + class = "^$", + title = "^$", + xwayland = true, + float = true, + fullscreen = false, + pin = false, + }, + + no_focus = true, +}) + +-- Layer rules also return a handle. +-- local overlayLayerRule = hl.layer_rule({ +-- name = "no-anim-overlay", +-- match = { namespace = "^my-overlay$" }, +-- no_anim = true, +-- }) +-- overlayLayerRule:set_enabled(false) + +-- Hyprland-run windowrule +hl.window_rule({ + name = "move-hyprland-run", + match = { class = "hyprland-run" }, + + move = "20 monitor_h-120", + float = true, +}) diff --git a/.config/hypr/workspace_rules.lua b/.config/hypr/workspace_rules.lua new file mode 100644 index 0000000..dbf9aba --- /dev/null +++ b/.config/hypr/workspace_rules.lua @@ -0,0 +1,18 @@ +-- https://wiki.hypr.land/Configuring/Basics/Workspace-Rules/ +-- "Smart gaps" / "No gaps when only" +-- uncomment all if you wish to use that. +-- hl.workspace_rule({ workspace = "w[tv1]", gaps_out = 0, gaps_in = 0 }) +-- hl.workspace_rule({ workspace = "f[1]", gaps_out = 0, gaps_in = 0 }) +-- hl.window_rule({ +-- name = "no-gaps-wtv1", +-- match = { float = false, workspace = "w[tv1]" }, +-- border_size = 0, +-- rounding = 0, +-- }) +-- hl.window_rule({ +-- name = "no-gaps-f1", +-- match = { float = false, workspace = "f[1]" }, +-- border_size = 0, +-- rounding = 0, +-- }) + diff --git a/.config/otter-launcher/config.toml b/.config/otter-launcher/config.toml deleted file mode 100644 index a0a53ab..0000000 --- a/.config/otter-launcher/config.toml +++ /dev/null @@ -1,126 +0,0 @@ -[general] -default_module = "app" # The module to run when no prefix is matched -empty_module = "a" # run with an empty prompt -exec_cmd = "sh -c" # The exec command of your shell, default to sh -# for example: "bach -c" for bash; "zsh -c" for zsh. This can also runs wm exec commands, like hyprctl dispatch exec -vi_mode = true # set true to use vi keybinds, false to use emacs keybinds; default to emacs -esc_to_abort = true # allow to quit with esc keypress; a useful option for vi users -cheatsheet_entry = "?" # when entered, otter-launcher will show a list of configured modules -cheatsheet_viewer = "less -R; clear" # the program that otter-launcher will pipe cheatsheet into -clear_screen_after_execution = false # useful when chafa image flash back after module execution -loop_mode = false # in loop mode, otter-launcher won't quit after running a module, useful when using scratchpad -external_editor = "" # if set, pressing ctrl+e (or pressing v in vi normal mode) will edit the input field in the specified program; default to no external editor -#callback = "" # if set, otter-launcher will run the command after a module is executed; for example, it can call swaymsg to adjust window size - -# ASCII color codes are allowed with these options. However, \x1b should be replaced with \u001B (unicode escape) because the rust toml crate cannot read \x as an escaped character... -[interface] -# use three quotes to write longer commands -header = """ - \u001B[34;1m >\u001B[0m $USER@$(echo $HOSTNAME) \u001B[31m\u001B[0m $(cat /proc/loadavg | cut -d ' ' -f 1) \u001B[33m\u001B[0m $(free -h | awk 'FNR == 2 {print $3}' | sed 's/i//') - \u001B[34;1m>\u001B[0;1m """ -# Run a shell command and make the stdout printed above the header -header_cmd = "" -header_cmd_trimmed_lines = 0 # Remove a number of lines from header_cmd output, in case of some programs printing excessive empty lines at the end of its output -header_concatenate = false # print header and header_cmd output at the same line, default to false -list_prefix = " " -selection_prefix = " \u001B[31;1m> " -place_holder = "type and search" -default_module_message = " \u001B[33msearch\u001B[0m the internet" # if set, the text will be shown when the default module is in use -empty_module_message = "" # the text to show when empty module is in use -suggestion_mode = "list" # available options: list, hint -suggestion_lines = 12 # length of the suggestion list, set to 0 to disable suggestions and tab completion -indicator_with_arg_module = "\u001B[31m^\u001B[0m " # a sign showing whether the module should run with an argument -indicator_no_arg_module = "\u001B[31m$\u001B[0m " -prefix_padding = 3 # format prefixes to have a uniformed width; prefixes will be padded with spaces to have a least specified number of chars -# below color options affect all modules; per-module coloring is allowed by using ascii color codes at each module's configurations -prefix_color = "\u001B[33m" -description_color = "\u001B[39m" -place_holder_color = "\u001B[30m" -hint_color = "\u001B[30m" # the color of hint mode suggestions -# move the whole interface rightward or upward, easier for styling with chafa image -move_right = 0 -move_up = 0 - - -[[modules]] -description = "search with brave" -prefix = "br" -cmd = "setsid -f xdg-open 'https://search.brave.com/search?q={}'" -with_argument = true -url_encode = true - -[[modules]] -description = "kill a runing app" -prefix = "k" -cmd = 'ps -u "$USER" -o comm= | sort -u | fsel --dmenu | xargs -r pkill -9' -with_argument = true -url_encode = true - -[[modules]] -description = "launch apps with fsel" -prefix = "a" -cmd = "fsel -vv -r -d -ss \"{}\"" -with_argument = true - -[[modules]] -description = "launch apps instantly" -prefix = "app" -cmd = "fsel -vv -r -d -p {}" -with_argument = true - -[[modules]] -description = "manage clipboard with fsel" -prefix = "cl" -cmd = """ -fsel --cclip -""" - -[[modules]] -description = "find pkgs" -prefix = "pm" -cmd = "pmux -SD {}" -with_argument = true - -[[modules]] -description = "install pkgs" -prefix = "i" -cmd = "pmux -S {}" -with_argument = true - -[[modules]] -description = "power menu with fzf" -prefix = "p" -cmd = """ -function power { -if [[ -n $1 ]]; then -case $1 in -"logout") session=`loginctl session-status | head -n 1 | awk '{print $1}'`; loginctl terminate-session $session ;; -"suspend") systemctl suspend ;; -"hibernate") systemctl hibernate ;; -"reboot") systemctl reboot ;; -"shutdown") systemctl poweroff ;; -esac fi } -power $(echo -e 'reboot\nshutdown\nlogout\nsuspend\nhibernate' | fzf --reverse --no-scrollbar --padding 1,3 --prompt 'Power Menu: ' | tail -1) -""" - -[[modules]] -description = "run command in terminal" -prefix = "s" -cmd = """ -setsid -f "$(echo $TERM | sed 's/xterm-//g')" -e {} -""" -with_argument = true - -[[modules]] -description = "search archwiki" -prefix = "w" -cmd = "setsid -f xdg-open https://wiki.archlinux.org/index.php?search='{}'" -with_argument = true -url_encode = true - -[[modules]] -description = "cambridge dictionary" -prefix = "dc" -cmd = "setsid -f xdg-open 'https://dictionary.cambridge.org/dictionary/english/{}'" -with_argument = true -url_encode = true diff --git a/.config/otter-launcher/sway-launcher-desktop.sh b/.config/otter-launcher/sway-launcher-desktop.sh deleted file mode 100755 index 0153175..0000000 --- a/.config/otter-launcher/sway-launcher-desktop.sh +++ /dev/null @@ -1,390 +0,0 @@ -#!/usr/bin/env bash -# terminal application launcher for sway, using fzf -# Based on: https://gitlab.com/FlyingWombat/my-scripts/blob/master/sway-launcher -# https://gist.github.com/Biont/40ef59652acf3673520c7a03c9f22d2a -shopt -s nullglob globstar -set -o pipefail -if ! { exec 0>&3; } 1>/dev/null 2>&1; then - exec 3>/dev/null # If file descriptor 3 is unused in parent shell, output to /dev/null -fi -# shellcheck disable=SC2154 -trap 's=$?; echo "$0: Error on line "$LINENO": $BASH_COMMAND"; exit $s' ERR -IFS=$'\n\t' -DEL=$'\34' - -FZF_COMMAND="${FZF_COMMAND:=fzf}" -TERMINAL_COMMAND="${TERMINAL_COMMAND:="$TERMINAL -e"}" -GLYPH_COMMAND="${GLYPH_COMMAND- }" -GLYPH_DESKTOP="${GLYPH_DESKTOP- }" -CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/sway-launcher-desktop" -PROVIDERS_FILE="${PROVIDERS_FILE:=providers.conf}" -if [[ "${PROVIDERS_FILE#/}" == "${PROVIDERS_FILE}" ]]; then - # $PROVIDERS_FILE is a relative path, prepend $CONFIG_DIR - PROVIDERS_FILE="${CONFIG_DIR}/${PROVIDERS_FILE}" -fi -if [[ ! -v PREVIEW_WINDOW ]]; then - PREVIEW_WINDOW=up:2:noborder -fi - -# Provider config entries are separated by the field separator \034 and have the following structure: -# list_cmd,preview_cmd,launch_cmd,purge_cmd -declare -A PROVIDERS -if [ -f "${PROVIDERS_FILE}" ]; then - eval "$(awk -F= ' - BEGINFILE{ provider=""; } - /^\[.*\]/{sub("^\\[", "");sub("\\]$", "");provider=$0} - /^(launch|list|preview|purge)_cmd/{st = index($0,"=");providers[provider][$1] = substr($0,st+1)} - ENDFILE{ - for (key in providers){ - if(!("list_cmd" in providers[key])){continue;} - if(!("launch_cmd" in providers[key])){continue;} - if(!("preview_cmd" in providers[key])){continue;} - if(!("purge_cmd" in providers[key])){providers[key]["purge_cmd"] = "exit 0";} - for (entry in providers[key]){ - gsub(/[\x27,\047]/,"\x27\"\x27\"\x27", providers[key][entry]) - } - print "PROVIDERS[\x27" key "\x27]=\x27" providers[key]["list_cmd"] "\034" providers[key]["preview_cmd"] "\034" providers[key]["launch_cmd"] "\034" providers[key]["purge_cmd"] "\x27\n" - } - }' "${PROVIDERS_FILE}")" - if [[ ! -v HIST_FILE ]]; then - HIST_FILE="${XDG_CACHE_HOME:-$HOME/.cache}/${0##*/}-${PROVIDERS_FILE##*/}-history.txt" - fi -else - PROVIDERS['desktop']="${0} list-entries${DEL}${0} describe-desktop \"{1}\"${DEL}${0} run-desktop '{1}' {2}${DEL}test -f '{1}' || exit 43" - PROVIDERS['command']="${0} list-commands${DEL}${0} describe-command \"{1}\"${DEL}${TERMINAL_COMMAND} {1}${DEL}command -v '{1}' || exit 43" - if [[ ! -v HIST_FILE ]]; then - HIST_FILE="${XDG_CACHE_HOME:-$HOME/.cache}/${0##*/}-history.txt" - fi -fi -PROVIDERS['user']="exit${DEL}exit${DEL}{1}" # Fallback provider that simply executes the exact command if there were no matches - -if [[ -n "${HIST_FILE}" ]]; then - mkdir -p "${HIST_FILE%/*}" && touch "$HIST_FILE" - readarray HIST_LINES <"$HIST_FILE" -fi - -function describe() { - # shellcheck disable=SC2086 - readarray -d ${DEL} -t PROVIDER_ARGS <<<${PROVIDERS[${1}]} - # shellcheck disable=SC2086 - [ -n "${PROVIDER_ARGS[1]}" ] && eval "${PROVIDER_ARGS[1]//\{1\}/${2}}" -} -function describe-desktop() { - description=$(sed -ne '/^Comment=/{s/^Comment=//;p;q}' "$1") - echo -e "\033[33m$(sed -ne '/^Name=/{s/^Name=//;p;q}' "$1")\033[0m" - echo "${description:-No description}" -} -function describe-command() { - readarray arr < <(whatis -l "$1" 2>/dev/null) - description="${arr[0]}" - description="${description#* - }" - echo -e "\033[33m${1}\033[0m" - echo "${description:-No description}" -} - -function provide() { - # shellcheck disable=SC2086 - readarray -d ${DEL} -t PROVIDER_ARGS <<<${PROVIDERS[$1]} - eval "${PROVIDER_ARGS[0]}" -} -#function list-commands() { -# IFS=: read -ra path <<<"$PATH" -# for dir in "${path[@]}"; do -# printf '%s\n' "$dir/"* | -# awk -F / -v pre="$GLYPH_COMMAND" '{print $NF "\034command\034\033[31m" pre "\033[0m" $NF;}' -# done | sort -u -#} -function list-commands() { - # Add your path - CUSTOM_BIN_DIR="$HOME/.local/share/uspm/bin/" - - # Og PATH directories - IFS=: read -ra path <<<"$PATH" - - # directory - if [[ -d "$CUSTOM_BIN_DIR" ]]; then - path+=("$CUSTOM_BIN_DIR") - fi - - for dir in "${path[@]}"; do - printf '%s\n' "$dir/"* | - awk -F / -v pre="$GLYPH_COMMAND" '{print $NF "\034command\034\033[31m" pre "\033[0m" $NF;}' - done | sort -u -} -function list-entries() { - # Get locations of desktop application folders according to spec - # https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html - IFS=':' read -ra DIRS <<<"${XDG_DATA_HOME-${HOME}/.local/share}:${XDG_DATA_DIRS-/usr/local/share:/usr/share}" - for i in "${!DIRS[@]}"; do - if [[ ! -d "${DIRS[i]}" ]]; then - unset -v 'DIRS[$i]' - else - DIRS[$i]="${DIRS[i]}/applications/**/*.desktop" - fi - done - - # shellcheck disable=SC2068 - entries ${DIRS[@]} | sort -k2 -} -function entries() { - # shellcheck disable=SC2068 - awk -v pre="$GLYPH_DESKTOP" -F= ' - function desktopFileID(filename){ - sub("^.*applications/", "", filename); - sub("/", "-", filename); - return filename - } - BEGINFILE{ - application=0; - hidden=0; - block=""; - a=0 - - id=desktopFileID(FILENAME) - if(id in fileIds){ - nextfile; - }else{ - fileIds[id]=0 - } - } - /^\[Desktop Entry\]/{block="entry"} - /^Type=Application/{application=1} - /^\[Desktop Action/{ - sub("^\\[Desktop Action ", ""); - sub("\\]$", ""); - block="action"; - a++; - actions[a,"key"]=$0 - } - /^\[X-/{ - sub("^\\[X-", ""); - sub("\\]$", ""); - block="action"; - a++; - actions[a,"key"]=$0 - } - /^Name=/{ (block=="action")? actions[a,"name"]=$2 : name=$2 } - /^NoDisplay=true/{ (block=="action")? actions[a,"hidden"]=1 : hidden=1 } - ENDFILE{ - if (application){ - if (!hidden) - print FILENAME "\034desktop\034\033[33m" pre name "\033[0m"; - if (a>0) - for (i=1; i<=a; i++) - if (!actions[i, "hidden"]) - print FILENAME "\034desktop\034\033[33m" pre name "\033[0m (" actions[i, "name"] ")\034" actions[i, "key"] - } - }' \ - $@ </dev/null - # the empty stdin is needed in case no *.desktop files -} -function run-desktop() { - CMD="$("${0}" generate-command "$@" 2>&3)" - echo "Generated Launch command from .desktop file: ${CMD}" >&3 - eval "${CMD}" -} -function generate-command() { - # Define the search pattern that specifies the block to search for within the .desktop file - PATTERN="^\\\\[Desktop Entry\\\\]" - if [[ -n $2 ]]; then - PATTERN="^\\\\[Desktop Action ${2}\\\\]" - fi - echo "Searching for pattern: ${PATTERN}" >&3 - # 1. We see a line starting [Desktop, but we're already searching: deactivate search again - # 2. We see the specified pattern: start search - # 3. We see an Exec= line during search: remove field codes and set variable - # 3. We see a Path= line during search: set variable - # 4. Finally, build command line - awk -v pattern="${PATTERN}" -v terminal_cmd="${TERMINAL_COMMAND}" -F= ' - BEGIN{a=0;exec=0;path=0} - /^\[Desktop/{ - if(a){ a=0 } - } - $0 ~ pattern{ a=1 } - /^Terminal=/{ - sub("^Terminal=", ""); - if ($0 == "true") { terminal=1 } - } - /^Exec=/{ - if(a && !exec){ - sub("^Exec=", ""); - gsub(" ?%[cDdFfikmNnUuv]", ""); - exec=$0; - } - } - /^Path=/{ - if(a && !path){ path=$2 } - } - END{ - if(path){ printf "cd " path " && " } - printf "exec " - if (terminal){ printf terminal_cmd " " } - print exec - }' "$1" -} - -function shouldAutostart() { - local condition="$(cat $1 | grep "AutostartCondition" | cut -d'=' -f2)" - local filename="${XDG_CONFIG_HOME-${HOME}/.config}/${condition#* }" - case $condition in - if-exists*) - [[ -e $filename ]] - ;; - unless-exists*) - [[ ! -e $filename ]] - ;; - *) - return 0 - ;; - esac -} - -function autostart() { - for application in $(list-autostart); do - if shouldAutostart "$application"; then - (exec setsid /bin/sh -c "$(run-desktop "${application}")" &>/dev/null &) - fi - done -} - -function list-autostart() { - # Get locations of desktop application folders according to spec - # https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html - IFS=':' read -ra DIRS <<<"${XDG_CONFIG_HOME-${HOME}/.config}:${XDG_CONFIG_DIRS-/etc/xdg}" - for i in "${!DIRS[@]}"; do - if [[ ! -d "${DIRS[i]}" ]]; then - unset -v 'DIRS[$i]' - else - DIRS[$i]="${DIRS[i]}/autostart/*.desktop" - fi - done - - # shellcheck disable=SC2068 - awk -v pre="$GLYPH_DESKTOP" -F= ' - function desktopFileID(filename){ - sub("^.*autostart/", "", filename); - sub("/", "-", filename); - return filename - } - BEGINFILE{ - application=0; - block=""; - disabled=0; - a=0 - - id=desktopFileID(FILENAME) - if(id in fileIds){ - nextfile; - }else{ - fileIds[id]=0 - } - } - /^\[Desktop Entry\]/{block="entry"} - /^Type=Application/{application=1} - /^Name=/{ iname=$2 } - /^Hidden=true/{disabled=1} - ENDFILE{ - if (application && !disabled){ - print FILENAME; - } - }' \ - ${DIRS[@]} </dev/null -} - -purge() { - # shellcheck disable=SC2188 - >"${HIST_FILE}" - declare -A PURGE_CMDS - for PROVIDER_NAME in "${!PROVIDERS[@]}"; do - readarray -td ${DEL} PROVIDER_ARGS <<<${PROVIDERS[${PROVIDER_NAME}]} - PURGE_CMD=${PROVIDER_ARGS[3]} - [ -z "${PURGE_CMD}" ] && PURGE_CMD='test -f "{1}" || exit 43' - PURGE_CMDS[$PROVIDER_NAME]="${PURGE_CMD%$'\n'}" - done - for HIST_LINE in "${HIST_LINES[@]#*' '}"; do - readarray -td $'\034' HIST_ENTRY <<<${HIST_LINE} - ENTRY=${HIST_ENTRY[1]} - readarray -td ' ' FILTER <<<${PURGE_CMDS[$ENTRY]//\{1\}/${HIST_ENTRY[0]}} - (eval "${FILTER[@]}" 1>/dev/null) # Run filter command discarding output. We only want the exit status - if [[ $? -ne 43 ]]; then - echo "1 ${HIST_LINE[@]%$'\n'}" >>"${HIST_FILE}" - fi - done -} - -case "$1" in -describe | describe-desktop | describe-command | entries | list-entries | list-commands | list-autostart | generate-command | autostart | run-desktop | provide | purge) - "$@" - exit - ;; -esac -echo "Starting launcher instance with the following providers:" "${!PROVIDERS[@]}" >&3 - -FZFPIPE=$(mktemp -u) -mkfifo "$FZFPIPE" -trap 'rm "$FZFPIPE"' EXIT INT - -# Append Launcher History, removing usage count -(printf '%s' "${HIST_LINES[@]#* }" >>"$FZFPIPE") & - -# Iterate over providers and run their list-command -for PROVIDER_NAME in "${!PROVIDERS[@]}"; do - (bash -c "${0} provide ${PROVIDER_NAME}" >>"$FZFPIPE") & -done - -readarray -t COMMAND_STR <<<$( - ${FZF_COMMAND} --ansi +s -x -d '\034' --nth ..3 --with-nth 3 \ - --print-query \ - --preview "$0 describe {2} {1}" \ - --preview-window="${PREVIEW_WINDOW}" \ - --no-multi --cycle \ - --prompt="${GLYPH_PROMPT-# }" \ - --header='' --no-info --margin='1,2' \ - --color='16,gutter:-1' \ - <"$FZFPIPE" -) || exit 1 -# Get the last line of the fzf output. If there were no matches, it contains the query which we'll treat as a custom command -# If there were matches, it contains the selected item -COMMAND_STR=$(printf '%s\n' "${COMMAND_STR[@]: -1}") -# We still need to format the query to conform to our fallback provider. -# We check for the presence of field separator character to determine if we're dealing with a custom command -if [[ $COMMAND_STR != *$'\034'* ]]; then - COMMAND_STR="${COMMAND_STR}"$'\034user\034'"${COMMAND_STR}"$'\034' - SKIP_HIST=1 # I chose not to include custom commands in the history. If this is a bad idea, open an issue please -fi - -[ -z "$COMMAND_STR" ] && exit 1 - -if [[ -n "${HIST_FILE}" && ! "$SKIP_HIST" ]]; then - # update history - for i in "${!HIST_LINES[@]}"; do - if [[ "${HIST_LINES[i]}" == *" $COMMAND_STR"$'\n' ]]; then - HIST_COUNT=${HIST_LINES[i]%% *} - HIST_LINES[$i]="$((HIST_COUNT + 1)) $COMMAND_STR"$'\n' - match=1 - break - fi - done - if ! ((match)); then - HIST_LINES+=("1 $COMMAND_STR"$'\n') - fi - - printf '%s' "${HIST_LINES[@]}" | sort -nr >"$HIST_FILE" -fi - -# shellcheck disable=SC2086 -readarray -d $'\034' -t PARAMS <<<${COMMAND_STR} -# shellcheck disable=SC2086 -readarray -d ${DEL} -t PROVIDER_ARGS <<<${PROVIDERS[${PARAMS[1]}]} -# Substitute {1}, {2} etc with the correct values -COMMAND=${PROVIDER_ARGS[2]//\{1\}/${PARAMS[0]}} -COMMAND=${COMMAND//\{2\}/${PARAMS[3]}} -COMMAND=${COMMAND%%[[:space:]]} - -if [ -t 1 ]; then - echo "Launching command: ${COMMAND}" >&3 - setsid /bin/sh -c "${COMMAND}" >&/dev/null </dev/null & - sleep 0.01 -else - echo "${COMMAND}" -fi diff --git a/.config/pkgit/builds/cmake.lua b/.config/pkgit/builds/cmake.lua new file mode 100644 index 0000000..e864889 --- /dev/null +++ b/.config/pkgit/builds/cmake.lua @@ -0,0 +1,26 @@ +return { + targets = { + default = { + build = function() + return os.execute("cmake -B build && cmake --build build") + end, + install = function() + return os.execute(privilege_escalator.." cmake --build . --target install") + end, + uninstall = function() + return os.execute(privilege_escalator.." xargs rm < install_manifest.txt") + end, + }, + quiet = { + build = function() + return os.execute("cmake -B build &>/tmp/pkgit_build.log && cmake --build build &>/tmp/pkgit_build.log") + end, + install = function() + return os.execute(privilege_escalator.." cmake --build . --target install &>/tmp/pkgit_build.log") + end, + uninstall = function() + return os.execute(privilege_escalator.." xargs rm < install_manifest.txt &>/tmp/pkgit_build.log") + end, + }, + }, +}
\ No newline at end of file diff --git a/.config/pkgit/builds/init.lua b/.config/pkgit/builds/init.lua new file mode 100644 index 0000000..eacf17e --- /dev/null +++ b/.config/pkgit/builds/init.lua @@ -0,0 +1,6 @@ +return { + ["Makefile"] = require("builds.make"), + ["Makefile.am"] = require("builds.make"), + ["meson.build"] = require("builds.meson"), + ["CMakeLists.txt"] = require("builds.cmake"), +} diff --git a/.config/pkgit/builds/make.lua b/.config/pkgit/builds/make.lua new file mode 100644 index 0000000..03358ca --- /dev/null +++ b/.config/pkgit/builds/make.lua @@ -0,0 +1,26 @@ +return { + targets = { + default = { + build = function() + return os.execute("make -j$(nproc)") + end, + install = function() + return os.execute(privilege_escalator.." make install PREFIX="..prefix) + end, + uninstall = function() + return os.execute(privilege_escalator.." make uninstall PREFIX="..prefix) + end, + }, + quiet = { + build = function() + return os.execute("make &>/tmp/pkgit_build.log") + end, + install = function() + return os.execute(privilege_escalator.." make install PREFIX="..prefix.." &>/tmp/pkgit_build.log") + end, + uninstall = function() + return os.execute(privilege_escalator.." make uninstall PREFIX="..prefix.." &>/tmp/pkgit_build.log") + end, + }, + }, +}
\ No newline at end of file diff --git a/.config/pkgit/builds/meson.lua b/.config/pkgit/builds/meson.lua new file mode 100644 index 0000000..bfc9b14 --- /dev/null +++ b/.config/pkgit/builds/meson.lua @@ -0,0 +1,26 @@ +return { + targets = { + default = { + build = function() + return os.execute("meson setup build --prefix "..prefix.." && meson compile -C build") + end, + install = function() + return os.execute("cd build && "..privilege_escalator.." meson install") + end, + uninstall = function() + return os.execute("cd build && "..privilege_escalator.." ninja uninstall") + end, + }, + quiet = { + build = function() + return os.execute("meson setup build --prefix "..prefix.." &>/tmp/pkgit_build.log && meson compile -C build &>/tmp/pkgit_build.log") + end, + install = function() + return os.execute("cd build && "..privilege_escalator.." meson install &>/tmp/pkgit_build.log") + end, + uninstall = function() + return os.execute("cd build && "..privilege_escalator.." ninja uninstall &>/tmp/pkgit_build.log") + end, + }, + } +}
\ No newline at end of file diff --git a/.config/pkgit/init.lua b/.config/pkgit/init.lua new file mode 100644 index 0000000..a7bf371 --- /dev/null +++ b/.config/pkgit/init.lua @@ -0,0 +1,16 @@ +privilege_escalator = "/bin/doas" +local home = os.getenv("HOME") +prefix = home.."/.local" +install_directories = { + bin = prefix.."/bin", + include = prefix.."/include", + lib = prefix.."/lib", + src = prefix.."/share/pkgit", +} + +on_update = function() + return os.execute("ls") +end + +repositories = require("repos.init") +build_systems = require("builds.init") diff --git a/.config/pkgit/repos/boomer.lua b/.config/pkgit/repos/boomer.lua new file mode 100644 index 0000000..20f9735 --- /dev/null +++ b/.config/pkgit/repos/boomer.lua @@ -0,0 +1,27 @@ +return { + url = "https://github.com/tsoding/boomer", + targets = { + default = { + build = function() + return os.execute("nimble build") + end, + install = function() + return os.execute(privilege_escalator.." cp boomer "..install_directories.bin) + end, + uninstall = function() + return os.execute(privilege_escalator.." rm "..install_directories.bin.."/boomer ") + end, + }, + quiet = { + build = function() + return os.execute("nimble build &>/tmp/pkgit_build.log") + end, + install = function() + return os.execute(privilege_escalator.." cp boomer "..install_directories.bin.." &>/tmp/pkgit_build.log") + end, + uninstall = function() + return os.execute(privilege_escalator.." rm "..install_directories.bin.."/boomer &>/tmp/pkgit_build.log") + end, + }, + }, +} diff --git a/.config/pkgit/repos/busybox.lua b/.config/pkgit/repos/busybox.lua new file mode 100644 index 0000000..2e4f8c3 --- /dev/null +++ b/.config/pkgit/repos/busybox.lua @@ -0,0 +1,38 @@ +return { + url = "https://git.busybox.net/busybox/", + targets = { + default = { + build = function() + e,h,c = os.execute("make defconfig") + if c ~= 0 then + return c + end + e,h,c = os.execute("sed -i 's/CONFIG_TC=y/CONFIG_TC=n/' .config") + if c ~= 0 then + print("Configuration Failure: ", c, type(c)) + print("GIVEN UP") + return c + end + e,h,c = os.execute("sed -i 's/# CONFIG_TC is not set/CONFIG_TC=n/' .config") + if c ~= 0 then + print("Configuration Failure: ", c, type(c)) + print("GIVEN UP") + return c + end + e,h,c = os.execute("make") + if c ~= 0 then + print("Compilation Error: ", c, type(c)) + print("GIVEN UP") + return c + end + return 0 + end, + install = function() + return os.execute("make CONFIG_PREFIX="..prefix.." install") + end, + uninstall = function() + return os.execute("make CONFIG_PREFIX="..prefix.." uninstall") + end, + } + } +}
\ No newline at end of file diff --git a/.config/pkgit/repos/cmark.lua b/.config/pkgit/repos/cmark.lua new file mode 100644 index 0000000..4da7390 --- /dev/null +++ b/.config/pkgit/repos/cmark.lua @@ -0,0 +1,16 @@ +return { + url = "https://github.com/commonmark/cmark", + targets = { + default = { + build = function() + os.execute("make INSTALL_PREFIX="..prefix) + end, + install = function() + os.execute("make install INSTALL_PREFIX="..prefix) + end, + uninstall = function() + os.execute("make uninstall INSTALL_PREFIX="..prefix) + end, + } + } +} diff --git a/.config/pkgit/repos/cmommy.lua b/.config/pkgit/repos/cmommy.lua new file mode 100644 index 0000000..26ba432 --- /dev/null +++ b/.config/pkgit/repos/cmommy.lua @@ -0,0 +1,16 @@ +return { + url = "https://git.bwaaa.monster/cmommy", + targets = { + default = { + build = function() + os.execute("make") + end, + install = function() + os.execute("cp ./bin/mommy "..install_directories.bin) + end, + uninstall = function() + os.execute("rm "..install_directories.bin.."/mommy") + end, + }, + }, +}
\ No newline at end of file diff --git a/.config/pkgit/repos/cowsay.lua b/.config/pkgit/repos/cowsay.lua new file mode 100644 index 0000000..630d746 --- /dev/null +++ b/.config/pkgit/repos/cowsay.lua @@ -0,0 +1,14 @@ +return { + url = "https://github.com/cowsay-org/cowsay", + targets = { + default = { + install = function() + os.execute("make install prefix="..prefix) + end, + uninstall = function() + os.execute("make uninstall prefix="..prefix) + os.execute("rm -rf "..prefix.."/share/cowsay") + end, + } + } +} diff --git a/.config/pkgit/repos/git.lua b/.config/pkgit/repos/git.lua new file mode 100644 index 0000000..3e2d473 --- /dev/null +++ b/.config/pkgit/repos/git.lua @@ -0,0 +1,19 @@ +return { + url = "https://github.com/git/git", + targets = { + default = { + build = function() + return os.execute("make NO_REGEX=NeedsStartEnd prefix="..prefix) + end, + install = function() + return os.execute("make NO_REGEX=NeedsStartEnd install prefix="..prefix) + end, + on_update = function() + return os.execute("echo 'HEYHEYHEYHEYHEYHEYHEY IT WORKED (git)'") + end, + uninstall = function() + return os.execute("make NO_REGEX=NeedsStartEnd install prefix="..prefix) + end, + }, + }, +} diff --git a/.config/pkgit/repos/imagemagick.lua b/.config/pkgit/repos/imagemagick.lua new file mode 100644 index 0000000..bd04aae --- /dev/null +++ b/.config/pkgit/repos/imagemagick.lua @@ -0,0 +1,13 @@ +return { + url = "https://github.com/ImageMagick/ImageMagick.git", + targets = { + default = { + build = function() + return os.execute("./configure --prefix="..prefix.." && make") + end, + install = function() + return os.execute(privilege_escalator.." make install") + end, + }, + } +}
\ No newline at end of file diff --git a/.config/pkgit/repos/init.lua b/.config/pkgit/repos/init.lua new file mode 100644 index 0000000..3109779 --- /dev/null +++ b/.config/pkgit/repos/init.lua @@ -0,0 +1,20 @@ +return { + pkgit = { url = "https://git.symlinx.net/pkgit", }, + pipemixer = { url = "https://github.com/heather7283/pipemixer", }, + luajit = { url = "https://luajit.org/git/luajit.git", }, + fetchit = { url = "https://codeberg.org/nzuum/fetchit", }, + wally = { url = "https://codeberg.org/RealFCC/wally", }, + ssuika = require("repos.ssuika"), + ImageMagick = require("repos.imagemagick"), + olivine = require("repos.olivine"), + cmommy = require("repos.cmommy"), + tux = require("repos.tux"), + busybox = require("repos.busybox"), + boomer = require("repos.boomer"), + cowsay = require("repos.cowsay"), + scrot = require("repos.scrot"), + cmark = require("repos.cmark"), + openssh = require("repos.openssh"), + vlang = require("repos.v"), + git = require("repos.git") +}
\ No newline at end of file diff --git a/.config/pkgit/repos/musl.lua b/.config/pkgit/repos/musl.lua new file mode 100644 index 0000000..df535af --- /dev/null +++ b/.config/pkgit/repos/musl.lua @@ -0,0 +1,29 @@ +return { + url = "https://git.musl-libc.org/git/musl", + targets = { + default = { + build = function() + config_cmd = "./configure --bindir="..install_directories.bin.." --libdir="..install_directories.lib.." --includedir="..install_directories.include.." --syslibdir="..install_directories.lib + e, h, c = os.execute(config_cmd) + if c ~= 0 then + print("Configuration Failure: ", c, type(c)) + print("GIVEN UP") + return c + end + e,h,c = os.execute("make") + if c ~= 0 then + print("Compilation Error: ", c, type(c)) + print("GIVEN UP") + return c + end + return 0 + end, + install = function() + return os.execute("make DESTDIR=" .. prefix .. " install") + end, + uninstall = function() + return os.execute("make DESTDIR=" .. prefix .. " uninstall") + end, + }, + }, +} diff --git a/.config/pkgit/repos/olivine.lua b/.config/pkgit/repos/olivine.lua new file mode 100644 index 0000000..74f4d01 --- /dev/null +++ b/.config/pkgit/repos/olivine.lua @@ -0,0 +1,19 @@ +return { + url = "https://gitlab.com/Oglo12/olivine.git", + version = "dev", + targets = { + default = { + build = function() + os.execute("make UI_BACKEND=sdl3 MODE=release PREFIX="..prefix) + end, + install = function() + os.execute("make install UI_BACKEND=sdl3 MODE=release PREFIX="..prefix) + end, + uninstall = function() + os.execute("rm "..install_directories.bin.."/olv "..install_directories.bin.."/olv-sdl3") + os.execute("rm -rf "..prefix.."/share/olivine/v0.0.1/lua_mod "..prefix.."/share/olivine/v0.0.1/User_Manual") + os.execute("rm -rf "..install_directories.src.."/olivine") + end, + } + } +} diff --git a/.config/pkgit/repos/openssh.lua b/.config/pkgit/repos/openssh.lua new file mode 100644 index 0000000..e2cee4d --- /dev/null +++ b/.config/pkgit/repos/openssh.lua @@ -0,0 +1,17 @@ +return { + url = "https://github.com/openssh/openssh-portable", + targets = { + default = { + build = function() + print(os.execute("./configure --prefix="..prefix)) + print(os.execute("make prefix="..prefix)) + end, + install = function() + os.execute("make install prefix="..prefix) + end, + uninstall = function() + os.execute("make uninstall prefix="..prefix) + end, + } + } +} diff --git a/.config/pkgit/repos/pkgit.lua b/.config/pkgit/repos/pkgit.lua new file mode 100644 index 0000000..99e3f78 --- /dev/null +++ b/.config/pkgit/repos/pkgit.lua @@ -0,0 +1,27 @@ +return { + url = "https://git.symlinx.net/pkgit", + targets = { + default = { + build = function() + return os.execute("make") + end, + install = function() + return os.execute("make install PREFIX="..prefix) + end, + uninstall = function() + return os.execute("make uninstall PREFIX="..prefix) + end, + }, + quiet = { + build = function() + local output = io.popen("make"):read("*a") + end, + install = function() + local output = io.popen("make install PREFIX="..prefix):read("*a") + end, + uninstall = function() + local output = io.popen("make uninstall PREFIX="..prefix):read("*a") + end, + }, + } +} diff --git a/.config/pkgit/repos/scrot.lua b/.config/pkgit/repos/scrot.lua new file mode 100644 index 0000000..969554e --- /dev/null +++ b/.config/pkgit/repos/scrot.lua @@ -0,0 +1,13 @@ +return { + url = "https://github.com/resurrecting-open-source-projects/scrot", + targets = { + default = { + build = function() + return os.execute("./autogen.sh && ./configure --prefix="..prefix.." && make") + end, + install = function() + return os.execute("make install") + end, + } + } +} diff --git a/.config/pkgit/repos/ssuika.lua b/.config/pkgit/repos/ssuika.lua new file mode 100644 index 0000000..3611b2a --- /dev/null +++ b/.config/pkgit/repos/ssuika.lua @@ -0,0 +1,16 @@ +return { + url = "https://codeberg.org/nzuum/ssuika", + targets = { + default = { + build = function() + os.execute("make") + end, + install = function() + os.execute("cp bin/ssuika "..install_directories.bin) + end, + uninstall = function() + os.execute("rm "..install_directories.bin.."/ssuika") + end, + } + } +} diff --git a/.config/pkgit/repos/tinycc.lua b/.config/pkgit/repos/tinycc.lua new file mode 100644 index 0000000..02f28b2 --- /dev/null +++ b/.config/pkgit/repos/tinycc.lua @@ -0,0 +1,29 @@ +return { + url = "https://repo.or.cz/tinycc.git", + targets = { + default = { + build = function() + config_cmd = "./configure --config-musl --exec-prefix="..prefix.." --prefix="..prefix.."/usr" + e, h, c = os.execute(config_cmd) + if c ~= 0 then + print("Configuration Failure: ", c, type(c)) + print("GIVEN UP") + return c + end + e,h,c = os.execute("make") + if c ~= 0 then + print("Compilation Error: ", c, type(c)) + print("GIVEN UP") + return c + end + return 0 + end, + install = function() + return os.execute("make install") + end, + uninstall = function() + return os.execute("make uninstall") + end, + } + } +} diff --git a/.config/pkgit/repos/tux.lua b/.config/pkgit/repos/tux.lua new file mode 100644 index 0000000..4616faa --- /dev/null +++ b/.config/pkgit/repos/tux.lua @@ -0,0 +1,10 @@ +return { + url = "https://github.com/JulB3y/tux", + targets = { + default = { + build = function() + return os.execute("make release") + end, + } + } +}
\ No newline at end of file diff --git a/.config/pkgit/repos/v.lua b/.config/pkgit/repos/v.lua new file mode 100644 index 0000000..aa2f9c2 --- /dev/null +++ b/.config/pkgit/repos/v.lua @@ -0,0 +1,30 @@ +return { + url = "https://github.com/vlang/v", + targets = { + default = { + build = function() + print("hello") + return os.execute("make") + end, + install = function() + print("hello") + return os.execute("./v symlink "..install_directories.bin) + end, + uninstall = function() + print("hello") + return os.execute("rm "..install_directories.bin.."/v") + end, + }, + --quiet = { + -- build = function() + -- return os.execute("make &> /tmp/pkgit_build.log") + -- end, + -- install = function() + -- return os.execute("./v symlink "..install_directories.bin.." &> /tmp/pkgit_build.log") + -- end, + -- uninstall = function() + -- return os.execute("rm "..install_directories.bin.."/v &> /tmp/pkgit_build.log") + -- end, + --}, + }, +} diff --git a/.config/pkgit/repos/zig.lua b/.config/pkgit/repos/zig.lua new file mode 100644 index 0000000..e03a997 --- /dev/null +++ b/.config/pkgit/repos/zig.lua @@ -0,0 +1,13 @@ +return { + url = "https://codeberg.org/ziglang/zig.git", + targets = { + default = { + build = function() + return os.execute("mkdir build && cd build && cmake ..") + end, + install = function() + return os.execute("make install CMAKE_PREFIX_PATH="..prefix) + end, + }, + }, +} diff --git a/.config/waybar/config.jsonc b/.config/waybar/config.jsonc new file mode 100644 index 0000000..352880c --- /dev/null +++ b/.config/waybar/config.jsonc @@ -0,0 +1,112 @@ +{ + // "layer": "top", // Waybar at top layer + // "position": "bottom", // Waybar position (top|bottom|left|right) + // "height": 30, // Waybar height (to be removed for auto height) + // "width": 1280, // Waybar width + "margin-top": 0, + "margin-left": 0, + "margin-right": 0, + "spacing": 8, + "modules-left": [ + //"dwl/tags", + //"niri/workspaces", + "hyprland/workspaces", + //"sway/workspaces", + "custom/media" + ], + "modules-center": [ + ], + "modules-right": [ + "tray", + "battery", + ], + "niri/workspaces": { + "format": "{name}" + }, + "hyprland/workspaces": { + "format": "{name}" + }, + "dwl/tags": { + "num-tags": 9 + }, + "sway/workspaces": { + "format": "{name}" + }, + "tray": { + "icon-size": 16, + "spacing": 10 + }, + "cpu": { + "format": "{usage}% ", + "tooltip": false + }, + "memory": { + "format": "{}% " + }, + "temperature": { + // "thermal-zone": 2, + // "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", + "critical-threshold": 80, + // "format-critical": "{temperatureC}°C {icon}", + "format": "{temperatureC}°C {icon}", + "format-icons": ["", "", ""] + }, + "battery": { + "states": { + // "good": 95, + "warning": 30, + "critical": 15 + }, + "format": "{capacity}% {icon}", + "format-full": "{capacity}% {icon}", + "format-charging": "{capacity}% ", + "format-plugged": "{capacity}% ", + "format-alt": "{time} {icon}", + // "format-good": "", // An empty format will hide the module + // "format-full": "", + "format-icons": ["", "", "", "", ""] + }, + "pulseaudio": { + // "scroll-step": 1, // %, can be a float + "format": "{volume}% {icon} {format_source}", + "format-bluetooth": "{volume}% {icon} {format_source}", + "format-bluetooth-muted": " {icon} {format_source}", + "format-muted": " {format_source}", + "format-source": "{volume}% ", + "format-source-muted": "", + "format-icons": { + "headphone": "", + "hands-free": "", + "headset": "", + "phone": "", + "portable": "", + "car": "", + "default": ["", "", ""] + }, + "on-click": "pavucontrol" + }, + "custom/media": { + "format": "{icon} {}", + "return-type": "json", + "max-length": 40, + "format-icons": { + "spotify": "", + "default": "🎜" + }, + "escape": true, + "exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder + // "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name + }, + "custom/power": { + "format" : "⏻ ", + "tooltip": false, + "menu": "on-click", + "menu-file": "$HOME/.config/waybar/power_menu.xml", // Menu file in resources folder + "menu-actions": { + "shutdown": "shutdown", + "reboot": "reboot", + "suspend": "systemctl suspend", + "hibernate": "systemctl hibernate" + } + } +}
\ No newline at end of file diff --git a/.config/waybar/style.css b/.config/waybar/style.css new file mode 100644 index 0000000..047740e --- /dev/null +++ b/.config/waybar/style.css @@ -0,0 +1,87 @@ +@define-color black #0f0f0f; +@define-color gray-0 #131414; +@define-color gray-1 #1D1F1E; +@define-color gray-2 #272A28; +@define-color gray-3 #3A3F3C; +@define-color gray-4 #585F5A; +@define-color gray-5 #6B746E; +@define-color gray-6 #878E7A; +@define-color gray-7 #999C8B; +@define-color gray-8 #B6B69A; +@define-color gray-9 #D8CCB4; +@define-color gray-10 #E3DAC9; +@define-color white #F9EEE5; +@define-color light-yellow #efbe71; +@define-color yellow #ef944d; + +* { + border-radius: 0px; + font-family: Maple Mono NF; + font-weight: 600; + font-size: 14px; + margin: 1px; +} + +window#waybar { + background-color: @black; + border: 2px solid @black; + border-radius: 0px; +} + +#workspaces, #tags { + border: none; + background: @gray-1; + box-shadow: none; + text-shadow: none; + padding: 4px; + margin: 4px; +} + +#workspaces button, #tags button { + border: none; + border-radius: 0px; + background: @gray-2; + box-shadow: none; + text-shadow: none; + padding: 2 12px; + margin: 2px; + color: @light-yellow; +} + +#workspaces button:hover, #tags button:hover { + border: none; + background: @gray-3; + font-weight: 600; + color: @light-yellow; +} + +#workspaces button.active, button.focused, #tags button.active, button.focused { + border: none; + background: @yellow; + color: @black; + padding: 2 24px; +} + +#workspaces button.active:hover, button.focused:hover, #tags button.active:hover, button.focused:hover { + border: none; + background: @light-yellow; + color: @black; + padding: 2 24px; +} + +#clock, #cpu, #pulseaudio, #memory, #temperature, #battery, #tray { + border: none; + background: @gray-1; + box-shadow: none; + text-shadow: none; + padding: 0 16px; + margin: 4px; + color: @white; +} + +#clock:hover, #cpu:hover, #pulseaudio:hover, #memory:hover, #temperature:hover, #battery:hover, #tray:hover { + border: none; + background: @gray-3; + font-weight: 600; + color: @white; +} |
