commit 6948d015ac7da744ab12cc30d6d0ba367dcb215b Author: Yash Karandikar Date: Fri Jan 21 11:22:06 2022 -0600 Initial commit diff --git a/.Xdefaults b/.Xdefaults new file mode 100644 index 0000000..9702e07 --- /dev/null +++ b/.Xdefaults @@ -0,0 +1 @@ +Xft.dpi: 120 diff --git a/.config/i3/config b/.config/i3/config new file mode 100644 index 0000000..6a73f1b --- /dev/null +++ b/.config/i3/config @@ -0,0 +1,226 @@ +# This file has been auto-generated by i3-config-wizard(1). +# It will not be overwritten, so edit it as you like. +# +# Should you change your keyboard layout some time, delete +# this file and re-run i3-config-wizard(1). +# + +# i3 config file (v4) +# +# Please see https://i3wm.org/docs/userguide.html for a complete reference! + +set $mod Mod4 + +# Font for window titles. Will also be used by the bar unless a different font +# is used in the bar {} block below. +font pango:monospace 8 + +# This font is widely installed, provides lots of unicode glyphs, right-to-left +# text rendering and scalability on retina/hidpi displays (thanks to pango). +#font pango:DejaVu Sans Mono 8 + +# The combination of xss-lock, nm-applet and pactl is a popular choice, so +# they are included here as an example. Modify as you see fit. + +# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the +# screen before suspend. Use loginctl lock-session to lock your screen. +exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock -i ~/Downloads/wallpaper.png --nofork + +# NetworkManager is the most popular way to manage wireless networks on Linux, +# and nm-applet is a desktop environment-independent system tray GUI for it. +exec --no-startup-id nm-applet + +exec xinput set-prop 12 285 1 & +# exec xrandr --output eDP1 --scale 0.8x0.8 +exec ~/.fehbg & +bindsym $mod+s exec scrot -e 'xclip -selection clipboard -t image/png -i $f && rm $f' +bindsym $mod+e layout toggle split +focus_follows_mouse no + +for_window [class="^.*"] border pixel 3 + +set $Locker i3lock -i ~/Downloads/wallpaper.png && sleep 1 + +set $mode_system System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown +mode "$mode_system" { + bindsym l exec --no-startup-id $Locker, mode "default" + bindsym e exec --no-startup-id i3-msg exit, mode "default" + bindsym s exec --no-startup-id $Locker && systemctl suspend, mode "default" + bindsym h exec --no-startup-id $Locker && systemctl hibernate, mode "default" + bindsym r exec --no-startup-id systemctl reboot, mode "default" + bindsym Shift+s exec --no-startup-id systemctl poweroff -i, mode "default" + + # back to normal: Enter or Escape + bindsym Return mode "default" + bindsym Escape mode "default" +} + +bindsym $mod+Shift+s mode "$mode_system" + +# Use pactl to adjust volume in PulseAudio. +set $refresh_i3status killall -SIGUSR1 i3status +bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status +bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status +bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status +bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status + +# Use Mouse+$mod to drag floating windows to their wanted position +floating_modifier $mod + +# start a terminal +bindsym $mod+Return exec st +bindsym $mod+Shift+Return exec firefox-developer-edition + +# kill focused window +bindsym $mod+Shift+q kill + +# start dmenu (a program launcher) +#bindsym $mod+space exec --no-startup-id i3-dmenu-desktop +# A more modern dmenu replacement is rofi: +bindsym $mod+space exec "rofi -modi drun,run -show drun -show-icons" +# There also is i3-dmenu-desktop which only displays applications shipping a +# .desktop file. It is a wrapper around dmenu, so you need that installed. +# bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop + +# change focus +bindsym $mod+j focus left +bindsym $mod+k focus down +bindsym $mod+l focus up +bindsym $mod+semicolon focus right + +# alternatively, you can use the cursor keys: +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +# move focused window +bindsym $mod+Shift+j move left +bindsym $mod+Shift+k move down +bindsym $mod+Shift+l move up +bindsym $mod+Shift+semicolon move right + +# alternatively, you can use the cursor keys: +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right + +# split in horizontal orientation +bindsym $mod+h split h + +# split in vertical orientation +bindsym $mod+v split v + +# enter fullscreen mode for the focused container +bindsym $mod+f fullscreen toggle + + +# toggle tiling / floating +bindsym $mod+Shift+space floating toggle + +# change focus between tiling / floating windows +bindsym $mod+d focus mode_toggle + +# focus the parent container +bindsym $mod+a focus parent + +# focus the child container +#bindsym $mod+d focus child + +# Define names for default workspaces for which we configure key bindings later on. +# We use variables to avoid repeating the names in multiple places. +set $ws1 "1" +set $ws2 "2" +set $ws3 "3" +set $ws4 "4" +set $ws5 "5" +set $ws6 "6" +set $ws7 "7" +set $ws8 "8" +set $ws9 "9" +set $ws10 "10" + +# switch to workspace +bindsym $mod+1 workspace number $ws1 +bindsym $mod+2 workspace number $ws2 +bindsym $mod+3 workspace number $ws3 +bindsym $mod+4 workspace number $ws4 +bindsym $mod+5 workspace number $ws5 +bindsym $mod+6 workspace number $ws6 +bindsym $mod+7 workspace number $ws7 +bindsym $mod+8 workspace number $ws8 +bindsym $mod+9 workspace number $ws9 +bindsym $mod+0 workspace number $ws10 + +# move focused container to workspace +bindsym $mod+Shift+1 move container to workspace number $ws1 +bindsym $mod+Shift+2 move container to workspace number $ws2 +bindsym $mod+Shift+3 move container to workspace number $ws3 +bindsym $mod+Shift+4 move container to workspace number $ws4 +bindsym $mod+Shift+5 move container to workspace number $ws5 +bindsym $mod+Shift+6 move container to workspace number $ws6 +bindsym $mod+Shift+7 move container to workspace number $ws7 +bindsym $mod+Shift+8 move container to workspace number $ws8 +bindsym $mod+Shift+9 move container to workspace number $ws9 +bindsym $mod+Shift+0 move container to workspace number $ws10 + +# next/prev workspace +bindsym $mod+Control+Left exec ~/.config/i3/i3next.sh -1 +bindsym $mod+Control+Right exec ~/.config/i3/i3next.sh 1 + +# reload the configuration file +bindsym $mod+Shift+c reload +# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) +bindsym $mod+Shift+r restart +# exit i3 (logs you out of your X session) +bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'" + +# Gap config +gaps inner 5 + +# resize window (you can also use the mouse for that) +mode "resize" { + # These bindings trigger as soon as you enter the resize mode + + # Pressing left will shrink the window’s width. + # Pressing right will grow the window’s width. + # Pressing up will shrink the window’s height. + # Pressing down will grow the window’s height. + bindsym j resize shrink width 10 px or 10 ppt + bindsym k resize grow height 10 px or 10 ppt + bindsym l resize shrink height 10 px or 10 ppt + bindsym semicolon resize grow width 10 px or 10 ppt + + # same bindings, but for the arrow keys + bindsym Left resize shrink width 10 px or 10 ppt + bindsym Down resize grow height 10 px or 10 ppt + bindsym Up resize shrink height 10 px or 10 ppt + bindsym Right resize grow width 10 px or 10 ppt + + # back to normal: Enter or Escape or $mod+r + bindsym Return mode "default" + bindsym Escape mode "default" + bindsym $mod+r mode "default" +} + +bindsym $mod+r mode "resize" + +# class border background text indicator child_border +client.focused #81a1c1 #285577 #ffffff #81a1c1 #81a1c1 +client.focused_inactive #4c566a #5f676a #ffffff #4c566a #4c566a +client.unfocused #4c566a #222222 #888888 #4c566a #4c566a +client.urgent #81a1c1 #900000 #ffffff #900000 #81a1c1 +client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c + +# Start i3bar to display a workspace bar (plus the system information i3status +# finds out, if available) +#bar { +# status_command i3status +# colors { +# background #1F2D3A +# statusline #FFFFFF +# } +#} + +exec_always --no-startup-id $HOME/.config/polybar/launch.sh dark diff --git a/.config/i3/i3next.sh b/.config/i3/i3next.sh new file mode 100755 index 0000000..177c15b --- /dev/null +++ b/.config/i3/i3next.sh @@ -0,0 +1,2 @@ +wsNext=$(( $( i3-msg -t get_workspaces | jq '.[] | select(.focused).num' ) + $1)) +i3-msg workspace $wsNext diff --git a/.config/i3status/config b/.config/i3status/config new file mode 100644 index 0000000..d373a30 --- /dev/null +++ b/.config/i3status/config @@ -0,0 +1,55 @@ +# i3status configuration file. +# see "man i3status" for documentation. + +# It is important that this file is edited as UTF-8. +# The following line should contain a sharp s: +# ß +# If the above line is not correctly displayed, fix your editor first! + +general { + colors = true + interval = 5 +} + +order += "wireless _first_" +order += "ethernet _first_" +order += "battery all" +order += "volume master" +order += "tztime local" + +wireless _first_ { + format_up = "W: (%quality at %essid) %ip" + format_down = "W: down" +} + +ethernet _first_ { + format_up = "E: %ip (%speed)" + format_down = "E: down" +} + +battery all { + format = "%status %percentage %remaining" +} + +disk "/" { + format = "%avail" +} + +load { + format = "%1min" +} + +memory { + format = "%used | %available" + threshold_degraded = "1G" + format_degraded = "MEMORY < %available" +} + +tztime local { + format = "%Y-%m-%d %I:%M:%S" +} + +volume master { + format = "V: %volume" + format_muted = "V: muted (%volume)" +} diff --git a/.config/polybar/.gitignore b/.config/polybar/.gitignore new file mode 100644 index 0000000..62d8815 --- /dev/null +++ b/.config/polybar/.gitignore @@ -0,0 +1 @@ +scripts/poem.txt diff --git a/.config/polybar/README.md b/.config/polybar/README.md new file mode 100644 index 0000000..54bb3d6 --- /dev/null +++ b/.config/polybar/README.md @@ -0,0 +1,271 @@ +# Polybar Nord + +> Collection of Polybar theme and module. + +The theme and module collection for [Polybar](https://github.com/polybar/polybar) based on [Nord](https://www.nordtheme.com/) colors. This theme provides two bar setups, each of them has light and dark variants. Besides the official modules, there are also scripts from [polybar-scripts](https://github.com/polybar/polybar-scripts) and myself which are configured to suit the theme. + +![i3-nord-dark.png](https://github.com/Yucklys/polybar-nord-theme/raw/master/polybar-nord.png) + + + +## Table of Contents + +- [Install](#install) +- [Usage](#usage) +- [File Structure](#file-structure) +- [Module Details](#module-details) + +## Install + +### Dependency + +Required dependency: + +1. [Font Awesome](https://www.archlinux.org/packages/community/any/ttf-font-awesome/) + +Optional dependency: + +1. [Weather Icon](https://github.com/erikflowers/weather-icons) (required by `weather` module) +2. Dunst (required by `notify` module) +3. redshift (required by `backlight` module) +4. clash (required by `clash-widget` module) +5. [onedrive](https://github.com/skilion/onedrive) (required by `onedrive-widget` module) +6. [clipmenu](https://github.com/cdown/clipmenu/) (required by `clipmenu-widget` module) +7. [nord-oneline](https://github.com/lr-tech/rofi-themes-collection) (required by `rofi-run` module) + +### Install by `git clone` (recommand) + +```shell +git clone https://github.com/Yucklys/polybar-nord-theme ~/.config/polybar/ +``` + +`~/.config/polybar` is the default path for polybar configuration, if you want to use other location, change `~/.config/polybar` to your location and also change the location specified in the `launch.sh` file. + +## Usage + +1. Enter the installation directory `cd ~/.config/polybar`. +2. Run `./launch.sh light` for light theme, and `./launch.sh dark` for dark theme. +3. For customization, most of the options are listed in `nord-config` file. For more details, check [File Structure](#File Structure) part. +4. `pkill polybar` to kill the bars. + +## File Structure + +### `dark-colors` and `light-colors` + +The color for dark and light theme. You don't need to edit these flies unless you want to change the color globally. + +### `dark-config` and `light-config` + +The configuration for dark and light theme. Most of the settings are covered by `nord-config` except font settings. You can change the font setting in these files. + +### `nord-config` + +The global configuration. You can customize the position of the bars, DPI setting, modules, etc. The detailed help messages are in the comment for each option. + +### `nord-top` and `nord-down` + +The modules for top and bottom bar setup. For some specific modules you need to edit these files. For more details of these modules check [Module Details](#Module Details). + +### `scripts` + +The directory contains all the scripts and files that required by the modules. + +## Module Details + +1. [alsa](#alsa) +2. [backlight](#backlight) +3. [date](#date) +4. [notify (基于dunst)](#notify) +5. [network-detail](#network-detail) +6. [network-short](#network-short) +7. [battery](#battery) +8. [keyboard](#keyboard) +10. [mpd](#mpd) +11. [i3](#i3) +11. [bspwm](#bspwm) +12. [workspace-name](#workspace-name) +13. [title](#title) +14. [weather](#weather) +15. [info-hackspeed](#info-hackspeed) +16. [github](#github) +17. [daily-poem](#daily-poem) +18. [temperature](temperature) +19. [memory](#memory) +20. [cpu](#cpu) +21. [show-desktop](#show-desktop) +22. [powermenu](#powermenu) +23. [clash-widget](#clash-widget) +24. [onedrive-widget](#onedrive-widget) +25. [clipmenu-widget](#clipmenu-widget) +26. [rofi-run](#rofi-run) + +### alsa + +Display current volume. The default sound card is `default`, you can change this option in `nord-config`. + +| Bind | Event | +| ---------------- | -------------------- | +| mouse left click | toggle mute | +| scroll up | volume + 5% for each | +| scroll down | volume - 5% for each | + +### backlight + +Display current lightness of screen. + +| Bind | Event | +| ---------------- | ----------------------- | +| scroll up | lightness + 5% for each | +| scroll down | lightness - 5% for each | +| mouse left click | toggle redshift | + +### date + +Display date and time. + +| Bind | Event | +| ---------------- | ------------------------------- | +| mouse left click | switch between date/time format | + +### notify + +Notify icon. + +| Bind | Event | +| -------- | ------------------------------------------------------------ | +| mouse left click | key event `ctrl+grave`, the default hotkey for dunst history notify | + +### network-detail + +Display upload and download speed in KB/s. Need to set your network interface at `nord-config.interface`. + +### network-short + +Display network connection icon. By defailt left click on the icon will call `networkmanager-dmenu`. For more details of this you can check [networkmanager-dmenu](https://github.com/firecat53/networkmanager-dmenu). + +| Bind | Event | +|:---------|:---------------------| +| mouse left click | networkmanager-dmenu | + + +### battery + +Display battery infomation. Requires to set `nord-config.battery-full-at`, `nord-config.battery-bat` and `nord-config.battery-adp`. + +### keyboard + +Display keyboard CapsLock indicator. + +### mpd + +Display mpd information. It is hidden when mpd process does not running. There are three layout corresponding to **play**, **pause** and **stop**. + +- Display full content when in play status, including *pause*, *prev*, *artist - song*, *next*, *stop*, *progress bar*, *cycle* and *random*. +- Display part of the content when in pause status, including *play*, *prev*, *artist - song*, *next*, *stop*. +- Display *play* only in stop status. + +Requires `nord-config.mpd-host` and `nord-config.mpd-port`. + +### i3 + +Display i3 workspace icon. Icon list can be customized in `nord-top`. + +| Bind | Event | +| -------- | ------------------------ | +| mouse left click | i3-msg workspace | +| scroll up | i3-msg workspace prev | +| scroll down | i3-msg workspace next | + +### bspwm + +Display bspwm workspace icon. + +### workspace-name + +Display the name of current workspace which is defined in the configuration of i3. The format should be `index:identifier`, for example `1:Home`. + +### title + +Display the title of current active window. + +### weather + +Display weather information from Openweather with scripts [polybar/polybar-scripts/openweather-fullfeatured](https://github.com/polybar/polybar-scripts/tree/master/polybar-scripts/openweathermap-fullfeatured). Personal API and city code is required. For more detailed usage check the project's README. + +### info-hackspeed + +Display the speed of inputting in cpm(char per minute) or wpm (word per minute). The script comes from [polybar/polybar-scripts/info-hackspeed](https://github.com/polybar/polybar-scripts/tree/master/polybar-scripts/info-hackspeed). + +### daily-poem + +Display Chese poem. The API is from [今日诗词 API](https://www.jinrishici.com/). Before usage you need to get your token from https://v2.jinrishici.com/token and replace mine in `nord-dowm`. + +| content | index | +| ---- | ----- | +| 日落,风 | 2 | +| 唐代·李白 宫中行乐词八首 | 1 | +| 烟花宜落日,丝管醉春风 | 0 (initial value) | + +| Bind | Event | +| -------- | ------------ | +| scroll up | index += 1 | +| scroll down | index -= 1 | +| mouse left double click | update poem and reset index | + +### temperature + +Display internal temperature. You can specify the thermal-zone in `nord-config.thermal-zone`, the default value is 0. When the temperature is lower than `nord-config.base-temperature` it will switch to lowest temperature layout; when the temperature is higher than `nord-config.warn-temperature` is will switch to warning temperature layout. The color of icon will change between `base-temperature` and `warn-temperature`, so set the proper values for your environment. + +### memory + +Display memory usage in the format used/total. + +### cpu + +Display CPU usage. + +### show-desktop + +Display desktop. By default it will switch to `25:Desktop`. You can customize this in `nord-down`. + +| Bind | Event | +| -------- | --------------------------- | +| mouse left click | i3-msg workspace 25:Desktop | + +### powermenu + +List of power options, `shutdown`, `reboot` and `logout`. + +### clash-widget + +Require clash service. You can write by yourself or use mine in `systemd/clash.service`. + +| Bind | Event | +| ----------------- | -------------- | +| mouse left click | toggle service | +| mouse right click | update status | + +### onedrive-widget + +Require [onedrive](https://github.com/skilion/onedrive). + +| Bind | Event | +| ----------------- | -------------- | +| mouse left click | toggle service | +| mouse right click | update status | + +### clipmenu-widget + +Require [clipmenu](https://github.com/cdown/clipmenu/). + +| Bind | Event | +| ----------------- | -------------- | +| mouse left click | trigger menu | +| double left click | toggle service | +| mouse right click | update status | + +### nord-oneline + +One-line style program runner. It will cover the top panel by left click the icon. + +![rofi-run](https://github.com/Yucklys/polybar-nord-theme/raw/master/screenshots/rofi-run.png) diff --git a/.config/polybar/dark-colors b/.config/polybar/dark-colors new file mode 100644 index 0000000..990923d --- /dev/null +++ b/.config/polybar/dark-colors @@ -0,0 +1,15 @@ +; vim:ft=dosini + +[colors] +background = #2E3440 +buffer = #4c566a +foreground = #D8DEE9 +nord6 = #ECEFF4 +nord7 = #8FBCBB +nord8 = #88C0D0 +nord9 = #81A1C1 +urgent = #BF616A +warning = #D08770 +notify = #EBCB8B +success = #A3BE8C +function = #B48EAD diff --git a/.config/polybar/dark-config b/.config/polybar/dark-config new file mode 100644 index 0000000..6ec4934 --- /dev/null +++ b/.config/polybar/dark-config @@ -0,0 +1,72 @@ +; vim:ft=dosini +[global-wm] +include-file = $HOME/.config/polybar/dark-colors +include-file = $HOME/.config/polybar/nord-top +include-file = $HOME/.config/polybar/nord-down +include-file = $HOME/.config/polybar/nord-config + +[bar/base] +theme = dark +monitor = ${config.monitor} +width = ${config.width} +height = ${config.height} +offset-x = ${config.offset-x} +offset-y = ${config.offset-y} +radius = ${config.radius} + +fixed-center = ${config.fixed-center} +dpi = ${config.dpi} + +background = ${colors.background} +foreground = ${colors.foreground} + +line-size = ${config.line-size} + +padding = 0 +override-redirect = ${config.override-redirect} +wm-restack = ${config.wm-restack} + +tray-padding = 3 +tray-detached = false +tray-maxsize = 22 + +cursor-click = pointer +cursor-scroll = ns-resize + +enable-ipc = true + +[bar/nord-top] +inherit = bar/base + +module-margin = 1 + +font-0 = WenQuanYiMicroHei:size=12 +font-1 = FontAwesome5FreeSolid:pixelsize=12;1 +font-2 = FontAwesome5FreeRegular:pixelsize=12;1 +font-3 = FontAwesome5Brands:pixelsize=8;1 +font-4 = FiraCodeRegular:pixelsize=12 + +modules-left = ${config.top-left} +modules-center = ${config.top-center} +modules-right = ${config.top-right} + +tray-position = ${config.systray-top} + +[bar/nord-down] +inherit = bar/base + +bottom = true + +module-margin = 2 + +font-0 = WenQuanYiMicroHei:size=12 +font-1 = FontAwesome5FreeSolid:pixelsize=12;1 +font-2 = FontAwesome5Brands:pixelsize=8;1 +font-3 = Weather Icons:style=Regular:size=12;1 +font-4 = FiraCodeRegular:pixelsize=12 + +modules-left = ${config.bottom-left} +modules-center = ${config.bottom-center} +modules-right = ${config.bottom-right} + +tray-position = ${config.systray-bottom} diff --git a/.config/polybar/launch.sh b/.config/polybar/launch.sh new file mode 100755 index 0000000..a8c5980 --- /dev/null +++ b/.config/polybar/launch.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +# Terminate already running bar instances +killall -q polybar + +# Wait until the processes have been shut down +while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done + +# Launch bar1 and bar2 +if [ "$1" == "light" ] +then + polybar -c $HOME/.config/polybar/light-config nord-top & + polybar -c $HOME/.config/polybar/light-config nord-down & +else + polybar -c $HOME/.config/polybar/dark-config nord-top & + polybar -c $HOME/.config/polybar/dark-config nord-down & +fi + +echo "Bars launched..." diff --git a/.config/polybar/light-colors b/.config/polybar/light-colors new file mode 100644 index 0000000..f42a297 --- /dev/null +++ b/.config/polybar/light-colors @@ -0,0 +1,15 @@ +; vim:ft=dosini + +[colors] +background = #D8DEE9 +buffer = #3B4252 +foreground = #2E3440 +nord6 = #ECEFF4 +nord7 = #8FBCBB +nord8 = #88C0D0 +nord9 = #81A1C1 +urgent = #BF616A +warning = #D08770 +notify = #EBCB8B +success = #A3BE8C +function = #B48EAD diff --git a/.config/polybar/light-config b/.config/polybar/light-config new file mode 100644 index 0000000..04bed50 --- /dev/null +++ b/.config/polybar/light-config @@ -0,0 +1,73 @@ +; vim:ft=dosini +[global-wm] +include-file = $HOME/.config/polybar/light-colors +include-file = $HOME/.config/polybar/nord-top +include-file = $HOME/.config/polybar/nord-down +include-file = $HOME/.config/polybar/nord-config + +[bar/base] +theme = light +monitor = ${config.monitor} +width = ${config.width} +height = ${config.height} +offset-x = ${config.offset-x} +offset-y = ${config.offset-y} +radius = ${config.radius} + +fixed-center = ${config.fixed-center} +dpi = ${config.dpi} + +background = ${colors.background} +foreground = ${colors.foreground} + +line-size = ${config.line-size} + +padding = 0 +override-redirect = ${config.override-redirect} +wm-restack = ${config.wm-restack} + +tray-padding = 3 +tray-detached = false +tray-maxsize = 22 + +cursor-click = pointer +cursor-scroll = ns-resize + +enable-ipc = true + +[bar/nord-top] +inherit = bar/base +module-margin = 1 + +font-0 = FiraCodeRegular:pixelsize=12 +font-1 = FontAwesome5FreeSolid:pixelsize=12;1 +font-2 = FontAwesome5FreeRegular:pixelsize=12;1 +font-3 = FontAwesome5Brands:pixelsize=8;1 +font-4 = WenQuanYiMicroHei:size=12 + +modules-left = ${config.top-left} +modules-center = ${config.top-center} +modules-right = ${config.top-right} + +tray-position = ${config.systray-top} + +[bar/nord-down] +inherit = bar/base +bottom = true + +padding = 2 +module-margin = 2 + +font-0 = FiraCodeRegular:pixelsize=12 +font-1 = FontAwesome5FreeSolid:pixelsize=12;1 +font-2 = FontAwesome5FreeRegular:pixelsize=12;1 +font-3 = FontAwesome5Brands:pixelsize=8;1 +font-4 = Weather Icons:style=Regular:size=12;1 +font-5 = WenQuanYiMicroHei:size=12 + +modules-left = ${config.bottom-left} +modules-center = ${config.bottom-center} +modules-right = ${config.bottom-right} + +tray-position = ${config.systray-bottom} + diff --git a/.config/polybar/nord-config b/.config/polybar/nord-config new file mode 100644 index 0000000..1cc2676 --- /dev/null +++ b/.config/polybar/nord-config @@ -0,0 +1,105 @@ +;vim:ft=dosini + +[config] +# DPI value for HiDPI screen +dpi = 82 +monitor = ${env:MONITOR:eDP1} + +# bar position, apply globally +width = 100% +height = 3% +offset-x = 0 +offset-y = 0 +radius = 0.0 + +fixed-center = true +override-redirect = false +wm-restack = bspwm + +# module list: +# alsa: Display current volume +# backlight: Display screen brightness +# date: Display date +# notify: Notify icon, can customize its binding +# network-short: Network connect icon, can customize its binding +# battery: Battery info +# keyboard: CapsLock indicator +# mpd: mpd status and controls +# i3: i3 workspace icons +# bspwm: bspwm workspace icons +# workspace-name: i3 current workspace name, need to be in the format like "1:Home" +# title: title of the active window +# network-detail: Download and upload speed +# weather: Display openweather info +# powermenu: menu to control system power +# info-hackspeed: Numper of characters clicked per minute +# daily-poem: Display poem +# temperature: Display internal temperature +# memory: Display memory usage +# cpu: Display cpu usage +# show-desktop: Display desktop (i3 only) +# clash-widget: showing clash service +# onedrive-widget: showing onedrive service +# clipmenu-widget: showing clipmenu service + +# Top modules +bottom-left = rofi-run title cpu memory temperature +bottom-center = i3 +bottom-right = alsa network-detail battery date + + +systray-top = none +systray-bottom = right + +# global style +line-size = 6 + +# Modules configure option +# the default value in this section should work in most cases, +# if some of them doesn't suit your environment, you can change +# it from here. +# network interface, check by `ip link show` +interface = wlp1s0 + +# when the current battery capacity excess this value, +# the full-capacity format will be displayed. +battery-full-at = 95 + +# battery and adapter +battery-bat = BAT0 +battery-adp = AC + +# soundcard setting +master-soundcard = default +speaker-soundcard = default +headphone-soundcard = default +master-mixer = Master + +# mpd service connection setting +mpd-host = 127.0.0.1 +mpd-port = 6600 + +thermal-zone = 3 +# Base temperature for where to start the ramp (in degrees celsius) +base-temperature = 20 +# Threshold temperature to display warning label (in degrees celsius) +warn-temperature = 70 + +# GitHub personal token, generate from https://github.com/settings/tokens/new?scopes=notifications&description=Notifier+for+Polybar +# where select at least `notifications` option +github-token = 00ed987a6d7efd532c5b4ca0849c2803228d1b5d + +# notify module setting +notify-click-left = xdotool key control+grave + +# network module setting +network-click-left = i3-msg workspace 2 + +# i3 +# Only show workspaces defined on the same output as the bar +# +# Useful if you want to show monitor specific workspaces +# on different bars +# +# Default: false +i3-pin-workspaces = false diff --git a/.config/polybar/nord-down b/.config/polybar/nord-down new file mode 100644 index 0000000..04806bf --- /dev/null +++ b/.config/polybar/nord-down @@ -0,0 +1,149 @@ +; vim:ft=dosini +[module/powermenu] +type = custom/menu + +expand-right = true + +label-open =  +label-open-foreground = ${colors.background} +label-open-background = ${colors.nord9} +label-open-padding = 3 +label-close =  +label-close-foreground = ${colors.background} +label-close-background = ${colors.nord9} +label-close-padding = 4 + +menu-0-0 =  +menu-0-0-foreground = ${colors.urgent} +menu-0-0-padding = 2 +menu-0-0-exec = shutdown +menu-0-1 =  +menu-0-1-foreground = ${colors.warning} +menu-0-1-padding = 2 +menu-0-1-exec = reboot +menu-0-2 =  +menu-0-2-foreground = ${colors.warning} +menu-0-2-padding = 2 +menu-0-2-exec = systemctl suspend + +[module/cpu] +type = internal/cpu +interval = 1 + +format =