commit 5972396a0df0e762ed22236d375c126d3a241962 Author: lostecho Date: Sun Apr 16 21:38:29 2023 +0800 first commit diff --git a/config.yaml b/config.yaml new file mode 100644 index 0000000..b415487 --- /dev/null +++ b/config.yaml @@ -0,0 +1,41 @@ +config: + backup: true + banner: true + create: true + dotpath: dotfiles + keepdot: false + link_dotfile_default: nolink + link_on_import: nolink + longkey: false +dotfiles: + f_zshrc: + src: zshrc + dst: ~/.zshrc + d_hypr: + src: config/hypr + dst: ~/.config/hypr + d_waybar: + src: config/waybar + dst: ~/.config/waybar + d_wofi: + src: config/wofi + dst: ~/.config/wofi + d_kitty: + src: config/kitty + dst: ~/.config/kitty + d_dunst: + src: config/dunst + dst: ~/.config/dunst + d_swaylock: + src: config/swaylock + dst: ~/.config/swaylock +profiles: + arch-hyprland: + dotfiles: + - f_zshrc + - d_hypr + - d_waybar + - d_wofi + - d_kitty + - d_dunst + - d_swaylock diff --git a/dotfiles/config/dunst/dunstrc b/dotfiles/config/dunst/dunstrc new file mode 100644 index 0000000..c504bd9 --- /dev/null +++ b/dotfiles/config/dunst/dunstrc @@ -0,0 +1,461 @@ +# See dunst(5) for all configuration options + +[global] + ### Display ### + + # Which monitor should the notifications be displayed on. + monitor = 0 + + # Display notification on focused monitor. Possible modes are: + # mouse: follow mouse pointer + # keyboard: follow window with keyboard focus + # none: don't follow anything + # + # "keyboard" needs a window manager that exports the + # _NET_ACTIVE_WINDOW property. + # This should be the case for almost all modern window managers. + # + # If this option is set to mouse or keyboard, the monitor option + # will be ignored. + follow = none + + ### Geometry ### + + # dynamic width from 0 to 300 + # width = (0, 300) + # constant width of 300 + width = 500 + + # The maximum height of a single notification, excluding the frame. + height = 300 + + # Position the notification in the top right corner + origin = top-right + + # Offset from the origin + offset = 10x10 + + # Scale factor. It is auto-detected if value is 0. + scale = 0 + + # Maximum number of notification (0 means no limit) + notification_limit = 20 + + ### Progress bar ### + + # Turn on the progess bar. It appears when a progress hint is passed with + # for example dunstify -h int:value:12 + progress_bar = true + + # Set the progress bar height. This includes the frame, so make sure + # it's at least twice as big as the frame width. + progress_bar_height = 10 + + # Set the frame width of the progress bar + progress_bar_frame_width = 1 + + # Set the minimum width for the progress bar + progress_bar_min_width = 150 + + # Set the maximum width for the progress bar + progress_bar_max_width = 300 + + # Corner radius for the progress bar. 0 disables rounded corners. + progress_bar_corner_radius = 0 + + # Corner radius for the icon image. + icon_corner_radius = 8 + + # Show how many messages are currently hidden (because of + # notification_limit). + indicate_hidden = yes + + # The transparency of the window. Range: [0; 100]. + # This option will only work if a compositing window manager is + # present (e.g. xcompmgr, compiz, etc.). (X11 only) + transparency = 30 + + # Draw a line of "separator_height" pixel height between two + # notifications. + # Set to 0 to disable. + # If gap_size is greater than 0, this setting will be ignored. + separator_height = 2 + + # Padding between text and separator. + padding = 8 + + # Horizontal padding. + horizontal_padding = 8 + + # Padding between text and icon. + text_icon_padding = 0 + + # Defines width in pixels of frame around the notification window. + # Set to 0 to disable. + frame_width = 3 + + # Defines color of the frame around the notification window. + frame_color = "#f5c2e7" + + # Size of gap to display between notifications - requires a compositor. + # If value is greater than 0, separator_height will be ignored and a border + # of size frame_width will be drawn around each notification instead. + # Click events on gaps do not currently propagate to applications below. + gap_size = 0 + + # Define a color for the separator. + # possible values are: + # * auto: dunst tries to find a color fitting to the background; + # * foreground: use the same color as the foreground; + # * frame: use the same color as the frame; + # * anything else will be interpreted as a X color. + separator_color = frame + + # Sort messages by urgency. + sort = yes + + # Don't remove messages, if the user is idle (no mouse or keyboard input) + # for longer than idle_threshold seconds. + # Set to 0 to disable. + # A client can set the 'transient' hint to bypass this. See the rules + # section for how to disable this if necessary + # idle_threshold = 120 + + ### Text ### + + font = JetBrains Mono Nerd Font 12 + + # The spacing between lines. If the height is smaller than the + # font height, it will get raised to the font height. + line_height = 0 + + # Possible values are: + # full: Allow a small subset of html markup in notifications: + # bold + # italic + # strikethrough + # underline + # + # For a complete reference see + # . + # + # strip: This setting is provided for compatibility with some broken + # clients that send markup even though it's not enabled on the + # server. Dunst will try to strip the markup but the parsing is + # simplistic so using this option outside of matching rules for + # specific applications *IS GREATLY DISCOURAGED*. + # + # no: Disable markup parsing, incoming notifications will be treated as + # plain text. Dunst will not advertise that it has the body-markup + # capability if this is set as a global setting. + # + # It's important to note that markup inside the format option will be parsed + # regardless of what this is set to. + markup = full + + # The format of the message. Possible variables are: + # %a appname + # %s summary + # %b body + # %i iconname (including its path) + # %I iconname (without its path) + # %p progress value if set ([ 0%] to [100%]) or nothing + # %n progress value if set without any extra characters + # %% Literal % + # Markup is allowed + format = "%s\n%b" + + # Alignment of message text. + # Possible values are "left", "center" and "right". + alignment = right + + # Vertical alignment of message text and icon. + # Possible values are "top", "center" and "bottom". + vertical_alignment = center + + # Show age of message if message is older than show_age_threshold + # seconds. + # Set to -1 to disable. + show_age_threshold = 60 + + # Specify where to make an ellipsis in long lines. + # Possible values are "start", "middle" and "end". + ellipsize = middle + + # Ignore newlines '\n' in notifications. + ignore_newline = no + + # Stack together notifications with the same content + stack_duplicates = true + + # Hide the count of stacked notifications with the same content + hide_duplicate_count = false + + # Display indicators for URLs (U) and actions (A). + show_indicators = yes + + ### Icons ### + + # Recursive icon lookup. You can set a single theme, instead of having to + # define all lookup paths. + enable_recursive_icon_lookup = true + + # Set icon theme (only used for recursive icon lookup) + icon_theme = candy-icons + # You can also set multiple icon themes, with the leftmost one being used first. + # icon_theme = "Adwaita, breeze" + + # Align icons left/right/top/off + icon_position = left + + # Scale small icons up to this size, set to 0 to disable. Helpful + # for e.g. small files or high-dpi screens. In case of conflict, + # max_icon_size takes precedence over this. + min_icon_size = 32 + + # Scale larger icons down to this size, set to 0 to disable + max_icon_size = 64 + + # Paths to default icons (only neccesary when not using recursive icon lookup) + icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/ + + ### History ### + + # Should a notification popped up from history be sticky or timeout + # as if it would normally do. + sticky_history = yes + + # Maximum amount of notifications kept in history + history_length = 20 + + ### Misc/Advanced ### + + # dmenu path. + dmenu = /usr/bin/dmenu -p dunst: + + # Browser for opening urls in context menu. + browser = /usr/bin/xdg-open + + # Always run rule-defined scripts, even if the notification is suppressed + always_run_script = true + + # Define the title of the windows spawned by dunst + title = Dunst + + # Define the class of the windows spawned by dunst + class = Dunst + + # Define the corner radius of the notification window + # in pixel size. If the radius is 0, you have no rounded + # corners. + # The radius will be automatically lowered if it exceeds half of the + # notification height to avoid clipping text and/or icons. + corner_radius = 15 + + # Ignore the dbus closeNotification message. + # Useful to enforce the timeout set by dunst configuration. Without this + # parameter, an application may close the notification sent before the + # user defined timeout. + ignore_dbusclose = false + + ### Wayland ### + # These settings are Wayland-specific. They have no effect when using X11 + + # Uncomment this if you want to let notications appear under fullscreen + # applications (default: overlay) + # layer = top + + # Set this to true to use X11 output on Wayland. + force_xwayland = false + + ### Legacy + + # Use the Xinerama extension instead of RandR for multi-monitor support. + # This setting is provided for compatibility with older nVidia drivers that + # do not support RandR and using it on systems that support RandR is highly + # discouraged. + # + # By enabling this setting dunst will not be able to detect when a monitor + # is connected or disconnected which might break follow mode if the screen + # layout changes. + force_xinerama = false + + ### mouse + + # Defines list of actions for each mouse event + # Possible values are: + # * none: Don't do anything. + # * do_action: Invoke the action determined by the action_name rule. If there is no + # such action, open the context menu. + # * open_url: If the notification has exactly one url, open it. If there are multiple + # ones, open the context menu. + # * close_current: Close current notification. + # * close_all: Close all notifications. + # * context: Open context menu for the notification. + # * context_all: Open context menu for all notifications. + # These values can be strung together for each mouse event, and + # will be executed in sequence. + mouse_left_click = close_current + mouse_middle_click = do_action, close_current + mouse_right_click = close_all + +# Experimental features that may or may not work correctly. Do not expect them +# to have a consistent behaviour across releases. +[experimental] + # Calculate the dpi to use on a per-monitor basis. + # If this setting is enabled the Xft.dpi value will be ignored and instead + # dunst will attempt to calculate an appropriate dpi value for each monitor + # using the resolution and physical size. This might be useful in setups + # where there are multiple screens with very different dpi values. + per_monitor_dpi = false + + +[urgency_low] + # IMPORTANT: colors have to be defined in quotation marks. + # Otherwise the "#" and following would be interpreted as a comment. + background = "#1e1e2e" + foreground = "#cdd6f4" + frame_color = "#f5c2e7" + timeout = 10 + # Icon for notifications with low urgency, uncomment to enable + #default_icon = /path/to/icon + +[urgency_normal] + background = "#1e1e2e" + foreground = "#cdd6f4" + frame_color = "#cba6f7" + timeout = 10 + # Icon for notifications with normal urgency, uncomment to enable + #default_icon = /path/to/icon + +[urgency_critical] + background = "#1e1e2e" + foreground = "#cdd6f4" + frame_color = "#f38ba8" + timeout = 0 + # Icon for notifications with critical urgency, uncomment to enable + #default_icon = /path/to/icon + +# Every section that isn't one of the above is interpreted as a rules to +# override settings for certain messages. +# +# Messages can be matched by +# appname (discouraged, see desktop_entry) +# body +# category +# desktop_entry +# icon +# match_transient +# msg_urgency +# stack_tag +# summary +# +# and you can override the +# background +# foreground +# format +# frame_color +# fullscreen +# new_icon +# set_stack_tag +# set_transient +# set_category +# timeout +# urgency +# icon_position +# skip_display +# history_ignore +# action_name +# word_wrap +# ellipsize +# alignment +# hide_text +# +# Shell-like globbing will get expanded. +# +# Instead of the appname filter, it's recommended to use the desktop_entry filter. +# GLib based applications export their desktop-entry name. In comparison to the appname, +# the desktop-entry won't get localized. +# +# SCRIPTING +# You can specify a script that gets run when the rule matches by +# setting the "script" option. +# The script will be called as follows: +# script appname summary body icon urgency +# where urgency can be "LOW", "NORMAL" or "CRITICAL". +# +# NOTE: It might be helpful to run dunst -print in a terminal in order +# to find fitting options for rules. + +# Disable the transient hint so that idle_threshold cannot be bypassed from the +# client +#[transient_disable] +# match_transient = yes +# set_transient = no +# +# Make the handling of transient notifications more strict by making them not +# be placed in history. +#[transient_history_ignore] +# match_transient = yes +# history_ignore = yes + +# fullscreen values +# show: show the notifications, regardless if there is a fullscreen window opened +# delay: displays the new notification, if there is no fullscreen window active +# If the notification is already drawn, it won't get undrawn. +# pushback: same as delay, but when switching into fullscreen, the notification will get +# withdrawn from screen again and will get delayed like a new notification +#[fullscreen_delay_everything] +# fullscreen = delay +#[fullscreen_show_critical] +# msg_urgency = critical +# fullscreen = show + +#[espeak] +# summary = "*" +# script = dunst_espeak.sh + +#[script-test] +# summary = "*script*" +# script = dunst_test.sh + +#[ignore] +# # This notification will not be displayed +# summary = "foobar" +# skip_display = true + +#[history-ignore] +# # This notification will not be saved in history +# summary = "foobar" +# history_ignore = yes + +#[skip-display] +# # This notification will not be displayed, but will be included in the history +# summary = "foobar" +# skip_display = yes + +#[signed_on] +# appname = Pidgin +# summary = "*signed on*" +# urgency = low +# +#[signed_off] +# appname = Pidgin +# summary = *signed off* +# urgency = low +# +#[says] +# appname = Pidgin +# summary = *says* +# urgency = critical +# +#[twitter] +# appname = Pidgin +# summary = *twitter.com* +# urgency = normal +# +#[stack-volumes] +# appname = "some_volume_notifiers" +# set_stack_tag = "volume" +# +# vim: ft=cfg diff --git a/dotfiles/config/hypr/hyprland.conf b/dotfiles/config/hypr/hyprland.conf new file mode 100644 index 0000000..4f044de --- /dev/null +++ b/dotfiles/config/hypr/hyprland.conf @@ -0,0 +1,211 @@ + +######################################################################################## +AUTOGENERATED HYPR CONFIG. +PLEASE USE THE CONFIG PROVIDED IN THE GIT REPO /examples/hypr.conf AND EDIT IT, +OR EDIT THIS ONE ACCORDING TO THE WIKI INSTRUCTIONS. +######################################################################################## + +# +# Please note not all available settings / options are set here. +# For a full list, see the wiki +# + +# autogenerated = 1 # remove this line to remove the warning + +# See https://wiki.hyprland.org/Configuring/Monitors/ +monitor=eDP-1,1920x1080@60,auto,1 +monitor=DP-1,preferred,auto,1 + +# See https://wiki.hyprland.org/Configuring/Keywords/ for more + +# Execute your favorite apps at launch +# exec-once = waybar & hyprpaper & firefox +exec-once = waybar # status bar +exec-once = dunst # notification daemon +exec-once = fcitx5 --replace -d # input method +exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP # Wayland magic (screen sharing etc.) +exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP # More wayland magic (screen sharing etc.) +exec-once = ~/.config/hypr/scripts/xdg-portal-hyprland # hyprland init parameter +exec-once = /usr/lib/polkit-kde-authentication-agent-1 # root certifaction +exec = ~/.config/hypr/scripts/bgaction # swww wallpaper +# exec-once = hyprpaper # wallpaper +# exec-once = ~/.config/hypr/scripts/launch_bar # status bar +# exec-once = nm-applet --indicator # Systray app for Network/Wifi + +# Source a file (multi-file configs) +# source = ~/.config/hypr/myColors.conf + +# Some default env vars. +env = XCURSOR_SIZE,24 + +# For all categories, see https://wiki.hyprland.org/Configuring/Variables/ +input { + kb_layout = us + kb_variant = + kb_model = + kb_options = + kb_rules = + + follow_mouse = 1 + + touchpad { + natural_scroll = yes + tap-to-click = yes + } + + sensitivity = 0 # -1.0 - 1.0, 0 means no modification. +} + +general { + # See https://wiki.hyprland.org/Configuring/Variables/ for more + + gaps_in = 5 + gaps_out = 5 + border_size = 5 + col.active_border = rgba(5fc9f8ee) rgba(fecb2eee) rgba(fd9426ee) rgba(fc3158ee) rgba(147efbee) rgba(53d769ee) rgba(fc3d39ee) rgba(f77737ee) rgba(fcaf45ee) rgba(ffdc80ee) 36deg + col.inactive_border = rgba(595959aa) + + layout = dwindle +} + +misc { + disable_hyprland_logo = yes + disable_splash_rendering = yes + focus_on_activate = yes + animate_manual_resizes = yes + animate_mouse_windowdragging = no +} + + +decoration { + # See https://wiki.hyprland.org/Configuring/Variables/ for more + + active_opacity=1 + inactive_opacity=0.95 + fullscreen_opacity=1.0 + + rounding = 10 + blur = yes + blur_size = 5 + blur_passes = 2 + blur_new_optimizations = on + + drop_shadow = yes + shadow_range = 4 + shadow_render_power = 3 + col.shadow = rgba(1a1a1aee) +} + +animations { + enabled = yes + + # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more + + bezier = myBezier, 0.05, 0.9, 0.1, 1.05 + + animation = windows, 1, 7, myBezier + animation = windowsOut, 1, 7, default, popin 80% + animation = border, 1, 10, default + animation = borderangle, 1, 8, default + animation = fade, 1, 7, default + animation = workspaces, 1, 6, default +} + +dwindle { + # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more + pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below + preserve_split = yes # you probably want this +} + +master { + # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more + new_is_master = true +} + +gestures { + # See https://wiki.hyprland.org/Configuring/Variables/ for more + workspace_swipe = off +} + +# Example per-device config +# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more +device:epic-mouse-v1 { + sensitivity = -0.5 +} + +# Example windowrule v1 +# windowrule = float, ^(kitty)$ +# Example windowrule v2 +# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ +# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more +windowrulev2 = float, class:^(org.kde.polkit-kde-authentication-agent-1)$ +windowrulev2 = opacity 1.0 1.0, class:^(Google-chrome)$ +windowrulev2 = animation popin,class:^(Google-chrome)$ +windowrulev2 = opacity 0.8 0.9,class:^(kitty)$ +windowrulev2 = animation popin,class:^(kitty)$,title:^(update-sys)$ +# windowrulev2 = animation popin,class:^(thunar)$ +# windowrulev2 = opacity 0.8 0.8,class:^(thunar)$ +windowrulev2 = animation slide,class:^(wofi)$ +windowrulev2 = move 100%-433 53,class:^(wofi)$,title:^(clippick)$ +windowrulev2 = opacity 0.8 1.0,class:^(obsidian)$ + + +# See https://wiki.hyprland.org/Configuring/Keywords/ for more +$mainMod = SUPER + +# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more +bind = $mainMod, Q, exec, kitty +bind = $mainMod, R, exec, pkill wofi; wofi --show drun +bind = $mainMod, E, exec, kitty ranger +bind = $mainMod, I, exec, env DESKTOPINTEGRATION=false /usr/bin/obsidian %u --no-sandbox %U +bind = $mainMod, K, exec, /usr/bin/logseq %U +bind = $mainMod, L, exec, swaylock # Lock the screen +bind = $mainMod, G, exec, google-chrome-stable +bind = $mainMod, C, killactive, +bind = $mainMod, M, exec, wlogout --protocol layer-shell # show the logout window +bind = $mainMod, F, togglefloating, +bind = $mainMod, P, pseudo, # dwindle +bind = $mainMod, J, togglesplit, # dwindle +bind = $mainMod, Space, fullscreen + +# Move focus with mainMod + arrow keys +bind = $mainMod, left, movefocus, l +bind = $mainMod, right, movefocus, r +bind = $mainMod, up, movefocus, u +bind = $mainMod, down, movefocus, d + +# Switch workspaces with mainMod + [0-9] +bind = $mainMod, 1, workspace, 1 +bind = $mainMod, 2, workspace, 2 +bind = $mainMod, 3, workspace, 3 +bind = $mainMod, 4, workspace, 4 +bind = $mainMod, 5, workspace, 5 +bind = $mainMod, 6, workspace, 6 +bind = $mainMod, 7, workspace, 7 +bind = $mainMod, 8, workspace, 8 +bind = $mainMod, 9, workspace, 9 +bind = $mainMod, 0, workspace, 10 + +# Move active window to a workspace with mainMod + SHIFT + [0-9] +bind = $mainMod SHIFT, 1, movetoworkspace, 1 +bind = $mainMod SHIFT, 2, movetoworkspace, 2 +bind = $mainMod SHIFT, 3, movetoworkspace, 3 +bind = $mainMod SHIFT, 4, movetoworkspace, 4 +bind = $mainMod SHIFT, 5, movetoworkspace, 5 +bind = $mainMod SHIFT, 6, movetoworkspace, 6 +bind = $mainMod SHIFT, 7, movetoworkspace, 7 +bind = $mainMod SHIFT, 8, movetoworkspace, 8 +bind = $mainMod SHIFT, 9, movetoworkspace, 9 +bind = $mainMod SHIFT, 0, movetoworkspace, 10 + +# Scroll through existing workspaces with mainMod + scroll +bind = $mainMod, mouse_down, workspace, e+1 +bind = $mainMod, mouse_up, workspace, e-1 + +# Move/resize windows with mainMod + LMB/RMB and dragging +bindm = $mainMod, mouse:272, movewindow +bindm = $mainMod, mouse:273, resizewindow + +# Brightness control +binde = $mainMod SHIFT, P, exec, xbacklight -inc 5 +binde = $mainMod SHIFT, O, exec, xbacklight -dec 5 diff --git a/dotfiles/config/hypr/scripts/bgaction b/dotfiles/config/hypr/scripts/bgaction new file mode 100755 index 0000000..0ef02d3 --- /dev/null +++ b/dotfiles/config/hypr/scripts/bgaction @@ -0,0 +1,14 @@ +#!/usr/bin/bash + +#start swwww +swww query || swww init + +#figure out which waybar theme is set +THEMEIS=$(readlink -f ~/.config/waybar/style.css | cut -d '-' -f2) + +#show the correct wallpapper based on the theme +if [ $THEMEIS == "dark.css" ]; then + swww img ~/.config/hypr/wallpaper-dark.jpg +else + swww img ~/.config/hypr/wallpaper.jpg +fi \ No newline at end of file diff --git a/dotfiles/config/hypr/scripts/xdg-portal-hyprland b/dotfiles/config/hypr/scripts/xdg-portal-hyprland new file mode 100755 index 0000000..8d91fad --- /dev/null +++ b/dotfiles/config/hypr/scripts/xdg-portal-hyprland @@ -0,0 +1,32 @@ +#!/bin/bash + +sleep 1 +killall xdg-desktop-portal-hyprland +killall xdg-desktop-portal +/usr/lib/xdg-desktop-portal-hyprland & +sleep 2 +/usr/lib/xdg-desktop-portal & + +cd ${HOME} +# 设置语言环境为中文 +export LANG=zh_CN.UTF-8 +# 解决QT程序缩放问题 +export QT_AUTO_SCREEN_SCALE_FACTOR=1 +# QT使用wayland和gtk +export QT_QPA_PLATFORM="wayland;xcb" +export QT_WAYLAND_DISABLE_WINDOWDECORATION=1 +# 使用qt5ct软件配置QT程序外观 +export QT_QPA_PLATFORMTHEME=qt5ct + +# 一些游戏使用wayland +export SDL_VIDEODRIVER=wayland +# 解决java程序启动黑屏错误 +export _JAVA_AWT_WM_NONEREPARENTING=1 +# GTK后端为 wayland和x11,优先wayland +export GDK_BACKEND="wayland,x11" + +export XDG_SESSION_TYPE=wayland +export XDG_SESSION_DESKTOP=Hyprland +export XDG_CURRENT_DESKTOP=Hyprland + + diff --git a/dotfiles/config/hypr/wallpaper-dark.jpg b/dotfiles/config/hypr/wallpaper-dark.jpg new file mode 100644 index 0000000..462de23 Binary files /dev/null and b/dotfiles/config/hypr/wallpaper-dark.jpg differ diff --git a/dotfiles/config/hypr/wallpaper.jpg b/dotfiles/config/hypr/wallpaper.jpg new file mode 100644 index 0000000..dbc462d Binary files /dev/null and b/dotfiles/config/hypr/wallpaper.jpg differ diff --git a/dotfiles/config/kitty/kitty.conf b/dotfiles/config/kitty/kitty.conf new file mode 100644 index 0000000..8aa60eb --- /dev/null +++ b/dotfiles/config/kitty/kitty.conf @@ -0,0 +1,13 @@ +include ./mocha.conf +font_family jetbrains mono nerd font +font_size 15 +bold_font auto +italic_font auto +bold_italic_font auto +mouse_hide_wait 2.0 +cursor_shape block +url_color #0087bd +url_style dotted +#Close the terminal without confirmation +confirm_os_window_close 0 +background_opacity 0.95 diff --git a/dotfiles/config/kitty/mocha.conf b/dotfiles/config/kitty/mocha.conf new file mode 100644 index 0000000..2533db7 --- /dev/null +++ b/dotfiles/config/kitty/mocha.conf @@ -0,0 +1,80 @@ +# vim:ft=kitty + +## name: Catppuccin-Mocha +## author: Pocco81 (https://github.com/Pocco81) +## license: MIT +## upstream: https://github.com/catppuccin/kitty/blob/main/mocha.conf +## blurb: Soothing pastel theme for the high-spirited! + + + +# The basic colors +foreground #CDD6F4 +background #1E1E2E +selection_foreground #1E1E2E +selection_background #F5E0DC + +# Cursor colors +cursor #F5E0DC +cursor_text_color #1E1E2E + +# URL underline color when hovering with mouse +url_color #F5E0DC + +# Kitty window border colors +active_border_color #B4BEFE +inactive_border_color #6C7086 +bell_border_color #F9E2AF + +# OS Window titlebar colors +wayland_titlebar_color system +macos_titlebar_color system + +# Tab bar colors +active_tab_foreground #11111B +active_tab_background #CBA6F7 +inactive_tab_foreground #CDD6F4 +inactive_tab_background #181825 +tab_bar_background #11111B + +# Colors for marks (marked text in the terminal) +mark1_foreground #1E1E2E +mark1_background #B4BEFE +mark2_foreground #1E1E2E +mark2_background #CBA6F7 +mark3_foreground #1E1E2E +mark3_background #74C7EC + +# The 16 terminal colors + +# black +color0 #45475A +color8 #585B70 + +# red +color1 #F38BA8 +color9 #F38BA8 + +# green +color2 #A6E3A1 +color10 #A6E3A1 + +# yellow +color3 #F9E2AF +color11 #F9E2AF + +# blue +color4 #89B4FA +color12 #89B4FA + +# magenta +color5 #F5C2E7 +color13 #F5C2E7 + +# cyan +color6 #94E2D5 +color14 #94E2D5 + +# white +color7 #BAC2DE +color15 #A6ADC8 diff --git a/dotfiles/config/swaylock/config b/dotfiles/config/swaylock/config new file mode 100644 index 0000000..7ae89de --- /dev/null +++ b/dotfiles/config/swaylock/config @@ -0,0 +1,38 @@ +daemonize +show-failed-attempts +clock +screenshot +effect-blur=9x5 +effect-vignette=0.5:0.5 +color=1f1d2e80 +font="Inter" +indicator +indicator-radius=200 +indicator-thickness=20 +line-color=1f1d2e +ring-color=191724 +inside-color=1f1d2e +key-hl-color=eb6f92 +separator-color=00000000 +text-color=e0def4 +text-caps-lock-color="" +line-ver-color=eb6f92 +ring-ver-color=eb6f92 +inside-ver-color=1f1d2e +text-ver-color=e0def4 +ring-wrong-color=31748f +text-wrong-color=31748f +inside-wrong-color=1f1d2e +inside-clear-color=1f1d2e +text-clear-color=e0def4 +ring-clear-color=9ccfd8 +line-clear-color=1f1d2e +line-wrong-color=1f1d2e +bs-hl-color=31748f +grace=2 +grace-no-mouse +grace-no-touch +datestr=%a, %B %e +timestr=%I:%M %p +fade-in=0.2 +ignore-empty-password diff --git a/dotfiles/config/waybar/config.jsonc b/dotfiles/config/waybar/config.jsonc new file mode 100644 index 0000000..7d72b3a --- /dev/null +++ b/dotfiles/config/waybar/config.jsonc @@ -0,0 +1,180 @@ +{ + "layer": "top", + "position": "top", + "mod": "dock", + "exclusive": true, + "passthrough": false, + "gtk-layer-shell": true, + "height": 50, + "modules-left": ["custom/launch_wofi","wlr/workspaces","cpu","memory","disk","hyprland/window"], + "modules-center": ["custom/lock_screen","custom/updates","clock","custom/power_btn"], + "modules-right": ["temperature","custom/power_profile","battery","backlight","pulseaudio","pulseaudio#microphone","tray","custom/weather","custom/light_dark"], + + "hyprland/window": { + "format": "{}" + }, + + "custom/launch_wofi": { + "format": "飳", + "on-click": "pkill wofi; wofi -n", + "tooltip": false + }, + + "custom/lock_screen": { + "format": "飥", + "on-click": "sh -c '(sleep 0.5s; swaylock)' & disown", + "tooltip": false + }, + + "custom/light_dark": { + "format": "蟀惥", + "on-click": "~/.config/waybar/scripts/baraction light", + "tooltip": false + }, + + "custom/power_btn": { + "format": "飥", + "on-click": "sh -c '(sleep 0.5s; wlogout --protocol layer-shell)' & disown", + "tooltip": false + }, + + "cpu": { + "interval": 10, + "format": "飲 {usage}%", + "max-length": 10, + "on-click": "kitty --start-as=fullscreen --title btop sh -c 'btop'" + }, + + "disk": { + "interval": 30, + "format": "蟀媻 {percentage_used}%", + "path": "/", + "tooltip": true, + "tooltip-format": "HDD - {used} used out of {total} on {path} ({percentage_used}%)", + "on-click": "kitty --start-as=fullscreen --title btop sh -c 'btop'" + }, + + "memory": { + "interval": 30, + "format": "飪 {}%", + "max-length": 10, + "tooltip": true, + "tooltip-format": "Memory - {used:0.1f}GB used", + "on-click": "kitty --start-as=fullscreen --title btop sh -c 'btop'" + }, + + "custom/updates": { + "format": "{}", + "exec": "~/.config/waybar/scripts/update-sys", + "on-click": "~/.config/waybar/scripts/update-sys update", + "interval": 300, + "tooltip": true + }, + + "wlr/workspaces": { + "disable-scroll": true, + "all-outputs": true, + "on-click": "activate", + "persistent_workspaces": { + "1": [], + "2": [], + "3": [], + "4": [], + "5": [], + "6": [], + "7": [], + "8": [], + "9": [], + "10": [] + } + }, + + "custom/power_profile": { + //shows the current power profile and switches to next on click + "exec": "asusctl profile -p | sed s:'Active profile is'::", + "interval": 30, + "format": "蟀垚{}", + "on-click": "asusctl profile -n; pkill -SIGRTMIN+8 waybar", + "signal": 8 + }, + + "custom/weather": { + //shows the current weather and forecast + "tooltip" : true, + "format" : "{}", + "interval" : 30, + "exec" : "~/.config/waybar/scripts/waybar-wttr.py", + "return-type" : "json" + }, + + "tray": { + "icon-size": 18, + "spacing": 10 + }, + + "clock": { + "format": "{:%I:%M %p}", + "tooltip": true, + "tooltip-format": "{:飦 %A, %B %e %Y}" + }, + + "backlight": { + "device": "intel_backlight", + "format": "{icon} {percent}%", + "format-icons": ["飾", "飾", "飾"], + "on-scroll-up": "xbaxklight -inc 1", + "on-scroll-down": "xbacklight -dec 1", + "min-length": 6 + }, + + "battery": { + "states": { + "good": 95, + "warning": 30, + "critical": 20 + }, + "format": "{icon} {capacity}%", + "format-charging": "飮 {capacity}%", + "format-plugged": "飮 {capacity}%", + "format-alt": "{time} {icon}", + "format-icons": ["飽", "飼", "飼", "飼", "飼", "飼", "飼", "飼", "飽", "飽", "飼"] + }, + + "pulseaudio": { + "format": "{icon} {volume}%", + "format-muted": "飸", + "on-click": "pamixer -t", + "on-click-right": "pavucontrol", + "on-scroll-up": "pamixer -i 5", + "on-scroll-down": "pamixer -d 5", + "scroll-step": 5, + "format-icons": { + "headphone": "飥", + "hands-free": "飥", + "headset": "飥", + "phone": "飩", + "portable": "飩", + "car": "飭", + "default": ["飥", "飥", "飥"] + } + }, + + "pulseaudio#microphone": { + "format": "{format_source}", + "format-source": "铩 {volume}%", + "format-source-muted": "铩", + "on-click": "pamixer --default-source -t", + "on-click-right": "pavucontrol", + "on-scroll-up": "pamixer --default-source -i 5", + "on-scroll-down": "pamixer --default-source -d 5", + "scroll-step": 5 + }, + + "temperature": { + "thermal-zone": 1, + "format": "飲 {temperatureC}掳C", + "critical-threshold": 70, + "format-critical": "飲 {temperatureF}掳F", + "on-click": "kitty --start-as=fullscreen --title btop sh -c 'btop'" + } +} diff --git a/dotfiles/config/waybar/config.jsonc.bak b/dotfiles/config/waybar/config.jsonc.bak new file mode 100644 index 0000000..d2143f4 --- /dev/null +++ b/dotfiles/config/waybar/config.jsonc.bak @@ -0,0 +1,180 @@ +{ + "layer": "top", + "position": "top", + "mod": "dock", + "exclusive": true, + "passthrough": false, + "gtk-layer-shell": true, + "height": 50, + "modules-left": ["custom/launch_wofi","wlr/workspaces","cpu","memory","disk","hyprland/window"], + "modules-center": ["custom/lock_screen","custom/updates","clock","custom/power_btn"], + "modules-right": ["temperature","custom/power_profile","battery","backlight","pulseaudio","pulseaudio#microphone","tray","custom/weather","custom/light_dark"], + + "hyprland/window": { + "format": "{}" + }, + + "custom/launch_wofi": { + "format": "飳", + "on-click": "pkill wofi; wofi -n", + "tooltip": false + }, + + "custom/lock_screen": { + "format": "飥", + "on-click": "sh -c '(sleep 0.5s; swaylock)' & disown", + "tooltip": false + }, + + "custom/light_dark": { + "format": "蟀惥", + "on-click": "~/.config/waybar/scripts/baraction light", + "tooltip": false + }, + + "custom/power_btn": { + "format": "飥", + "on-click": "sh -c '(sleep 0.5s; wlogout --protocol layer-shell)' & disown", + "tooltip": false + }, + + "cpu": { + "interval": 10, + "format": "飲 {usage}%", + "max-length": 10, + "on-click": "kitty --start-as=fullscreen --title btop sh -c 'btop'" + }, + + "disk": { + "interval": 30, + "format": "蟀媻 {percentage_used}%", + "path": "/", + "tooltip": true, + "tooltip-format": "HDD - {used} used out of {total} on {path} ({percentage_used}%)", + "on-click": "kitty --start-as=fullscreen --title btop sh -c 'btop'" + }, + + "memory": { + "interval": 30, + "format": "飪 {}%", + "max-length": 10, + "tooltip": true, + "tooltip-format": "Memory - {used:0.1f}GB used", + "on-click": "kitty --start-as=fullscreen --title btop sh -c 'btop'" + }, + + "custom/updates": { + "format": "{}", + "exec": "~/.config/waybar/scripts/update-sys", + "on-click": "~/.config/waybar/scripts/update-sys update", + "interval": 300, + "tooltip": true + }, + + "wlr/workspaces": { + "disable-scroll": true, + "all-outputs": true, + "on-click": "activate", + "persistent_workspaces": { + "1": [], + "2": [], + "3": [], + "4": [], + "5": [], + "6": [], + "7": [], + "8": [], + "9": [], + "10": [] + } + }, + + "custom/power_profile": { + //shows the current power profile and switches to next on click + "exec": "asusctl profile -p | sed s:'Active profile is'::", + "interval": 30, + "format": "蟀垚{}", + "on-click": "asusctl profile -n; pkill -SIGRTMIN+8 waybar", + "signal": 8 + }, + + "custom/weather": { + //shows the current weather and forecast + "tooltip" : true, + "format" : "{}", + "interval" : 30, + "exec" : "~/.config/waybar/scripts/waybar-wttr.py", + "return-type" : "json" + }, + + "tray": { + "icon-size": 18, + "spacing": 10 + }, + + "clock": { + "format": "{:%I:%M %p}", + "tooltip": true, + "tooltip-format": "{:飦 %A, %B %e %Y}" + }, + + "backlight": { + "device": "intel_backlight", + "format": "{icon} {percent}%", + "format-icons": ["飾", "飾", "飾"], + "on-scroll-up": "brightnessctl set 1%+", + "on-scroll-down": "brightnessctl set 1%-", + "min-length": 6 + }, + + "battery": { + "states": { + "good": 95, + "warning": 30, + "critical": 20 + }, + "format": "{icon} {capacity}%", + "format-charging": "飮 {capacity}%", + "format-plugged": "飮 {capacity}%", + "format-alt": "{time} {icon}", + "format-icons": ["飽", "飼", "飼", "飼", "飼", "飼", "飼", "飼", "飽", "飽", "飼"] + }, + + "pulseaudio": { + "format": "{icon} {volume}%", + "format-muted": "飸", + "on-click": "pamixer -t", + "on-click-right": "pavucontrol", + "on-scroll-up": "pamixer -i 5", + "on-scroll-down": "pamixer -d 5", + "scroll-step": 5, + "format-icons": { + "headphone": "飥", + "hands-free": "飥", + "headset": "飥", + "phone": "飩", + "portable": "飩", + "car": "飭", + "default": ["飥", "飥", "飥"] + } + }, + + "pulseaudio#microphone": { + "format": "{format_source}", + "format-source": "铩 {volume}%", + "format-source-muted": "铩", + "on-click": "pamixer --default-source -t", + "on-click-right": "pavucontrol", + "on-scroll-up": "pamixer --default-source -i 5", + "on-scroll-down": "pamixer --default-source -d 5", + "scroll-step": 5 + }, + + "temperature": { + "thermal-zone": 1, + "format": "飲 {temperatureC}掳C", + "critical-threshold": 70, + "format-critical": "飲 {temperatureF}掳F", + "on-click": "kitty --start-as=fullscreen --title btop sh -c 'btop'" + } +} diff --git a/dotfiles/config/waybar/scripts/baraction b/dotfiles/config/waybar/scripts/baraction new file mode 100755 index 0000000..58ebf30 --- /dev/null +++ b/dotfiles/config/waybar/scripts/baraction @@ -0,0 +1,32 @@ +#!/bin/sh + +# Check which waybar theme is set +THEMEIS=$(readlink -f ~/.config/waybar/style.css | cut -d '-' -f2) + +#if the theme is not dark then we need to switch to it +if [ $THEMEIS != "dark.css" ]; then + SWITCHTO="-dark" +fi + +#set the waybar theme +ln -sf ~/.config/waybar/style/style$SWITCHTO.css ~/.config/waybar/style.css + +#set the wofi theme +ln -sf ~/.config/wofi/style/style$SWITCHTO.css ~/.config/wofi/style.css + +#set the xfce theme +xfconf-query -c xsettings -p /Net/ThemeName -s "Adwaita$SWITCHTO" +xfconf-query -c xsettings -p /Net/IconThemeName -s "Adwaita$SWITCHTO" + +#set the GTK theme +gsettings set org.gnome.desktop.interface gtk-theme "Adwaita$SWITCHTO" +gsettings set org.gnome.desktop.interface icon-theme "Adwaita$SWITCHTO" + +#change the background image and be cool about it ;) +swww img ~/.config/hypr/wallpaper$SWITCHTO.jpg --transition-fps 60 --transition-type wipe --transition-duration 2 + +#update the sddm image +ln -sf /usr/share/sddm/themes/sdt/Backgrounds/wallpaper$SWITCHTO.jpg /usr/share/sddm/themes/sdt/wallpaper.jpg + +#restart the waybar +killall -SIGUSR2 waybar \ No newline at end of file diff --git a/dotfiles/config/waybar/scripts/update-sys b/dotfiles/config/waybar/scripts/update-sys new file mode 100755 index 0000000..4f85aad --- /dev/null +++ b/dotfiles/config/waybar/scripts/update-sys @@ -0,0 +1,41 @@ +#!/usr/bin/env bash + +# Original script by @speltriao on GitHub +# https://github.com/speltriao/Pacman-Update-for-GNOME-Shell + +# If the operating system is not Arch Linux, exit the script successfully +if [ ! -f /etc/arch-release ]; then + exit 0 +fi + +# Calculate updates for each service +AUR=$(yay -Qua | wc -l) +OFFICIAL=$(pacman -Qu | wc -l) + +# Case/switch for each service updates +case $1 in + aur) echo "飥 $AUR";; + official) echo "飥 $OFFICIAL";; +esac + +# If the parameter is "update", update all services +if [ "$1" = "update" ]; then + kitty --title update-sys sh -c 'yay -Syu' +fi + +# If there aren't any parameters, return the total number of updates +if [ "$1" = "" ]; then + # Calculate total number of updates + COUNT=$((OFFICIAL+AUR)) + # If there are updates, the script will output the following: 飥 Updates + # If there are no updates, the script will output nothing. + + if [[ "$COUNT" = "0" ]] + then + echo "" + else + # This Update symbol is RTL. So ‭ is left-to-right override. + echo "飥 $COUNT" + fi + exit 0 +fi diff --git a/dotfiles/config/waybar/scripts/waybar-wttr.py b/dotfiles/config/waybar/scripts/waybar-wttr.py new file mode 100755 index 0000000..87918a7 --- /dev/null +++ b/dotfiles/config/waybar/scripts/waybar-wttr.py @@ -0,0 +1,119 @@ +#!/usr/bin/env python + +import json +import requests +from datetime import datetime + +WEATHER_CODES = { + '113': '鈽锔 ', + '116': '鉀 ', + '119': '鈽侊笍 ', + '122': '鈽侊笍 ', + '143': '鈽侊笍 ', + '176': '馃導锔', + '179': '馃導锔', + '182': '馃導锔', + '185': '馃導锔', + '200': '鉀堬笍 ', + '227': '馃尐锔', + '230': '馃尐锔', + '248': '鈽侊笍 ', + '260': '鈽侊笍 ', + '263': '馃導锔', + '266': '馃導锔', + '281': '馃導锔', + '284': '馃導锔', + '293': '馃導锔', + '296': '馃導锔', + '299': '馃導锔', + '302': '馃導锔', + '305': '馃導锔', + '308': '馃導锔', + '311': '馃導锔', + '314': '馃導锔', + '317': '馃導锔', + '320': '馃尐锔', + '323': '馃尐锔', + '326': '馃尐锔', + '329': '鉂勶笍 ', + '332': '鉂勶笍 ', + '335': '鉂勶笍 ', + '338': '鉂勶笍 ', + '350': '馃導锔', + '353': '馃導锔', + '356': '馃導锔', + '359': '馃導锔', + '362': '馃導锔', + '365': '馃導锔', + '368': '馃導锔', + '371': '鉂勶笍', + '374': '馃尐锔', + '377': '馃尐锔', + '386': '馃尐锔', + '389': '馃尐锔', + '392': '馃導锔', + '395': '鉂勶笍 ' +} + +data = {} + + +weather = requests.get("https://wttr.in/?format=j1").json() + + +def format_time(time): + return time.replace("00", "").zfill(2) + + +def format_temp(temp): + return (hour['FeelsLikeC']+"掳").ljust(3) + + +def format_chances(hour): + chances = { + "chanceoffog": "Fog", + "chanceoffrost": "Frost", + "chanceofovercast": "Overcast", + "chanceofrain": "Rain", + "chanceofsnow": "Snow", + "chanceofsunshine": "Sunshine", + "chanceofthunder": "Thunder", + "chanceofwindy": "Wind" + } + + conditions = [] + for event in chances.keys(): + if int(hour[event]) > 0: + conditions.append(chances[event]+" "+hour[event]+"%") + return ", ".join(conditions) + +tempint = int(weather['current_condition'][0]['FeelsLikeC']) +extrachar = '' +if tempint > 0 and tempint < 10: + extrachar = '+' + + +data['text'] = '鈥'+WEATHER_CODES[weather['current_condition'][0]['weatherCode']] + \ + " "+extrachar+weather['current_condition'][0]['FeelsLikeC']+"掳" + +data['tooltip'] = f"{weather['current_condition'][0]['weatherDesc'][0]['value']} {weather['current_condition'][0]['temp_C']}掳\n" +data['tooltip'] += f"Feels like: {weather['current_condition'][0]['FeelsLikeC']}掳\n" +data['tooltip'] += f"Wind: {weather['current_condition'][0]['windspeedKmph']}Km/h\n" +data['tooltip'] += f"Humidity: {weather['current_condition'][0]['humidity']}%\n" +for i, day in enumerate(weather['weather']): + data['tooltip'] += f"\n" + if i == 0: + data['tooltip'] += "Today, " + if i == 1: + data['tooltip'] += "Tomorrow, " + data['tooltip'] += f"{day['date']}\n" + data['tooltip'] += f"猬嗭笍 {day['maxtempC']}掳 猬囷笍 {day['mintempC']}掳 " + data['tooltip'] += f"馃寘 {day['astronomy'][0]['sunrise']} 馃寚 {day['astronomy'][0]['sunset']}\n" + for hour in day['hourly']: + if i == 0: + if int(format_time(hour['time'])) < datetime.now().hour-2: + continue + data['tooltip'] += f"{format_time(hour['time'])} {WEATHER_CODES[hour['weatherCode']]} {format_temp(hour['FeelsLikeC'])} {hour['weatherDesc'][0]['value']}, {format_chances(hour)}\n" + + +print(json.dumps(data)) diff --git a/dotfiles/config/waybar/style.css b/dotfiles/config/waybar/style.css new file mode 100644 index 0000000..7d1786f --- /dev/null +++ b/dotfiles/config/waybar/style.css @@ -0,0 +1,135 @@ +* { + border: none; + border-radius: 0; + font-family: "JetBrainsMono Nerd Font"; + font-weight: bold; + font-size: 16px; + min-height: 0; +} + +window#waybar { + background: rgba(21, 18, 27, 0); + color: #cdd6f4; +} + +tooltip { + background: #1e1e2e; + opacity: 0.8; + border-radius: 10px; + border-width: 2px; + border-style: solid; + border-color: #11111b; +} + +tooltip label{ + color: #cdd6f4; +} + +#workspaces button { + padding: 5px; + color: #313244; + margin-right: 5px; +} + +#workspaces button.active { + color: #a6adc8; +} + +#workspaces button.focused { + color: #a6adc8; + background: #eba0ac; + border-radius: 10px; +} + +#workspaces button.urgent { + color: #11111b; + background: #a6e3a1; + border-radius: 10px; +} + +#workspaces button:hover { + background: #11111b; + color: #cdd6f4; + border-radius: 10px; +} + +#custom-launch_wofi, +#custom-lock_screen, +#custom-light_dark, +#custom-power_btn, +#custom-power_profile, +#custom-weather, +#window, +#cpu, +#disk, +#custom-updates, +#memory, +#clock, +#battery, +#pulseaudio, +#network, +#tray, +#temperature, +#workspaces, +#backlight { + background: #1e1e2e; + opacity: 0.8; + padding: 0px 10px; + margin: 3px 0px; + margin-top: 10px; + border: 0px; +} + +#tray, #custom-lock_screen, #temperature, #backlight, #custom-launch_wofi, #cpu { + border-radius: 10px 0px 0px 10px; +} + +#custom-light_dark, #custom-power_btn, #workspaces, #pulseaudio.microphone, #battery, #disk { + border-radius: 0px 10px 10px 0px; + margin-right: 10px; +} + +#temperature.critical { + color: #e92d4d; +} + + +#workspaces { + padding-right: 0px; + padding-left: 5px; +} + +#custom-power_profile { + color: #a6e3a1; + border-left: 0px; + border-right: 0px; +} + +#window { + border-radius: 10px; + margin-left: 20px; + margin-right: 20px; +} + +#custom-launch_wofi { + color: #89b4fa; + margin-left: 10px; + border-right: 0px; +} + +#pulseaudio { + color: #89b4fa; + border-left: 0px; + border-right: 0px; +} + +#pulseaudio.microphone { + color: #cba6f7; + border-left: 0px; + border-right: 0px; +} + +#battery { + color: #a6e3a1; + border-left: 0px; +} \ No newline at end of file diff --git a/dotfiles/config/waybar/style/style-dark.css b/dotfiles/config/waybar/style/style-dark.css new file mode 100644 index 0000000..7d1786f --- /dev/null +++ b/dotfiles/config/waybar/style/style-dark.css @@ -0,0 +1,135 @@ +* { + border: none; + border-radius: 0; + font-family: "JetBrainsMono Nerd Font"; + font-weight: bold; + font-size: 16px; + min-height: 0; +} + +window#waybar { + background: rgba(21, 18, 27, 0); + color: #cdd6f4; +} + +tooltip { + background: #1e1e2e; + opacity: 0.8; + border-radius: 10px; + border-width: 2px; + border-style: solid; + border-color: #11111b; +} + +tooltip label{ + color: #cdd6f4; +} + +#workspaces button { + padding: 5px; + color: #313244; + margin-right: 5px; +} + +#workspaces button.active { + color: #a6adc8; +} + +#workspaces button.focused { + color: #a6adc8; + background: #eba0ac; + border-radius: 10px; +} + +#workspaces button.urgent { + color: #11111b; + background: #a6e3a1; + border-radius: 10px; +} + +#workspaces button:hover { + background: #11111b; + color: #cdd6f4; + border-radius: 10px; +} + +#custom-launch_wofi, +#custom-lock_screen, +#custom-light_dark, +#custom-power_btn, +#custom-power_profile, +#custom-weather, +#window, +#cpu, +#disk, +#custom-updates, +#memory, +#clock, +#battery, +#pulseaudio, +#network, +#tray, +#temperature, +#workspaces, +#backlight { + background: #1e1e2e; + opacity: 0.8; + padding: 0px 10px; + margin: 3px 0px; + margin-top: 10px; + border: 0px; +} + +#tray, #custom-lock_screen, #temperature, #backlight, #custom-launch_wofi, #cpu { + border-radius: 10px 0px 0px 10px; +} + +#custom-light_dark, #custom-power_btn, #workspaces, #pulseaudio.microphone, #battery, #disk { + border-radius: 0px 10px 10px 0px; + margin-right: 10px; +} + +#temperature.critical { + color: #e92d4d; +} + + +#workspaces { + padding-right: 0px; + padding-left: 5px; +} + +#custom-power_profile { + color: #a6e3a1; + border-left: 0px; + border-right: 0px; +} + +#window { + border-radius: 10px; + margin-left: 20px; + margin-right: 20px; +} + +#custom-launch_wofi { + color: #89b4fa; + margin-left: 10px; + border-right: 0px; +} + +#pulseaudio { + color: #89b4fa; + border-left: 0px; + border-right: 0px; +} + +#pulseaudio.microphone { + color: #cba6f7; + border-left: 0px; + border-right: 0px; +} + +#battery { + color: #a6e3a1; + border-left: 0px; +} \ No newline at end of file diff --git a/dotfiles/config/waybar/style/style.css b/dotfiles/config/waybar/style/style.css new file mode 100644 index 0000000..4443450 --- /dev/null +++ b/dotfiles/config/waybar/style/style.css @@ -0,0 +1,135 @@ +* { + border: none; + border-radius: 0; + font-family: "JetBrainsMono Nerd Font"; + font-weight: bold; + font-size: 16px; + min-height: 0; +} + +window#waybar { + background: rgba(21, 18, 27, 0); + color: #2b2b2c; +} + +tooltip { + background: #e7e7ec;; + opacity: 0.8; + border-radius: 10px; + border-width: 2px; + border-style: solid; + border-color: #11111b; +} + +tooltip label{ + color: #2b2b2c; +} + +#workspaces button { + padding: 5px; + color: #313244; + margin-right: 5px; +} + +#workspaces button.active { + color: #a6adc8; +} + +#workspaces button.focused { + color: #a6adc8; + background: #eba0ac; + border-radius: 10px; +} + +#workspaces button.urgent { + color: #11111b; + background: #a6e3a1; + border-radius: 10px; +} + +#workspaces button:hover { + background: #11111b; + color: #cdd6f4; + border-radius: 10px; +} + +#custom-launch_wofi, +#custom-lock_screen, +#custom-light_dark, +#custom-power_btn, +#custom-power_profile, +#custom-weather, +#window, +#cpu, +#disk, +#custom-updates, +#memory, +#clock, +#battery, +#pulseaudio, +#network, +#tray, +#temperature, +#workspaces, +#backlight { + background: #e7e7ec; + opacity: 0.8; + padding: 0px 10px; + margin: 3px 0px; + margin-top: 10px; + border: 0px; +} + +#tray, #custom-lock_screen, #temperature, #backlight, #custom-launch_wofi, #cpu { + border-radius: 10px 0px 0px 10px; +} + +#custom-light_dark, #custom-power_btn, #workspaces, #pulseaudio.microphone, #battery, #disk{ + border-radius: 0px 10px 10px 0px; + margin-right: 10px; +} + +#temperature.critical { + color: #e92d4d; +} + + +#workspaces { + padding-right: 0px; + padding-left: 5px; +} + +#custom-power_profile { + color: #1d7715; + border-left: 0px; + border-right: 0px; +} + +#window { + border-radius: 10px; + margin-left: 20px; + margin-right: 20px; +} + +#custom-launch_wofi { + color: #407cdd; + margin-left: 10px; + border-right: 0px; +} + +#pulseaudio { + color: #407cdd; + border-left: 0px; + border-right: 0px; +} + +#pulseaudio.microphone { + color: #ad6bfd; + border-left: 0px; + border-right: 0px; +} + +#battery { + color: #1d7715; + border-left: 0px; +} diff --git a/dotfiles/config/wofi/config b/dotfiles/config/wofi/config new file mode 100644 index 0000000..adf78c7 --- /dev/null +++ b/dotfiles/config/wofi/config @@ -0,0 +1,15 @@ +width=600 +height=350 +location=center +show=drun +prompt=Search... +filter_rate=100 +allow_markup=true +no_actions=true +halign=fill +orientation=vertical +content_halign=fill +insensitive=true +allow_images=true +image_size=40 +gtk_dark=true diff --git a/dotfiles/config/wofi/style.css b/dotfiles/config/wofi/style.css new file mode 100644 index 0000000..56be9d9 --- /dev/null +++ b/dotfiles/config/wofi/style.css @@ -0,0 +1,75 @@ +window { + margin: 0px; + border: 5px solid #1e1e2e; + background-color: #cdd6f4; + border-radius: 15px; +} + +#input { + padding: 4px; + margin: 4px; + padding-left: 20px; + border: none; + color: #cdd6f4; + font-weight: bold; + background-color: #1e1e2e; + outline: none; + border-radius: 15px; + margin: 10px; + margin-bottom: 2px; +} +#input:focus { + border: 0px solid #1e1e2e; + margin-bottom: 0px; +} + +#inner-box { + margin: 4px; + border: 10px solid #1e1e2e; + color: #cdd6f4; + font-weight: bold; + background-color: #1e1e2e; + border-radius: 15px; +} + +#outer-box { + margin: 0px; + border: none; + border-radius: 15px; + background-color: #1e1e2e; +} + +#scroll { + margin-top: 5px; + border: none; + border-radius: 15px; + margin-bottom: 5px; + /* background: rgb(255,255,255); */ +} + +#img:selected { + background-color: #89b4fa; + border-radius: 15px; +} + +#text:selected { + color: #cdd6f4; + margin: 0px 0px; + border: none; + border-radius: 15px; + background-color: #89b4fa; +} + +#entry { + margin: 0px 0px; + border: none; + border-radius: 15px; + background-color: transparent; +} + +#entry:selected { + margin: 0px 0px; + border: none; + border-radius: 15px; + background-color: #89b4fa; +} diff --git a/dotfiles/config/wofi/style/style-dark.css b/dotfiles/config/wofi/style/style-dark.css new file mode 100644 index 0000000..56be9d9 --- /dev/null +++ b/dotfiles/config/wofi/style/style-dark.css @@ -0,0 +1,75 @@ +window { + margin: 0px; + border: 5px solid #1e1e2e; + background-color: #cdd6f4; + border-radius: 15px; +} + +#input { + padding: 4px; + margin: 4px; + padding-left: 20px; + border: none; + color: #cdd6f4; + font-weight: bold; + background-color: #1e1e2e; + outline: none; + border-radius: 15px; + margin: 10px; + margin-bottom: 2px; +} +#input:focus { + border: 0px solid #1e1e2e; + margin-bottom: 0px; +} + +#inner-box { + margin: 4px; + border: 10px solid #1e1e2e; + color: #cdd6f4; + font-weight: bold; + background-color: #1e1e2e; + border-radius: 15px; +} + +#outer-box { + margin: 0px; + border: none; + border-radius: 15px; + background-color: #1e1e2e; +} + +#scroll { + margin-top: 5px; + border: none; + border-radius: 15px; + margin-bottom: 5px; + /* background: rgb(255,255,255); */ +} + +#img:selected { + background-color: #89b4fa; + border-radius: 15px; +} + +#text:selected { + color: #cdd6f4; + margin: 0px 0px; + border: none; + border-radius: 15px; + background-color: #89b4fa; +} + +#entry { + margin: 0px 0px; + border: none; + border-radius: 15px; + background-color: transparent; +} + +#entry:selected { + margin: 0px 0px; + border: none; + border-radius: 15px; + background-color: #89b4fa; +} diff --git a/dotfiles/config/wofi/style/style.css b/dotfiles/config/wofi/style/style.css new file mode 100644 index 0000000..951bf97 --- /dev/null +++ b/dotfiles/config/wofi/style/style.css @@ -0,0 +1,75 @@ +window { + margin: 0px; + border: 5px solid #1e1e2e; + background-color: #cdd6f4; + border-radius: 15px; +} + +#input { + padding: 4px; + margin: 4px; + padding-left: 20px; + border: none; + color: #1e1e2e; + font-weight: bold; + background-color: #e7e7ec; + outline: none; + border-radius: 15px; + margin: 10px; + margin-bottom: 2px; +} +#input:focus { + border: 0px solid #1e1e2e; + margin-bottom: 0px; +} + +#inner-box { + margin: 4px; + border: 10px solid #e7e7ec; + color: #1e1e2e; + font-weight: bold; + background-color: #e7e7ec; + border-radius: 15px; +} + +#outer-box { + margin: 0px; + border: none; + border-radius: 15px; + background-color: #e7e7ec; +} + +#scroll { + margin-top: 5px; + border: none; + border-radius: 15px; + margin-bottom: 5px; + /* background: rgb(255,255,255); */ +} + +#img:selected { + background-color: #89b4fa; + border-radius: 15px; +} + +#text:selected { + color: #1e1e2e; + margin: 0px 0px; + border: none; + border-radius: 15px; + background-color: #89b4fa; +} + +#entry { + margin: 0px 0px; + border: none; + border-radius: 15px; + background-color: transparent; +} + +#entry:selected { + margin: 0px 0px; + border: none; + border-radius: 15px; + background-color: #89b4fa; +} diff --git a/dotfiles/zshrc b/dotfiles/zshrc new file mode 100644 index 0000000..20eae80 --- /dev/null +++ b/dotfiles/zshrc @@ -0,0 +1,134 @@ +# If you come from bash you might have to change your $PATH. +# export PATH=$HOME/bin:/usr/local/bin:$PATH + +# Path to your oh-my-zsh installation. +export ZSH="$HOME/.oh-my-zsh" + +# Set name of the theme to load --- if set to "random", it will +# load a random theme each time oh-my-zsh is loaded, in which case, +# to know which specific one was loaded, run: echo $RANDOM_THEME +# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes +ZSH_THEME="zhann" + +# Set list of themes to pick from when loading at random +# Setting this variable when ZSH_THEME=random will cause zsh to load +# a theme from this variable instead of looking in $ZSH/themes/ +# If set to an empty array, this variable will have no effect. +# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) + +# Uncomment the following line to use case-sensitive completion. +# CASE_SENSITIVE="true" + +# Uncomment the following line to use hyphen-insensitive completion. +# Case-sensitive completion must be off. _ and - will be interchangeable. +# HYPHEN_INSENSITIVE="true" + +# Uncomment one of the following lines to change the auto-update behavior +# zstyle ':omz:update' mode disabled # disable automatic updates +# zstyle ':omz:update' mode auto # update automatically without asking +# zstyle ':omz:update' mode reminder # just remind me to update when it's time + +# Uncomment the following line to change how often to auto-update (in days). +# zstyle ':omz:update' frequency 13 + +# Uncomment the following line if pasting URLs and other text is messed up. +# DISABLE_MAGIC_FUNCTIONS="true" + +# Uncomment the following line to disable colors in ls. +# DISABLE_LS_COLORS="true" + +# Uncomment the following line to disable auto-setting terminal title. +# DISABLE_AUTO_TITLE="true" + +# Uncomment the following line to enable command auto-correction. +# ENABLE_CORRECTION="true" + +# Uncomment the following line to display red dots whilst waiting for completion. +# You can also set it to another string to have that shown instead of the default red dots. +# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f" +# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765) +# COMPLETION_WAITING_DOTS="true" + +# Uncomment the following line if you want to disable marking untracked files +# under VCS as dirty. This makes repository status check for large repositories +# much, much faster. +# DISABLE_UNTRACKED_FILES_DIRTY="true" + +# Uncomment the following line if you want to change the command execution time +# stamp shown in the history command output. +# You can set one of the optional three formats: +# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" +# or set a custom format using the strftime function format specifications, +# see 'man strftime' for details. +# HIST_STAMPS="mm/dd/yyyy" + +# Would you like to use another custom folder than $ZSH/custom? +# ZSH_CUSTOM=/path/to/new-custom-folder + +# Which plugins would you like to load? +# Standard plugins can be found in $ZSH/plugins/ +# Custom plugins may be added to $ZSH_CUSTOM/plugins/ +# Example format: plugins=(rails git textmate ruby lighthouse) +# Add wisely, as too many plugins slow down shell startup. +plugins=( + git + sudo + zsh-syntax-highlighting + zsh-autosuggestions + history-substring-search +) + +source $ZSH/oh-my-zsh.sh + +# User configuration + +# export MANPATH="/usr/local/man:$MANPATH" +export PATH="/home/lostecho/.local/bin:$PATH" + +# You may need to manually set your language environment +export LANG=en_US.UTF-8 +export EDITOR=vim + +# Preferred editor for local and remote sessions +# if [[ -n $SSH_CONNECTION ]]; then +# export EDITOR='vim' +# else +# export EDITOR='mvim' +# fi + +# Compilation flags +# export ARCHFLAGS="-arch x86_64" + +# Set personal aliases, overriding those provided by oh-my-zsh libs, +# plugins, and themes. Aliases can be placed here, though oh-my-zsh +# users are encouraged to define aliases within the ZSH_CUSTOM folder. +# For a full list of active aliases, run `alias`. +# +# Example aliases +# alias zshconfig="mate ~/.zshrc" +# alias ohmyzsh="mate ~/.oh-my-zsh" + +# proxy alias +alias proxy="export all_proxy=http://192.168.31.40:7890" # for home network enviroment +alias noproxy="export all_proxy=''" # cancel proxy mode + +alias dotdrop="dotdrop --cfg=~/.dotfiles/config.yaml" + +# config file shortcut +alias vhypr="vim ~/.config/hypr/hyprland.conf" # edit hyprland config +alias vzsh="vim ~/.zshrc" # edit zsh config +alias szsh="source ~/.zshrc" # source the zshrc file + +# quick command +alias vim="nvim" # replace vim to nvim +alias pdf="zathura" +alias epub="zathura" + +# install software +alias installaur="sudo pacman -S yay paru" +alias installinput="sudo pacman -S wqy-microhei fcitx5-im fcitx5-chinese-addons fcitx5-material-color && yay -S fcitx5-input-support" +alias installhyprland="yay -S hyprland-git kitty hyprpaper dunst polkit-kde-agent swww-git wlogout swaylock-effects ranger ttf-jetbrains-mono-nerd noto-fonts-emoji && paru -S waybar-hyprland wofi" +alias installnotes="yay -S logseq-desktop obsidian-appimage zathura zathura-pdf-mupdf" +alias installsddm="yay -S sddm sddm-sugar-candy-git" +alias inatallother="yay -S blueman nm-connection-editor xf86-video-intel 7-zip-full neofetch acpilight google-chrome" +alias installcode="sudo pacman -S ruby go jdk17-openjdk python-pip npm clang cargo"