diff --git a/platforms/linux/chromium-flags.conf b/platforms/linux/chromium-flags.conf index 1f66a07..db0dfca 100644 --- a/platforms/linux/chromium-flags.conf +++ b/platforms/linux/chromium-flags.conf @@ -10,3 +10,4 @@ # Linking: # ln -sf $DOTFILES/platforms/linux/chromium-flags.conf ~/.var/app/com.vivaldi.Vivaldi/config/vivaldi-flags.conf --password-store=kwallet6 +--enable-wayland-ime diff --git a/platforms/linux/wayland/electron-flags.conf b/platforms/linux/electron-flags.conf similarity index 61% rename from platforms/linux/wayland/electron-flags.conf rename to platforms/linux/electron-flags.conf index 7ff2980..2605ffc 100644 --- a/platforms/linux/wayland/electron-flags.conf +++ b/platforms/linux/electron-flags.conf @@ -5,8 +5,10 @@ # Location: # ~/.config/electron-flags.conf +# ~/.config/code-flags.conf # Linking: -# ln -sf $DOTFILES/platforms/linux/hyprland/electron-flags.conf ~/.config/ +# ln -sf $DOTFILES/platforms/linux/electron-flags.conf ~/.config/electron-flags.conf +# ln -sf $DOTFILES/platforms/linux/electron-flags.conf ~/.config/code-flags.conf # --enable-features=UseOzonePlatform # --ozone-platform=wayland diff --git a/platforms/linux/etc/environment b/platforms/linux/etc/environment index 4b0e152..dcb8961 100644 --- a/platforms/linux/etc/environment +++ b/platforms/linux/etc/environment @@ -14,10 +14,17 @@ # #QT_QPA_PLATFORMTHEME=qt5ct #QT_STYLE_OVERRIDE=kvantum +# Software BROWSER="com.vivaldi.Vivaldi" EDITOR=nvim +# IME GTK_IM_MODULE=fcitx QT_IM_MODULE=fcitx SDL_IM_MODULE=fcitx XMODIFIFERS="@im=fcitx" GLFW_IM_MODULE=fcitx +# Scaling +QT_SCALE_FACTOR=1.75 +# 2 * 0.875 = 1.75 +GDK_SCALE=2 +GDK_DPI_SCALE=0.875 diff --git a/platforms/linux/hypr/hyprland.conf b/platforms/linux/hypr/hyprland.conf index 72a3e6b..26c1646 100644 --- a/platforms/linux/hypr/hyprland.conf +++ b/platforms/linux/hypr/hyprland.conf @@ -54,7 +54,7 @@ monitor=DP-2,3840x2160@59,0x0,1.666667 # Set programs that you use $terminal = wezterm-gui $fileManager = dolphin -$menu = albert show +$menu = wofi ################# @@ -66,7 +66,15 @@ $menu = albert show # exec-once = $terminal # exec-once = nm-applet & -exec-once = waybar & hyprpaper & mako & systemctl --user start hyprpolkitagent & fcitx5 & albert & +# exec-once = waybar & hyprpaper & mako & systemctl --user start hyprpolkitagent & fcitx5 & albert +exec-once = waybar & +exec-once = mako & +exec-once = hyprpaper & +exec-once = systemctl --user start hyprpolkitagent +exec-once = fcitx5 & +exec-once = wl-paste --watch cliphist store +# exec-once = QT_SCALE_FACTOR=1 albert & + ############################# @@ -236,7 +244,9 @@ bind = $mainMod, R, exec, $terminal bind = $mainMod, Q, killactive, bind = $mainMod, M, exit, bind = $mainMod, F, exec, $fileManager -bind = $mainMod, V, togglefloating, +bind = $mainMod, V, exec, cliphist list | wofi --dmenu | cliphist decode | wl-copy +bind = $mainMod SHIFT, V, togglefloating + bind = $mainMod, space, exec, $menu bind = $mainMod, P, pseudo, # dwindle bind = $mainMod, X, togglesplit, # dwindle diff --git a/platforms/linux/kde/dolphinrc b/platforms/linux/kde/dolphinrc index 61043b0..86c529b 100644 --- a/platforms/linux/kde/dolphinrc +++ b/platforms/linux/kde/dolphinrc @@ -1,18 +1,9 @@ -# $DOTFILES/platforms/linux/kde/dolphinrc -# Date: 2024-12-22 -# Author: js0ny -# Dolphin - KDE File Explorer - -# Location: -# $XDG_CONFIG_HOME/dolphinrc -# Linking: -# ln -sf $DOTFILES/platforms/linux/kde/dolphinrc $XDG_CONFIG_HOME/dolphinrc - [General] Version=202 ViewPropsTimestamp=2024,12,10,0,19,35.931 + [IconsMode] -PreviewSize=80 +PreviewSize=48 [KFileDialog Settings] Places Icons Auto-resize=false diff --git a/platforms/linux/waybar/config b/platforms/linux/waybar/config new file mode 100644 index 0000000..d8ba47c --- /dev/null +++ b/platforms/linux/waybar/config @@ -0,0 +1,37 @@ +{ + "include": "~/.config/waybar/modules", + "name": "main-bar", + "id": "main-bar", + "layer": "top", + "mode": "dock", + "exclusive": true, + "passthrough": false, + "position": "top", + "output": "DP-2", + "height": 32, + "width": "", + "spacing": 6, + "margin": 0, + "margin-top": 0, + "margin-bottom": 0, + "margin-left": 0, + "margin-right": 0, + "fixed-center": true, + "ipc": true, + "modules-left": [ + "custom/menu", + "hyprland/workspaces" + ], + // "modules-center": [ + // "hyprland/window", + // "mpd" + // ], + "modules-right": [ + "tray", + "pulseaudio", + "custom/weather", + "battery", + "clock", + "custom/power" + ] +} \ No newline at end of file diff --git a/platforms/linux/waybar/modules b/platforms/linux/waybar/modules new file mode 100644 index 0000000..48dd848 --- /dev/null +++ b/platforms/linux/waybar/modules @@ -0,0 +1,149 @@ +// Waybar modules configuration +{ + // waybar-backlight + "backlight": { + "interval": 2, + "align": 0, + "rotate": 0, + //"device": "amdgpu_bl0", + "format": "{icon} {percent}%", + "format-icons": [ + "", + "", + "", + "" + ], + // Commands to execute on events + "on-click": "", + "on-click-middle": "", + "on-click-right": "", + "on-update": "", + "on-scroll-up": "light -A 5%", + "on-scroll-down": "light -U 5%", + "smooth-scrolling-threshold": 1 + }, + "hyprland/workspaces": { + "format": "{icon} {windows}", + "format-window-separator": " ", + "window-rewrite-default": "", + "window-rewrite": { + "title<.*youtube.*>": "", + "class": "", + "class<.*wezterm>": "", + "class": "", + "class": "󱓞", + "class title<.*github.*>": "", + "class": "󰰬", + "obsidian": "󱓩", + "foot": "", + "Cider": "", + "class": "", + "code": "󰨞", + "class<.*telegram.*>": "", + "discord": "", + "neovide": "", + "class": "", + "class<.*wechat.*>": "", + "QQ": "", + "class": "", + "Zotero": "", + "class": "", + "class": "", + } + }, + // waybar-battery + "battery": { + "interval": 60, + "align": 0, + "rotate": 0, + //"bat": "BAT1", + //"adapter": "ACAD", + "full-at": 100, + "design-capacity": false, + "states": { + "good": 95, + "warning": 30, + "critical": 15 + }, + "format": "{icon} {capacity}%", + "format-charging": " {capacity}%", + "format-plugged": " {capacity}%", + "format-full": "{icon} Full", + //"format-good": "", + "format-alt": "{icon} {time}", + "format-icons": [ + "", + "", + "", + "", + "" + ], + "format-time": "{H}h {M}min", + "tooltip": true + }, + // waybar-clock + "clock": { + "interval": 1, + "align": 0, + "rotate": 0, + "tooltip-format": "{:%B %Y}\n{calendar}", + "format": " {:%H:%M:%S}", + "format-alt": " {:%a %b %d, %G}" + }, + // waybar-cpu + "cpu": { + "interval": 5, + "format": " {usage}%" + }, + // waybar-custom + "custom/menu": { + "format": "󰣇 ", + "tooltip": false, + "on-click": "wofi" + }, + "custom/power": { + "format": "⏻", + "tooltip": false, + "on-click": "wlogout" + }, + // weather-custom + "custom/weather": { + "format": "{}", + "format-alt": "{alt}: {}", + "format-alt-click": "click-right", + "interval": 1800, + "return-type": "json", + "exec": "~/.config/hypr/scripts/weather.sh", + "exec-if": "ping wttr.in -c1" + }, + // waybar-tray + "tray": { + "icon-size": 16, + "spacing": 10 + }, + "pulseaudio": { + "format": "{volume}% {icon}", + "format-bluetooth": "{volume}% {icon}", + "format-muted": "", + "format-icons": { + "alsa_output.pci-0000_00_1f.3.analog-stereo": "", + "alsa_output.pci-0000_00_1f.3.analog-stereo-muted": "", + "headphone": "", + "hands-free": "", + "headset": "", + "phone": "", + "phone-muted": "", + "portable": "", + "car": "", + "default": [ + "", + "" + ] + }, + "scroll-step": 1, + "on-click": "pavucontrol", + "ignored-sinks": [ + "Easy Effects Sink" + ] + } +} diff --git a/platforms/linux/waybar/style.css b/platforms/linux/waybar/style.css new file mode 100644 index 0000000..c149fca --- /dev/null +++ b/platforms/linux/waybar/style.css @@ -0,0 +1,184 @@ +/** ********** Fonts ********** **/ +* { + font-family: "JetBrains Mono", "Iosevka Nerd Font", archcraft, sans-serif; + font-size: 12px; +} + +/** ********** Waybar Window ********** **/ +window#waybar { + background-color: #1e1e2e; + color: #1e1e2e; + border-bottom: 2px solid #313244; + transition-property: background-color; + transition-duration: .5s; +} + +window#waybar.hidden { + opacity: 0.5; +} + +/** ********** Backlight ********** **/ +#backlight { + background-color: #cba6f7; +} + +/** ********** Battery ********** **/ +#battery { + background-color: #f9e2af; +} + +#battery.charging { +} + +#battery.plugged { +} + +@keyframes blink { + to { + color: #000000; + } +} + +#battery.critical:not(.charging) { + background-color: #f38ba8; + color: #f38ba8; + animation-name: blink; + animation-duration: 0.5s; + animation-timing-function: linear; + animation-iteration-count: infinite; + animation-direction: alternate; +} + +/** ********** Clock ********** **/ +#clock { + background-color: #a6e3a1; +} + +/** ********** CPU ********** **/ +#cpu { + background-color: #89dceb; +} + +/** ********** Memory ********** **/ +#memory { + background-color: #eba0ac; +} + +/** ********** Disk ********** **/ +#disk { + background-color: #b4befe; +} + +/** ********** Tray ********** **/ +#tray { + background-color: #cdd6f4; +} +#tray > .passive { + -gtk-icon-effect: dim; +} +#tray > .needs-attention { + -gtk-icon-effect: highlight; +} +#tray > .active { +} + +/** ********** MPD ********** **/ +#mpd { + background-color: #94e2d5; +} + +#mpd.disconnected { + background-color: #f38ba8; +} + +#mpd.stopped { + background-color: #f5c2e7; +} + +#mpd.playing { + background-color: #74c7ec; +} + +#mpd.paused { +} + +/** ********** Pulseaudio ********** **/ +#pulseaudio { + background-color: #fab387; +} + +#pulseaudio.bluetooth { + background-color: #f5c2e7; +} +#pulseaudio.muted { + background-color: #313244; + color: #cdd6f4; +} + +/** ********** Network ********** **/ +#network { + background-color: #89b4fa; +} + +#network.disconnected,#network.disabled { + background-color: #313244; + color: #cdd6f4; +} +#network.linked { +} +#network.ethernet { +} +#network.wifi { +} + +/** ********** Custom ********** **/ +#custom-menu, #custom-power, #custom-weather, #custom-updater { + border-radius: 4px; + margin: 6px 0px; + padding: 2px 8px; +} + +#custom-menu { + background-color: #f5c2e7; + margin-left: 6px; + padding: 2px 6px; + font-size: 16px; +} + +#custom-power { + background-color: #f38ba8; + margin-right: 6px; + padding: 2px 8px; + font-size: 16px; +} + +#custom-updater { + background-color: #e6ed7b; + margin-right: 6px; + padding: 2px 8px; + font-size: 12px; +} + +#custom-weather { + background-color: #cba6f7; + margin-right: 6px; + padding: 2px 8px; + font-size: 12px; +} + +/** Common style **/ +#backlight, +#battery, +#clock, +#cpu, +#disk, +#mode, +#memory, +#mpd, +#tray, +#pulseaudio, +#network { + border-radius: 4px; + margin: 6px 0px; + padding: 2px 8px; +} diff --git a/platforms/linux/wayland/code-flags.conf b/platforms/linux/wayland/code-flags.conf deleted file mode 100644 index 5a37672..0000000 --- a/platforms/linux/wayland/code-flags.conf +++ /dev/null @@ -1,14 +0,0 @@ -# $DOTFILES/platforms/linux/hyprland/code-flags.conf -# Date: 2024-12-22 -# Author: js0ny -# Force VSCode to use Wayland - -# Location: -# ~/.config/code-flags.conf -# Linking: -# ln -sf $DOTFILES/platforms/linux/hyprland/code-flags.conf ~/.config/ - -# --enable-features=UseOzonePlatform -# --ozone-platform=wayland ---ozone-platform-hint=auto ---enable-wayland-ime diff --git a/platforms/linux/wlogout/actions b/platforms/linux/wlogout/actions new file mode 100644 index 0000000..426dcb8 --- /dev/null +++ b/platforms/linux/wlogout/actions @@ -0,0 +1,50 @@ +#!/usr/bin/env bash + +## wlogout actions + +# Ask for confirmation +cdialog () { + yad --title='Confirm?' --borders=15 --center --fixed --undecorated --button=Yes:0 --button=No:1 --text="Are you sure?" --text-align=center +} + +if [[ "$1" == '--shutdown' ]]; then + cdialog + if [[ "$?" == 0 ]]; then + systemctl poweroff + else + exit + fi +elif [[ "$1" == '--reboot' ]]; then + cdialog + if [[ "$?" == 0 ]]; then + systemctl reboot + else + exit + fi +elif [[ "$1" == '--hibernate' ]]; then + cdialog + if [[ "$?" == 0 ]]; then + systemctl hibernate + else + exit + fi +elif [[ "$1" == '--lock' ]]; then + ~/.config/hypr/scripts/lockscreen +elif [[ "$1" == '--suspend' ]]; then + cdialog + if [[ "$?" == 0 ]]; then + mpc -q pause + amixer set Master mute + ~/.config/hypr/scripts/lockscreen + systemctl suspend + else + exit + fi +elif [[ "$1" == '--logout' ]]; then + cdialog + if [[ "$?" == 0 ]]; then + kill -9 -1 + else + exit + fi +fi diff --git a/platforms/linux/wlogout/icons/hibernate.png b/platforms/linux/wlogout/icons/hibernate.png new file mode 100644 index 0000000..6e3ba13 Binary files /dev/null and b/platforms/linux/wlogout/icons/hibernate.png differ diff --git a/platforms/linux/wlogout/icons/lock.png b/platforms/linux/wlogout/icons/lock.png new file mode 100644 index 0000000..72530d6 Binary files /dev/null and b/platforms/linux/wlogout/icons/lock.png differ diff --git a/platforms/linux/wlogout/icons/logout.png b/platforms/linux/wlogout/icons/logout.png new file mode 100644 index 0000000..cf1ab31 Binary files /dev/null and b/platforms/linux/wlogout/icons/logout.png differ diff --git a/platforms/linux/wlogout/icons/reboot.png b/platforms/linux/wlogout/icons/reboot.png new file mode 100644 index 0000000..b433e24 Binary files /dev/null and b/platforms/linux/wlogout/icons/reboot.png differ diff --git a/platforms/linux/wlogout/icons/shutdown.png b/platforms/linux/wlogout/icons/shutdown.png new file mode 100644 index 0000000..80e89d1 Binary files /dev/null and b/platforms/linux/wlogout/icons/shutdown.png differ diff --git a/platforms/linux/wlogout/icons/suspend.png b/platforms/linux/wlogout/icons/suspend.png new file mode 100644 index 0000000..a425d19 Binary files /dev/null and b/platforms/linux/wlogout/icons/suspend.png differ diff --git a/platforms/linux/wlogout/layout b/platforms/linux/wlogout/layout new file mode 100644 index 0000000..c0afb9a --- /dev/null +++ b/platforms/linux/wlogout/layout @@ -0,0 +1,30 @@ +{ + "label" : "suspend", + "text" : "Suspend", + "action" : "~/.config/hypr/wlogout/actions --suspend", + "keybind" : "u" +} +{ + "label" : "logout", + "text" : "Logout", + "action" : "~/.config/hypr/wlogout/actions --logout", + "keybind" : "e" +} +{ + "label" : "lock", + "text" : "Lock", + "action" : "~/.config/hypr/wlogout/actions --lock", + "keybind" : "l" +} +{ + "label" : "reboot", + "text" : "Reboot", + "action" : "~/.config/hypr/wlogout/actions --reboot", + "keybind" : "r" +} +{ + "label" : "shutdown", + "text" : "Shutdown", + "action" : "~/.config/hypr/wlogout/actions --shutdown", + "keybind" : "s" +} diff --git a/platforms/linux/wlogout/style.css b/platforms/linux/wlogout/style.css new file mode 100644 index 0000000..095f510 --- /dev/null +++ b/platforms/linux/wlogout/style.css @@ -0,0 +1,52 @@ +/** ********** Fonts ********** **/ +* { + font-family: "JetBrains Mono", "Iosevka Nerd Font", archcraft, sans-serif; + font-size: 14px; + font-weight: bold; +} + +/** ********** Main Window ********** **/ +window { + background-color: #1E1E2E; +} + +/** ********** Buttons ********** **/ +button { + background-color: #242434; + color: #FFFFFF; + border: 2px solid #282838; + border-radius: 20px; + background-repeat: no-repeat; + background-position: center; + background-size: 35%; +} + +button:focus, button:active, button:hover { + background-color: #89B4FA; + outline-style: none; +} + +/** ********** Icons ********** **/ +#lock { + background-image: image(url("icons/lock.png"), url("/usr/share/wlogout/icons/lock.png")); +} + +#logout { + background-image: image(url("icons/logout.png"), url("/usr/share/wlogout/icons/logout.png")); +} + +#suspend { + background-image: image(url("icons/suspend.png"), url("/usr/share/wlogout/icons/suspend.png")); +} + +#hibernate { + background-image: image(url("icons/hibernate.png"), url("/usr/share/wlogout/icons/hibernate.png")); +} + +#shutdown { + background-image: image(url("icons/shutdown.png"), url("/usr/share/wlogout/icons/shutdown.png")); +} + +#reboot { + background-image: image(url("icons/reboot.png"), url("/usr/share/wlogout/icons/reboot.png")); +} diff --git a/tools/nvim/lazy-lock.json b/tools/nvim/lazy-lock.json index c6272e5..d1b21c1 100644 --- a/tools/nvim/lazy-lock.json +++ b/tools/nvim/lazy-lock.json @@ -31,14 +31,14 @@ "nvim-web-devicons": { "branch": "master", "commit": "37334adf4517fecfd97c0b44e1d4718e377e9e52" }, "obsidian.nvim": { "branch": "main", "commit": "ae1f76a75c7ce36866e1d9342a8f6f5b9c2caf9b" }, "onedarkpro.nvim": { "branch": "main", "commit": "44775f8206ee43b692e7f3dc894ddc47996ee523" }, - "orgmode": { "branch": "master", "commit": "2a5eeb38a7446d07375444e1f812cf95c0182dc5" }, + "orgmode": { "branch": "master", "commit": "13b5ff707b42d4c561009bfe7fe4ccf31e8910a1" }, "plenary.nvim": { "branch": "master", "commit": "3707cdb1e43f5cea73afb6037e6494e7ce847a66" }, "project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" }, "render-markdown.nvim": { "branch": "main", "commit": "ad055861d17afe058bd835e82292e14a64b51b1d" }, "telescope.nvim": { "branch": "master", "commit": "415af52339215926d705cccc08145f3782c4d132" }, "vim-floaterm": { "branch": "master", "commit": "4e28c8dd0271e10a5f55142fb6fe9b1599ee6160" }, "vim-illuminate": { "branch": "master", "commit": "5eeb7951fc630682c322e88a9bbdae5c224ff0aa" }, - "vim-just": { "branch": "main", "commit": "ed67f198e981f555c0f9e9ed5b69b4b06543a9e1" }, + "vim-just": { "branch": "main", "commit": "d07978c23c967c54c04a4dff9b25bcd6de5e91e0" }, "vim-wakatime": { "branch": "master", "commit": "e46d7c4f98ee0f40782008dd60cb2a79c377fb1d" }, "vimtex": { "branch": "master", "commit": "b4eb43603dccf33b7d8597fbe1403c6430a24886" }, "which-key.nvim": { "branch": "main", "commit": "6cebd86917df559a88de0f806b2989799c6e6423" }, diff --git a/tools/wezterm/wezterm.lua b/tools/wezterm/wezterm.lua index 61c6e22..38aed47 100644 --- a/tools/wezterm/wezterm.lua +++ b/tools/wezterm/wezterm.lua @@ -67,7 +67,7 @@ config.max_fps = 120 config.font = wezterm.font({ family = "CaskaydiaCove Nerd Font", }) -config.color_scheme = "Catppuccin Frappe" +config.color_scheme = "Catppuccin Mocha" config.font_size = 12.0 config.front_end = "WebGpu" config.webgpu_power_preference = "HighPerformance" @@ -209,8 +209,7 @@ config.mouse_bindings = { --#endregion --#region Environment -config.set_environment_variables = { -} +config.set_environment_variables = {} --#endregion --#region Launching @@ -251,7 +250,7 @@ if os_type == "Windows" then }, } elseif os_type == "macOS" then - config.default_prog = { "/opt/homebrew/bin/fish", "-l"} + config.default_prog = { "/opt/homebrew/bin/fish", "-l" } else config.default_prog = { "fish" } config.launch_menu = {