Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ COPY build_files /
# Base Image
FROM ${BASE_IMAGE}

# Copy dot_files into the image at /usr/share/binaryos/config
COPY dot_files /usr/share/binaryos/config

## Other possible base images include:
# FROM ghcr.io/ublue-os/bazzite:latest
# FROM ghcr.io/ublue-os/bluefin-dx-nvidia:stable-daily
Expand Down
13 changes: 13 additions & 0 deletions build_files/binaryos-config
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

set -euo pipefail

USER_HOME=$(getent passwd "$USER" | cut -d: -f6)
HYPR_CONFIG_DIR="$USER_HOME/.config/hypr"
HYPR_CONFIG_FILE="$HYPR_CONFIG_DIR/hyprland.conf"
DEFAULT_HYPR_CONFIG_DIR="/usr/share/binaryos/config/hypr"

if [ ! -f "$HYPR_CONFIG_FILE" ]; then
mkdir -p "$HYPR_CONFIG_DIR"
echo "source = $DEFAULT_HYPR_CONFIG_DIR/hyprland.conf" > "$HYPR_CONFIG_FILE"
fi
11 changes: 11 additions & 0 deletions build_files/binaryos-config.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Unit]
Description=BinaryOS Config
After=graphical-session.target
PartOf=hyprland-session.target

[Service]
Type=oneshot
ExecStart=/usr/bin/binaryos-config

[Install]
WantedBy=hyprland-session.target
31 changes: 23 additions & 8 deletions build_files/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,43 @@ set -ouex pipefail
# List of rpmfusion packages can be found here:
# https://mirrors.rpmfusion.org/mirrorlist?path=free/fedora/updates/39/x86_64/repoview/index.html&protocol=https&redirect=1

# hyprland COPR from solopasha
# Compositor / Hyprland Utilities
dnf5 -y copr enable solopasha/hyprland
dnf5 -y install xdg-desktop-portal-hyprland hyprland hyprland-contrib hyprland-plugins hyprpaper hyprpicker hypridle hyprshot hyprlock pyprland waybar-git xdg-desktop-portal-hyprland hyprland-qtutils
dnf5 -y install xdg-desktop-portal-hyprland hyprland hyprland-contrib hyprland-plugins hyprpaper hyprpicker hypridle hyprshot hyprlock pyprland xdg-desktop-portal-hyprland hyprland-qtutils

# Walker
# Remove extra things
# TODO: Figure out what we don't need from solopasha/hyprland
#
# GUI Shell
dnf5 -y copr enable killcrb/ashell
dnf5 -y install ashell

# Application Launcher
dnf5 -y copr enable errornointernet/walker
dnf5 -y install walker
dnf5 -y install elephant

# swayosd
# On Screen Display
dnf5 -y copr enable markupstart/SwayOSD
dnf5 -y install swayosd

# other related packages found in main Fedora repos:
dnf5 -y install mako swaybg
# Desktop Notifications
dnf5 -y install mako
systemctl --global mask mako.service

# Wezterm
# Terminal
dnf5 -y copr enable wezfurlong/wezterm-nightly
dnf5 -y install wezterm

# Neovim
# Editor
dnf5 -y copr enable agriffis/neovim-nightly
dnf5 -y install neovim python3-neovim

# Install binaryos config setup script and service
install -Dm755 /ctx/binaryos-config /usr/bin/binaryos-config
install -Dm644 /ctx/binaryos-config.service /usr/lib/systemd/user/binaryos-config.service

# Enable hyprland config setup service
systemctl --global enable binaryos-config.service

# systemctl enable podman.socket
137 changes: 137 additions & 0 deletions dot_files/fish/conf.d/hydro.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
status is-interactive || exit

set --global _hydro_git _hydro_git_$fish_pid

function $_hydro_git --on-variable $_hydro_git
commandline --function repaint
end

function _hydro_pwd --on-variable PWD --on-variable hydro_ignored_git_paths --on-variable fish_prompt_pwd_dir_length
set --local git_root (command git --no-optional-locks rev-parse --show-toplevel 2>/dev/null)
set --local git_base (string replace --all --regex -- "^.*/" "" "$git_root")
set --local path_sep /

test "$fish_prompt_pwd_dir_length" = 0 && set path_sep

if set --query git_root[1] && ! contains -- $git_root $hydro_ignored_git_paths
set --erase _hydro_skip_git_prompt
else
set --global _hydro_skip_git_prompt
end

set --global _hydro_pwd (
string replace --ignore-case -- ~ \~ $PWD |
string replace -- "/$git_base/" /:/ |
string replace --regex --all -- "(\.?[^/]{"(
string replace --regex --all -- '^$' 1 "$fish_prompt_pwd_dir_length"
)"})[^/]*/" "\$1$path_sep" |
string replace -- : "$git_base" |
string replace --regex -- '([^/]+)$' "\x1b[1m\$1\x1b[22m" |
string replace --regex --all -- '(?!^/$)/|^$' "\x1b[2m/\x1b[22m"
)
end

function _hydro_postexec --on-event fish_postexec
set --local last_status $pipestatus
set --global _hydro_status "$_hydro_newline$_hydro_color_prompt$hydro_symbol_prompt"

for code in $last_status
if test $code -ne 0
set --global _hydro_status "$_hydro_color_error| "(echo $last_status)" $_hydro_newline$_hydro_color_prompt$_hydro_color_error$hydro_symbol_prompt"
break
end
end

test "$CMD_DURATION" -lt $hydro_cmd_duration_threshold && set _hydro_cmd_duration && return

set --local secs (math --scale=1 $CMD_DURATION/1000 % 60)
set --local mins (math --scale=0 $CMD_DURATION/60000 % 60)
set --local hours (math --scale=0 $CMD_DURATION/3600000)

set --local out

test $hours -gt 0 && set --local --append out $hours"h"
test $mins -gt 0 && set --local --append out $mins"m"
test $secs -gt 0 && set --local --append out $secs"s"

set --global _hydro_cmd_duration "$out "
end

function _hydro_prompt --on-event fish_prompt
set --query _hydro_status || set --global _hydro_status "$_hydro_newline$_hydro_color_prompt$hydro_symbol_prompt"
set --query _hydro_pwd || _hydro_pwd

command kill $_hydro_last_pid 2>/dev/null

set --query _hydro_skip_git_prompt && set $_hydro_git && return

fish --private --command "
set branch (
command git symbolic-ref --short HEAD 2>/dev/null ||
command git describe --tags --exact-match HEAD 2>/dev/null ||
command git rev-parse --short HEAD 2>/dev/null |
string replace --regex -- '(.+)' '@\$1'
)

test -z \"\$$_hydro_git\" && set --universal $_hydro_git \"\$branch \"

! command git diff-index --quiet HEAD 2>/dev/null ||
count (command git ls-files --others --exclude-standard) >/dev/null && set info \"$hydro_symbol_git_dirty\"

for fetch in $hydro_fetch false
command git rev-list --count --left-right @{upstream}...@ 2>/dev/null |
read behind ahead

switch \"\$behind \$ahead\"
case \" \" \"0 0\"
case \"0 *\"
set upstream \" $hydro_symbol_git_ahead\$ahead\"
case \"* 0\"
set upstream \" $hydro_symbol_git_behind\$behind\"
case \*
set upstream \" $hydro_symbol_git_ahead\$ahead $hydro_symbol_git_behind\$behind\"
end

set --universal $_hydro_git \"\$branch\$info\$upstream \"

test \$fetch = true && command git fetch --no-tags 2>/dev/null
end
" &

set --global _hydro_last_pid $last_pid
end

function _hydro_fish_exit --on-event fish_exit
set --erase $_hydro_git
end

function _hydro_uninstall --on-event hydro_uninstall
set --names |
string replace --filter --regex -- "^(_?hydro_)" "set --erase \$1" |
source
functions --erase (functions --all | string match --entire --regex "^_?hydro_")
end

set --global hydro_color_normal (set_color normal)

for color in hydro_color_{pwd,git,error,prompt,duration}
function $color --on-variable $color --inherit-variable color
set --query $color && set --global _$color (set_color $$color)
end && $color
end

function hydro_multiline --on-variable hydro_multiline
if test "$hydro_multiline" = true
set --global _hydro_newline "\n"
else
set --global _hydro_newline ""
end
end && hydro_multiline

set --query hydro_color_error || set --global hydro_color_error $fish_color_error
set --query hydro_symbol_prompt || set --global hydro_symbol_prompt ❱
set --query hydro_symbol_git_dirty || set --global hydro_symbol_git_dirty •
set --query hydro_symbol_git_ahead || set --global hydro_symbol_git_ahead ↑
set --query hydro_symbol_git_behind || set --global hydro_symbol_git_behind ↓
set --query hydro_multiline || set --global hydro_multiline false
set --query hydro_cmd_duration_threshold || set --global hydro_cmd_duration_threshold 1000
1 change: 1 addition & 0 deletions dot_files/fish/conf.d/rustup.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
source "$HOME/.cargo/env.fish"
35 changes: 35 additions & 0 deletions dot_files/fish/config.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
if status is-interactive
# Commands to run in interactive sessions can go here

# VIM Mode
fish_vi_key_bindings

# Editor
set -gx EDITOR nvim

# Prompt
set --global hydro_multiline true
set --global fish_prompt_pwd_dir_length 100
set --global hydro_color_pwd $fish_color_comment
set --global hydro_color_git $fish_color_operator
set --global hydro_color_error $fish_color_error
set --global hydro_color_prompt $fish_color_command
set --global hydro_color_duration $fish_color_param

# Env Variables
set -Ux GOOGLE_CLOUD_PROJECT ibexio-src

# Path
fish_add_path $HOME/.local/bin
fish_add_path $HOME/.npm-packages/bin
fish_add_path $HOME/.cargo/bin
fish_add_path $HOME/Code/flutter/bin
fish_add_path $HOME/go/bin

# Alias
alias wezterm 'flatpak run org.wezfurlong.wezterm'
end

### bling.fish source start
test -f /usr/share/ublue-os/bluefin-cli/bling.fish && source /usr/share/ublue-os/bluefin-cli/bling.fish
### bling.fish source end
86 changes: 86 additions & 0 deletions dot_files/fish/fish_variables
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# This file contains fish universal variable definitions.
# VERSION: 3.0
SETUVAR --export EXA_STANDARD_OPTIONS:\x2d\x2dgroup\x1e\x2d\x2dheader\x1e\x2d\x2dgroup\x2ddirectories\x2dfirst\x1e\x2d\x2dicons
SETUVAR --export GOOGLE_CLOUD_PROJECT:ibexio\x2dsrc
SETUVAR __fish_initialized:3800
SETUVAR _hydro_git_1088236:charles\x2dsup\x2d743\x20
SETUVAR _hydro_git_1088826:charles\x2dsup\x2d743\x20
SETUVAR _hydro_git_1090793:charles\x2dsup\x2d743\x20
SETUVAR _hydro_git_11278:charles\x2dsrv\x2d449\u2022\x20
SETUVAR _hydro_git_11288:onboard\x20
SETUVAR _hydro_git_11462:onboard\x20
SETUVAR _hydro_git_121214:charles\x2deng\x2d15\x20
SETUVAR _hydro_git_1602414:charles\x2ddevpod\u2022\x20
SETUVAR _hydro_git_1991287:charles\x2dsup\x2d598\u2022\x20
SETUVAR _hydro_git_222390:charles\x2deng\x2d230\x20
SETUVAR _hydro_git_264321:charles\x2deng\x2d230\u2022\x20
SETUVAR _hydro_git_264428:charles\x2deng\x2d230\u2022\x20
SETUVAR _hydro_git_264643:client\x2dimport\x2dfamily\x20
SETUVAR _hydro_git_27695:charles\x2deng\x2d148\u2022\x20\u21914\x20
SETUVAR _hydro_git_2809224:charles\x2ddevpod\x20
SETUVAR _hydro_git_293996:main\u2022\x20
SETUVAR _hydro_git_294696:main\u2022\x20
SETUVAR _hydro_git_301432:main\x20
SETUVAR _hydro_git_3076414:onboarding\x20
SETUVAR _hydro_git_3115435:onboarding\x20
SETUVAR _hydro_git_31341:charles\x2dsrv\x2d332\x20
SETUVAR _hydro_git_3179190:onboard\u2022\x20
SETUVAR _hydro_git_3188953:onboard\u2022\x20
SETUVAR _hydro_git_3223428:onboard\u2022\x20
SETUVAR _hydro_git_3223609:onboard\u2022\x20
SETUVAR _hydro_git_3223793:onboard\u2022\x20
SETUVAR _hydro_git_3270698:onboard\u2022\x20
SETUVAR _hydro_git_3310547:ai\x2dclient\x2dmatching\u2022\x20
SETUVAR _hydro_git_33114:charles\x2deng\x2d133\u2022\x20
SETUVAR _hydro_git_3347834:\x1d
SETUVAR _hydro_git_343422:main\u2022\x20
SETUVAR _hydro_git_34638:charles\x2deng\x2d133\x20
SETUVAR _hydro_git_34984:ai\x2dcoach\x2dmatching\u2022\x20
SETUVAR _hydro_git_3622049:onboarding\x20
SETUVAR _hydro_git_3743035:onboard\u2022\x20
SETUVAR _hydro_git_3850354:\x1d
SETUVAR _hydro_git_4026738:charles\x2ddev\x2dbashrc\u2022\x20
SETUVAR _hydro_git_4107649:charles\x2dsrv\x2d256\u2022\x20
SETUVAR _hydro_git_4145898:charles\x2dsrv\x2d256\u2022\x20
SETUVAR _hydro_git_4150144:charles\x2dsrv\x2d256\u2022\x20
SETUVAR _hydro_git_4164312:charles\x2dsrv\x2d256\u2022\x20
SETUVAR _hydro_git_43562:ai\x2dcoach\x2dmatching\u2022\x20
SETUVAR _hydro_git_43801:ai\x2dcoach\x2dmatching\u2022\x20
SETUVAR _hydro_git_44056:ai\x2dcoach\x2dmatching\x20
SETUVAR _hydro_git_441742:charles\x2deng\x2d15b\u2022\x20
SETUVAR _hydro_git_455034:charles\x2deng\x2d15b\u2022\x20
SETUVAR _hydro_git_470026:qbo\x20
SETUVAR _hydro_git_724865:charles\x2dsrv\x2d449\u2022\x20
SETUVAR _hydro_git_725109:charles\x2dsrv\x2d449\u2022\x20
SETUVAR _hydro_git_725293:charles\x2dsrv\x2d449\u2022\x20
SETUVAR _hydro_git_8132:master\x20
SETUVAR _hydro_git_9213:onboard\x20
SETUVAR fish_color_autosuggestion:brblack
SETUVAR fish_color_cancel:\x2dr
SETUVAR fish_color_command:blue
SETUVAR fish_color_comment:red
SETUVAR fish_color_cwd:green
SETUVAR fish_color_cwd_root:red
SETUVAR fish_color_end:green
SETUVAR fish_color_error:brred
SETUVAR fish_color_escape:brcyan
SETUVAR fish_color_history_current:\x2d\x2dbold
SETUVAR fish_color_host:normal
SETUVAR fish_color_host_remote:yellow
SETUVAR fish_color_normal:normal
SETUVAR fish_color_operator:brcyan
SETUVAR fish_color_param:cyan
SETUVAR fish_color_quote:yellow
SETUVAR fish_color_redirection:cyan\x1e\x2d\x2dbold
SETUVAR fish_color_search_match:white\x1e\x2d\x2dbackground\x3dbrblack
SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack
SETUVAR fish_color_status:red
SETUVAR fish_color_user:brgreen
SETUVAR fish_color_valid_path:\x2d\x2dunderline
SETUVAR fish_key_bindings:fish_vi_key_bindings
SETUVAR fish_pager_color_completion:normal
SETUVAR fish_pager_color_description:yellow\x1e\x2di
SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline
SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan
SETUVAR fish_pager_color_selected_background:\x2dr
SETUVAR fish_user_paths:/var/home/binarypie/Code/flutter/bin\x1e/var/home/binarypie/\x2ecargo/bin\x1e/var/home/binarypie/\x2elocal/bin
Empty file added dot_files/fish/fishd.tmp.ehcEoz
Empty file.
40 changes: 40 additions & 0 deletions dot_files/gitui/key_bindings.ron
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// Note:
// If the default key layout is lower case,
// and you want to use `Shift + q` to trigger the exit event,
// the setting should like this `exit: Some(( code: Char('Q'), modifiers: "SHIFT")),`
// The Char should be upper case, and the modifier should be set to "SHIFT".
//
// Note:
// find `KeysList` type in src/keys/key_list.rs for all possible keys.
// every key not overwritten via the config file will use the default specified there
(
open_help: Some(( code: F(1), modifiers: "")),

move_left: Some(( code: Char('h'), modifiers: "")),
move_right: Some(( code: Char('l'), modifiers: "")),
move_up: Some(( code: Char('k'), modifiers: "")),
move_down: Some(( code: Char('j'), modifiers: "")),

popup_up: Some(( code: Char('p'), modifiers: "CONTROL")),
popup_down: Some(( code: Char('n'), modifiers: "CONTROL")),
page_up: Some(( code: Char('b'), modifiers: "CONTROL")),
page_down: Some(( code: Char('f'), modifiers: "CONTROL")),
home: Some(( code: Char('g'), modifiers: "")),
end: Some(( code: Char('G'), modifiers: "SHIFT")),
shift_up: Some(( code: Char('K'), modifiers: "SHIFT")),
shift_down: Some(( code: Char('J'), modifiers: "SHIFT")),

edit_file: Some(( code: Char('I'), modifiers: "SHIFT")),

status_reset_item: Some(( code: Char('U'), modifiers: "SHIFT")),

diff_reset_lines: Some(( code: Char('u'), modifiers: "")),
diff_stage_lines: Some(( code: Char('s'), modifiers: "")),

stashing_save: Some(( code: Char('w'), modifiers: "")),
stashing_toggle_index: Some(( code: Char('m'), modifiers: "")),

stash_open: Some(( code: Char('l'), modifiers: "")),

abort_merge: Some(( code: Char('M'), modifiers: "SHIFT")),
)
Loading