mirror of
https://github.com/sahinakkaya/dotfiles.git
synced 2024-12-23 15:49:40 +01:00
Switch to i3
This commit is contained in:
parent
aafe749ced
commit
bf6eb6b13a
235
.config/i3/config
Normal file
235
.config/i3/config
Normal file
@ -0,0 +1,235 @@
|
|||||||
|
# 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 Mod1
|
||||||
|
|
||||||
|
# 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 --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
|
||||||
|
|
||||||
|
# custom settings
|
||||||
|
exec_always --no-startup-id pkill picom; picom --no-use-damage
|
||||||
|
exec_always --no-startup-id pkill dunst; dunst
|
||||||
|
|
||||||
|
|
||||||
|
exec_always --no-startup-id xrdb ~/.Xresources
|
||||||
|
exec_always --no-startup-id ~/.config/polybar/launch.sh
|
||||||
|
# exec_always --no-startup-id $HOME/.config/polybar/launch.sh
|
||||||
|
#
|
||||||
|
#
|
||||||
|
|
||||||
|
# Set common scripts to vars
|
||||||
|
set $rofi ~/scripts/rofi/launch.sh
|
||||||
|
set $music ~/scripts/music/mpv-controller.sh
|
||||||
|
|
||||||
|
# Turn borders off
|
||||||
|
for_window [class="^.*"] border pixel 2
|
||||||
|
client.focused #555555 #555555 #ffffff #2e9ef4 #CC0000
|
||||||
|
|
||||||
|
# Change gap size
|
||||||
|
gaps outer 0
|
||||||
|
gaps inner 0
|
||||||
|
gaps top 20
|
||||||
|
|
||||||
|
# kill focused window
|
||||||
|
bindsym $mod+q kill
|
||||||
|
|
||||||
|
# Start rofi with appmenu and tabmenu
|
||||||
|
bindsym $mod+space layout toggle split
|
||||||
|
bindsym $mod+d exec $rofi appmenu
|
||||||
|
bindsym $mod+Tab workspace back_and_forth
|
||||||
|
bindsym $mod+Shift+e exec $rofi powermenu
|
||||||
|
|
||||||
|
|
||||||
|
# Set up screenshots and partial screenshots
|
||||||
|
bindsym --release Print exec maim ~/images/scrots/`date +%Y-%m-%d_%H:%M:%S`.png
|
||||||
|
bindsym --release Shift+Print exec maim -s ~/images/scrots/`date +%Y-%m-%d_%H:%M:%S`.png
|
||||||
|
|
||||||
|
|
||||||
|
# Bind brightness keys to light interface
|
||||||
|
bindsym XF86MonBrightnessUp exec light -A 5
|
||||||
|
bindsym XF86MonBrightnessDown exec light -U 5
|
||||||
|
|
||||||
|
# Drag floating windows
|
||||||
|
floating_modifier $mod
|
||||||
|
|
||||||
|
# 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@ +5% && $refresh_i3status
|
||||||
|
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5% && $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 i3-sensible-terminal
|
||||||
|
|
||||||
|
# kill focused window
|
||||||
|
# bindsym $mod+Shift+q kill
|
||||||
|
|
||||||
|
# start dmenu (a program launcher)
|
||||||
|
# bindsym $mod+d exec dmenu_run
|
||||||
|
# There also is the (new) i3-dmenu-desktop which only displays applications
|
||||||
|
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
|
||||||
|
# installed.
|
||||||
|
# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
|
||||||
|
|
||||||
|
# change focus
|
||||||
|
bindsym $mod+h focus left
|
||||||
|
bindsym $mod+j focus down
|
||||||
|
bindsym $mod+k focus up
|
||||||
|
bindsym $mod+l 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+h move left
|
||||||
|
bindsym $mod+Shift+j move down
|
||||||
|
bindsym $mod+Shift+k move up
|
||||||
|
bindsym $mod+Shift+l 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+backslash split h
|
||||||
|
|
||||||
|
# split in vertical orientation
|
||||||
|
bindsym $mod+minus split v
|
||||||
|
|
||||||
|
# enter fullscreen mode for the focused container
|
||||||
|
bindsym $mod+f fullscreen toggle
|
||||||
|
|
||||||
|
# change container layout (stacked, tabbed, toggle split)
|
||||||
|
bindsym $mod+s layout stacking
|
||||||
|
bindsym $mod+w layout tabbed
|
||||||
|
bindsym $mod+e layout toggle split
|
||||||
|
|
||||||
|
# toggle tiling / floating
|
||||||
|
bindsym $mod+Shift+space floating toggle
|
||||||
|
|
||||||
|
# change focus between tiling / floating windows
|
||||||
|
bindsym $mod+Control+space 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"
|
||||||
|
|
||||||
|
assign [class="Discord"] $ws9
|
||||||
|
|
||||||
|
# Bind keys to switch to next workspace
|
||||||
|
bindsym $mod+n workspace next
|
||||||
|
bindsym $mod+p workspace prev
|
||||||
|
bindsym $mod+bracketleft workspace back_and_forth
|
||||||
|
# bindsym $mod+bracketright workspace back_and_forth
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
# 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'"
|
||||||
|
|
||||||
|
# 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 h resize shrink width 10 px or 10 ppt
|
||||||
|
bindsym j resize grow height 10 px or 10 ppt
|
||||||
|
bindsym k resize shrink height 10 px or 10 ppt
|
||||||
|
bindsym l 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"
|
||||||
|
|
||||||
|
# Start i3bar to display a workspace bar (plus the system information i3status
|
||||||
|
# finds out, if available)
|
||||||
|
# bar {
|
||||||
|
# status_command i3status
|
||||||
|
# }
|
41
.config/picom/picom.conf
Normal file
41
.config/picom/picom.conf
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
backend = "glx";
|
||||||
|
|
||||||
|
opacity-rule = [ ];
|
||||||
|
|
||||||
|
|
||||||
|
corner-radius = 6.0;
|
||||||
|
rounded-corners-exclude = [
|
||||||
|
# "widthb > 1365 && heightb > 736" # For smart gaps and a non-floating bar
|
||||||
|
# "class_g = 'Dunst'"
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
# Add dual-kawase blur
|
||||||
|
blur-background = true;
|
||||||
|
blur-background-frame = true;
|
||||||
|
blur-background-fixed = true;
|
||||||
|
blur-kern = "3x3box";
|
||||||
|
blur-method = "dual_kawase";
|
||||||
|
blur-strength = 16;
|
||||||
|
blur-background-exclude = [
|
||||||
|
"class_g = 'slop'",
|
||||||
|
"class_g = 'XAVA'",
|
||||||
|
"class_g = 'lattedock'",
|
||||||
|
"class_g = 'latte-dock'"
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
shadow = true;
|
||||||
|
shadow-radius = 12;
|
||||||
|
shadow-opacity = 0.25;
|
||||||
|
shadow-offset-x = -7;
|
||||||
|
shadow-offset-y = -7;
|
||||||
|
shadow-exclude = [
|
||||||
|
"class_g = 'XAVA'"
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
fading = true;
|
||||||
|
fade-in-step = 0.16;
|
||||||
|
fade-out-step = 0.16;
|
||||||
|
fade-exclude = [ ];
|
389
.config/polybar/config
Normal file
389
.config/polybar/config
Normal file
@ -0,0 +1,389 @@
|
|||||||
|
;==========================================================
|
||||||
|
;
|
||||||
|
;
|
||||||
|
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
|
||||||
|
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
|
||||||
|
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
|
||||||
|
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
|
||||||
|
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
|
||||||
|
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
|
||||||
|
;
|
||||||
|
;
|
||||||
|
; To learn more about how to configure Polybar
|
||||||
|
; go to https://github.com/polybar/polybar
|
||||||
|
;
|
||||||
|
; The README contains a lot of information
|
||||||
|
;
|
||||||
|
;==========================================================
|
||||||
|
;
|
||||||
|
; 並 全 侀 冀 勇 勺 喝 啕 喙 嗢 塚 墳 奄 奔 婢 嬨 廒 廙 彩 徭 惘 慎 愈 憎 慠 懲 戴 揄 搜 摒 敖 晴 朗 望 杖 歹 殺 流 滛 滋 漢 瀞 煮 瞧 爵 犯 猪 瑱 甆 画 瘝 瘟 益 盛 直 睊 着 磌 窱 節 类 絛 練 缾 者 荒 華 蝹 襁 覆 視 調 諸 請 謁 諾 諭 謹 變 贈 輸 遲 醙 鉶 陼 難 靖 韛 響 頋 頻 鬒 龜 𢡊 𢡄 𣏕 㮝 䀘 䀹 𥉉 𥳐 𧻓 齃 龎
|
||||||
|
[colors]
|
||||||
|
background = #fa1e2137
|
||||||
|
foreground = #e3eaf3
|
||||||
|
primary = #02c084
|
||||||
|
secondary = #65a2d9
|
||||||
|
tertiary = #d07ef2
|
||||||
|
fourth = #e5c246
|
||||||
|
alert = #ed404c
|
||||||
|
|
||||||
|
[colors-andromeda]
|
||||||
|
background = #282A3A
|
||||||
|
background-alt = #3a3e4e
|
||||||
|
foreground = #e1e3e4
|
||||||
|
foreground-alt = #7e8294
|
||||||
|
primary = #f0c362
|
||||||
|
secondary = #bb97ee
|
||||||
|
alert = #fb617e
|
||||||
|
red = #fb617e
|
||||||
|
green = #9ed06c
|
||||||
|
yellow = #f0c362
|
||||||
|
blue = #6dcae8
|
||||||
|
magenta = #bb97ee
|
||||||
|
cyan = #f89860
|
||||||
|
gray = #7e8294
|
||||||
|
black = #181a1c
|
||||||
|
|
||||||
|
[bar/main]
|
||||||
|
width = 100%
|
||||||
|
offset-x = 0
|
||||||
|
offset-y = 0
|
||||||
|
|
||||||
|
height = 20
|
||||||
|
radius = 0.0
|
||||||
|
|
||||||
|
override-redirect = true
|
||||||
|
wm-restack = i3
|
||||||
|
|
||||||
|
background = #1E222A
|
||||||
|
foreground = ${colors.foreground}
|
||||||
|
|
||||||
|
padding-left = 1
|
||||||
|
padding-right = 1
|
||||||
|
module-margin-left = 1
|
||||||
|
module-margin-right = 2
|
||||||
|
|
||||||
|
font-0 = Hack Nerd Font:pixelsize=11:antialias=true;2.5
|
||||||
|
font-1 = Hack Nerd Font:style=Regular:pixelsize=17:antialias=true;3
|
||||||
|
|
||||||
|
modules-left = i3 cpu temperaturecpu memory
|
||||||
|
modules-center = xwindow
|
||||||
|
modules-right = audio backlight wlan wired-network battery date powermenu
|
||||||
|
|
||||||
|
cursor-click = pointer
|
||||||
|
cursor-scroll = ns-resize
|
||||||
|
|
||||||
|
tray-position = right
|
||||||
|
tray-padding = 0
|
||||||
|
;tray-background = #0063ff
|
||||||
|
|
||||||
|
|
||||||
|
[module/xwindow]
|
||||||
|
type = internal/xwindow
|
||||||
|
label = %title%
|
||||||
|
|
||||||
|
|
||||||
|
[module/filesystem]
|
||||||
|
type = internal/fs
|
||||||
|
interval = 25111
|
||||||
|
mount-0 = /
|
||||||
|
label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %percentage_used%%
|
||||||
|
label-unmounted = %mountpoint% not mounted
|
||||||
|
label-unmounted-foreground = ${colors.foreground}
|
||||||
|
|
||||||
|
|
||||||
|
[module/i3]
|
||||||
|
type = internal/i3
|
||||||
|
pin-workspaces = false
|
||||||
|
strip-wsnumbers = true
|
||||||
|
index-sort = true
|
||||||
|
enable-click = true
|
||||||
|
enable-scroll = true
|
||||||
|
wrapping-scroll = false
|
||||||
|
reverse-scroll = false
|
||||||
|
fuzzy-match = true
|
||||||
|
; bigger icons
|
||||||
|
; ws-icon-0 = "0;%{T2}%{T-}"
|
||||||
|
; ws-icon-1 = "1;%{T2}%{T-}"
|
||||||
|
; ws-icon-2 = "2;%{T2}%{T-}"
|
||||||
|
; ws-icon-3 = "3;%{T2}%{T-}"
|
||||||
|
; ws-icon-4 = "4;%{T2}4%{T-}"
|
||||||
|
; ﲵ
|
||||||
|
ws-icon-default = ""
|
||||||
|
ws-icon-0 = "0;"
|
||||||
|
ws-icon-1 = "1;"
|
||||||
|
ws-icon-2 = "2;"
|
||||||
|
ws-icon-3 = "3;"
|
||||||
|
ws-icon-4 = "4;4"
|
||||||
|
ws-icon-5 = "5;5"
|
||||||
|
ws-icon-6 = "6;6"
|
||||||
|
ws-icon-7 = "7;7"
|
||||||
|
ws-icon-8 = "8;8"
|
||||||
|
ws-icon-9 = "9;ﭮ"
|
||||||
|
|
||||||
|
format = <label-state> <label-mode>
|
||||||
|
label-mode = %mode%
|
||||||
|
label-mode-padding = 2
|
||||||
|
label-mode-background = #e60053
|
||||||
|
|
||||||
|
label-focused = %icon%
|
||||||
|
label-focused-foreground = ${colors.fourth}
|
||||||
|
label-focused-background = #3a3e4e
|
||||||
|
label-focused-padding = 1
|
||||||
|
|
||||||
|
label-unfocused = ${self.label-focused}
|
||||||
|
label-unfocused-foreground = #0a7383
|
||||||
|
label-unfocused-padding = ${self.label-focused-padding}
|
||||||
|
|
||||||
|
label-visible = ${self.label-focused}
|
||||||
|
label-visible-foreground = #0a7383
|
||||||
|
label-visible-padding = ${self.label-focused-padding}
|
||||||
|
|
||||||
|
label-urgent = ${self.label-focused}
|
||||||
|
label-urgent-foreground = ${colors.alert}
|
||||||
|
label-urgent-padding = ${self.label-focused-padding}
|
||||||
|
|
||||||
|
|
||||||
|
[module/backlight]
|
||||||
|
type = internal/backlight
|
||||||
|
card = intel_backlight
|
||||||
|
|
||||||
|
format = <label>
|
||||||
|
label = " %percentage%%"
|
||||||
|
label-foreground = ${colors.tertiary}
|
||||||
|
|
||||||
|
[module/wlan]
|
||||||
|
type = internal/network
|
||||||
|
interface = wlan0
|
||||||
|
interval = 3.0
|
||||||
|
|
||||||
|
format-connected = <label-connected>
|
||||||
|
format-connected-underline = #9f78e1
|
||||||
|
; label-connected = "直"
|
||||||
|
label-connected = 直 %essid% %signal%%
|
||||||
|
label-connected-foreground = ${colors.primary}
|
||||||
|
|
||||||
|
format-disconnected = <label-disconnected>
|
||||||
|
format-disconnected-underline = ${self.format-connected-underline}
|
||||||
|
label-disconnected = 睊
|
||||||
|
label-disconnected-foreground = ${colors.alert}
|
||||||
|
|
||||||
|
; a = worst
|
||||||
|
ramp-signal-0 = a
|
||||||
|
ramp-signal-1 = b
|
||||||
|
ramp-signal-2 = c
|
||||||
|
ramp-signal-3 = d
|
||||||
|
ramp-signal-4 = e
|
||||||
|
[module/cpu]
|
||||||
|
type = internal/cpu
|
||||||
|
interval = 0.5
|
||||||
|
|
||||||
|
|
||||||
|
; format = <label> <ramp-coreload>
|
||||||
|
format = <label>
|
||||||
|
label = " %percentage%%"
|
||||||
|
format-prefix =
|
||||||
|
format-foreground = ${colors-andromeda.magenta}
|
||||||
|
format-padding = 0
|
||||||
|
ramp-coreload-spacing = 0
|
||||||
|
ramp-coreload-0 = ▁
|
||||||
|
ramp-coreload-1 = ▂
|
||||||
|
ramp-coreload-2 = ▃
|
||||||
|
ramp-coreload-3 = ▄
|
||||||
|
ramp-coreload-4 = ▅
|
||||||
|
ramp-coreload-5 = ▆
|
||||||
|
ramp-coreload-6 = ▇
|
||||||
|
ramp-coreload-7 = █
|
||||||
|
|
||||||
|
|
||||||
|
[module/temperaturecpu]
|
||||||
|
type = internal/temperature
|
||||||
|
interval = 1
|
||||||
|
thermal-zone = 0
|
||||||
|
|
||||||
|
hwmon-path = /sys/devices/platform/coretemp.0/hwmon/hwmon5/temp1_input
|
||||||
|
|
||||||
|
warn-temperature = 65
|
||||||
|
|
||||||
|
units = true
|
||||||
|
|
||||||
|
format = <ramp> <label>
|
||||||
|
; format-background = ${colors-andromeda.background}
|
||||||
|
format-foreground = ${colors.secondary}
|
||||||
|
format-overline = ${colors-andromeda.background}
|
||||||
|
format-underline = ${colors-andromeda.background}
|
||||||
|
; format-padding = 2
|
||||||
|
|
||||||
|
format-warn = <ramp> <label-warn>
|
||||||
|
; format-warn-background = ${colors-andromeda.background}
|
||||||
|
format-warn-foreground = ${colors-andromeda.red}
|
||||||
|
format-warn-overline = ${colors-andromeda.background}
|
||||||
|
format-warn-underline = ${colors-andromeda.background}
|
||||||
|
; format-warn-padding = 2
|
||||||
|
|
||||||
|
label = %temperature-c%
|
||||||
|
|
||||||
|
label-warn = "%temperature-c%"
|
||||||
|
|
||||||
|
; Requires the <ramp> tag
|
||||||
|
; The icon selection will range from 0 to `warn-temperature`
|
||||||
|
; with the current temperature as index.
|
||||||
|
ramp-0 =
|
||||||
|
ramp-1 =
|
||||||
|
ramp-2 =
|
||||||
|
ramp-3 =
|
||||||
|
ramp-4 =
|
||||||
|
|
||||||
|
|
||||||
|
[module/memory]
|
||||||
|
type = internal/memory
|
||||||
|
|
||||||
|
interval = 1
|
||||||
|
|
||||||
|
format = <label>
|
||||||
|
format-prefix =
|
||||||
|
; format-background = ${colors-andromeda.background}
|
||||||
|
format-foreground = ${colors.fourth}
|
||||||
|
format-padding = 1
|
||||||
|
|
||||||
|
|
||||||
|
label = " %percentage_used%%"
|
||||||
|
|
||||||
|
|
||||||
|
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
|
||||||
|
[module/wired-network]
|
||||||
|
type = internal/network
|
||||||
|
interface = eth0
|
||||||
|
|
||||||
|
format-connected-underline = #55aa55
|
||||||
|
; label-connected = %linkspeed%
|
||||||
|
label-connected =
|
||||||
|
label-connected-foreground = ${colors.primary}
|
||||||
|
|
||||||
|
[module/date]
|
||||||
|
type = internal/date
|
||||||
|
interval = 1
|
||||||
|
|
||||||
|
date = "%a %b %e,"
|
||||||
|
time = "%l:%M %p"
|
||||||
|
date-alt = "%d-%m-%Y"
|
||||||
|
time-alt = "%H:%M:%S"
|
||||||
|
|
||||||
|
format-prefix-foreground = ${colors.foreground}
|
||||||
|
format-underline = #0a6cf5
|
||||||
|
label = %date% %time%
|
||||||
|
|
||||||
|
[module/alsa]
|
||||||
|
type = internal/alsa
|
||||||
|
|
||||||
|
format-volume = <label-volume> <bar-volume>
|
||||||
|
label-volume = VOL
|
||||||
|
label-volume-foreground = ${root.foreground}
|
||||||
|
|
||||||
|
format-muted-prefix = " "
|
||||||
|
format-muted-foreground = ${colors.foreground-alt}
|
||||||
|
label-muted = sound muted
|
||||||
|
|
||||||
|
bar-volume-width = 10
|
||||||
|
bar-volume-foreground-0 = #55aa55
|
||||||
|
bar-volume-foreground-1 = #55aa55
|
||||||
|
bar-volume-foreground-2 = #55aa55
|
||||||
|
bar-volume-foreground-3 = #55aa55
|
||||||
|
bar-volume-foreground-4 = #55aa55
|
||||||
|
bar-volume-foreground-5 = #f5a70a
|
||||||
|
bar-volume-foreground-6 = #ff5555
|
||||||
|
bar-volume-gradient = false
|
||||||
|
bar-volume-indicator = |
|
||||||
|
bar-volume-indicator-font = 2
|
||||||
|
bar-volume-fill = ─
|
||||||
|
bar-volume-fill-font = 2
|
||||||
|
bar-volume-empty = ─
|
||||||
|
bar-volume-empty-font = 2
|
||||||
|
bar-volume-empty-foreground = ${colors.foreground-alt}
|
||||||
|
|
||||||
|
[module/audio]
|
||||||
|
type = internal/pulseaudio
|
||||||
|
|
||||||
|
format-volume = <ramp-volume> <label-volume>
|
||||||
|
label-volume-foreground = ${colors.secondary}
|
||||||
|
ramp-volume-foreground = ${colors.secondary}
|
||||||
|
interval = 5
|
||||||
|
label-volume = %percentage%%
|
||||||
|
|
||||||
|
ramp-volume-0 =
|
||||||
|
ramp-volume-1 =
|
||||||
|
ramp-volume-2 =
|
||||||
|
|
||||||
|
label-muted = ﱝ
|
||||||
|
label-muted-foreground = ${colors.secondary}
|
||||||
|
click-right = pavucontrol
|
||||||
|
|
||||||
|
|
||||||
|
[module/battery]
|
||||||
|
type = internal/battery
|
||||||
|
battery = BAT0
|
||||||
|
adapter = AC0
|
||||||
|
full-at = 98
|
||||||
|
|
||||||
|
format-charging = <animation-charging> <label-charging>
|
||||||
|
format-discharging = <ramp-capacity> <label-discharging>
|
||||||
|
label-charging = %percentage%%
|
||||||
|
label-discharging = %percentage%%
|
||||||
|
|
||||||
|
label-full =
|
||||||
|
label-full-foreground = ${colors.fourth}
|
||||||
|
|
||||||
|
|
||||||
|
ramp-capacity-0 =
|
||||||
|
ramp-capacity-0-foreground = #ff0000
|
||||||
|
ramp-capacity-1 =
|
||||||
|
ramp-capacity-1-foreground = #ff4000
|
||||||
|
ramp-capacity-2 =
|
||||||
|
ramp-capacity-2-foreground = #ff8000
|
||||||
|
ramp-capacity-3 =
|
||||||
|
ramp-capacity-3-foreground = #ffc000
|
||||||
|
ramp-capacity-4 =
|
||||||
|
ramp-capacity-4-foreground = #ffff00
|
||||||
|
ramp-capacity-5 =
|
||||||
|
ramp-capacity-5-foreground = #aaff00
|
||||||
|
ramp-capacity-6 =
|
||||||
|
ramp-capacity-6-foreground = #aaff00
|
||||||
|
ramp-capacity-7 =
|
||||||
|
ramp-capacity-7-foreground = #55ff00
|
||||||
|
ramp-capacity-8 =
|
||||||
|
ramp-capacity-8-foreground = #55ff00
|
||||||
|
ramp-capacity-9 =
|
||||||
|
ramp-capacity-9-foreground = #00ff00
|
||||||
|
ramp-capacity-foreground = ${colors.fourth}
|
||||||
|
|
||||||
|
animation-charging-0 =
|
||||||
|
animation-charging-1 =
|
||||||
|
animation-charging-2 =
|
||||||
|
animation-charging-3 =
|
||||||
|
animation-charging-4 =
|
||||||
|
animation-charging-5 =
|
||||||
|
animation-charging-6 =
|
||||||
|
|
||||||
|
animation-charging-foreground = ${colors.fourth}
|
||||||
|
|
||||||
|
label-discharging-foreground = ${colors.fourth}
|
||||||
|
label-charging-foreground = ${colors.fourth}
|
||||||
|
|
||||||
|
[module/powermenu]
|
||||||
|
type = custom/text
|
||||||
|
format-spacing = 1
|
||||||
|
content =
|
||||||
|
content-foreground = ${colors.alert}
|
||||||
|
click-left = bash ~/scripts/rofi/launch.sh powermenu
|
||||||
|
|
||||||
|
|
||||||
|
[settings]
|
||||||
|
screenchange-reload = true
|
||||||
|
;compositing-background = xor
|
||||||
|
;compositing-background = screen
|
||||||
|
;compositing-foreground = source
|
||||||
|
;compositing-border = over
|
||||||
|
;pseudo-transparency =true
|
||||||
|
|
||||||
|
[global/wm]
|
||||||
|
margin-bottom = 20
|
||||||
|
; vim:ft=dosini
|
4
.config/polybar/launch.sh
Executable file
4
.config/polybar/launch.sh
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
pkill polybar
|
||||||
|
polybar -r main &
|
10
.config/polybar/rofi/colors.rasi
Normal file
10
.config/polybar/rofi/colors.rasi
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
/* colors */
|
||||||
|
|
||||||
|
* {
|
||||||
|
al: #00000000;
|
||||||
|
bg: #282A3A;
|
||||||
|
bga: #3a3e4e;
|
||||||
|
fga: #e1e3e0;
|
||||||
|
fg: #e1e3e4;
|
||||||
|
ac: #7e8294;
|
||||||
|
}
|
20
.config/polybar/rofi/confirm.rasi
Normal file
20
.config/polybar/rofi/confirm.rasi
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
* {
|
||||||
|
background-color: #282A3A;
|
||||||
|
text-color: #7e8294;
|
||||||
|
font: "Segoe UI 10";
|
||||||
|
}
|
||||||
|
|
||||||
|
window {
|
||||||
|
width: 250px;
|
||||||
|
padding: 0px;
|
||||||
|
border: 0px 0px -1px 0px;
|
||||||
|
margin: 0px 50px;
|
||||||
|
location: north;
|
||||||
|
left: 50%;
|
||||||
|
margin-left:-50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
entry {
|
||||||
|
expand: true;
|
||||||
|
text-color: #7e8294;
|
||||||
|
}
|
123
.config/polybar/rofi/networkmenu.rasi
Normal file
123
.config/polybar/rofi/networkmenu.rasi
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
/*
|
||||||
|
*
|
||||||
|
* Author : Aditya Shakya
|
||||||
|
* Mail : adi1090x@gmail.com
|
||||||
|
* Github : @adi1090x
|
||||||
|
* Twitter : @adi1090x
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
configuration {
|
||||||
|
font: "Iosevka Nerd Font 10";
|
||||||
|
show-icons: true;
|
||||||
|
icon-theme: "Papirus";
|
||||||
|
display-drun: "";
|
||||||
|
drun-display-format: "{name}";
|
||||||
|
disable-history: false;
|
||||||
|
fullscreen: false;
|
||||||
|
hide-scrollbar: true;
|
||||||
|
sidebar-mode: false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@import "colors.rasi"
|
||||||
|
|
||||||
|
window {
|
||||||
|
transparency: "real";
|
||||||
|
background-color: @bg;
|
||||||
|
text-color: @fg;
|
||||||
|
border: 0px 0px 4px 0px;
|
||||||
|
border-color: @ac;
|
||||||
|
border-radius: 0px;
|
||||||
|
width: 400px;
|
||||||
|
location: center;
|
||||||
|
x-offset: 0;
|
||||||
|
y-offset: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
prompt {
|
||||||
|
enabled: true;
|
||||||
|
padding: 2px 0px 0px 10px;
|
||||||
|
background-color: @al;
|
||||||
|
text-color: @fg;
|
||||||
|
}
|
||||||
|
|
||||||
|
textbox-prompt-colon {
|
||||||
|
padding: 2px 0px 0px 5px;
|
||||||
|
background-color: @al;
|
||||||
|
text-color: @fg;
|
||||||
|
expand: false;
|
||||||
|
str: "";
|
||||||
|
font: "feather 12";
|
||||||
|
}
|
||||||
|
|
||||||
|
entry {
|
||||||
|
background-color: @al;
|
||||||
|
text-color: @fg;
|
||||||
|
placeholder-color: @fg;
|
||||||
|
expand: true;
|
||||||
|
horizontal-align: 0;
|
||||||
|
placeholder: "Search...";
|
||||||
|
padding: 2px 0px 0px 6px;
|
||||||
|
blink: true;
|
||||||
|
}
|
||||||
|
|
||||||
|
inputbar {
|
||||||
|
children: [ textbox-prompt-colon, prompt ];
|
||||||
|
background-color: @bga;
|
||||||
|
text-color: @fg;
|
||||||
|
expand: false;
|
||||||
|
border: 0px;
|
||||||
|
border-radius: 0px;
|
||||||
|
border-color: @ac;
|
||||||
|
margin: 0px;
|
||||||
|
padding: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
listview {
|
||||||
|
background-color: @al;
|
||||||
|
padding: 0px;
|
||||||
|
columns: 1;
|
||||||
|
lines: 8;
|
||||||
|
spacing: 6px;
|
||||||
|
cycle: true;
|
||||||
|
dynamic: true;
|
||||||
|
layout: vertical;
|
||||||
|
}
|
||||||
|
|
||||||
|
mainbox {
|
||||||
|
background-color: @al;
|
||||||
|
border: 0px;
|
||||||
|
border-radius: 0px;
|
||||||
|
border-color: @ac;
|
||||||
|
children: [ inputbar, listview ];
|
||||||
|
spacing: 6px;
|
||||||
|
padding: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
element {
|
||||||
|
background-color: @al;
|
||||||
|
text-color: @fga;
|
||||||
|
orientation: horizontal;
|
||||||
|
border-radius: 0px;
|
||||||
|
padding: 8px 8px 8px -10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
element-icon {
|
||||||
|
size: 24px;
|
||||||
|
border: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
element-text {
|
||||||
|
expand: true;
|
||||||
|
horizontal-align: 0;
|
||||||
|
vertical-align: 0.5;
|
||||||
|
margin: 0px 2.5px 0px 2.5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
element selected {
|
||||||
|
background-color: @bga;
|
||||||
|
text-color: @fg;
|
||||||
|
border: 0px 0px 0px 0px;
|
||||||
|
border-radius: 0px;
|
||||||
|
border-color: @ac;
|
||||||
|
}
|
40
.config/polybar/rofi/powermenu.rasi
Normal file
40
.config/polybar/rofi/powermenu.rasi
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
* {
|
||||||
|
background-color: #282A3A;
|
||||||
|
color: #7e8294;
|
||||||
|
font: "Segoe UI 10";
|
||||||
|
}
|
||||||
|
|
||||||
|
#window {
|
||||||
|
location: north;
|
||||||
|
width: 375px;
|
||||||
|
padding: -6px 0px;
|
||||||
|
children: [horibox];
|
||||||
|
}
|
||||||
|
|
||||||
|
#horibox {
|
||||||
|
orientation: horizontal;
|
||||||
|
children: [listview];
|
||||||
|
}
|
||||||
|
|
||||||
|
#listview {
|
||||||
|
layout: horizontal;
|
||||||
|
padding: 0px 0px;
|
||||||
|
spacing: 2px;
|
||||||
|
lines: 50;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#element {
|
||||||
|
margin: 0px 5px;
|
||||||
|
padding: 6px 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#element selected {
|
||||||
|
color: #e1e3e4;
|
||||||
|
}
|
||||||
|
|
||||||
|
#button {
|
||||||
|
font: "Segoe UI 1 ";
|
||||||
|
width: 12;
|
||||||
|
text-color: #7e8294;
|
||||||
|
}
|
3
.config/polybar/scripts/gpu.sh
Executable file
3
.config/polybar/scripts/gpu.sh
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
nvidia-smi --query-gpu=utilization.gpu --format=csv,noheader,nounits | awk '{ print "GPU",""$1"","%"}'
|
3
.config/polybar/scripts/launcher.sh
Executable file
3
.config/polybar/scripts/launcher.sh
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
rofi -no-config -no-lazy-grab -show drun -modi drun -theme ~/.config/rofi/andromeda.rasi
|
67
.config/polybar/scripts/network.sh
Executable file
67
.config/polybar/scripts/network.sh
Executable file
@ -0,0 +1,67 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
## Author : Aditya Shakya
|
||||||
|
## Mail : adi1090x@gmail.com
|
||||||
|
## Github : @adi1090x
|
||||||
|
## Twitter : @adi1090x
|
||||||
|
|
||||||
|
style="$($HOME/.config/rofi/)"
|
||||||
|
|
||||||
|
dir="$HOME/.config/rofi$style"
|
||||||
|
rofi_command="rofi -theme $dir/andromeda.rasi"
|
||||||
|
|
||||||
|
## Get info
|
||||||
|
IFACE="$(nmcli | grep -i interface | awk '/interface/ {print $2}')"
|
||||||
|
#SSID="$(iwgetid -r)"
|
||||||
|
#LIP="$(nmcli | grep -i server | awk '/server/ {print $2}')"
|
||||||
|
#PIP="$(dig +short myip.opendns.com @resolver1.opendns.com )"
|
||||||
|
STATUS="$(nmcli radio wifi)"
|
||||||
|
|
||||||
|
active=""
|
||||||
|
urgent=""
|
||||||
|
|
||||||
|
if (ping -c 1 archlinux.org || ping -c 1 google.com || ping -c 1 bitbucket.org || ping -c 1 github.com || ping -c 1 sourceforge.net) &>/dev/null; then
|
||||||
|
if [[ $STATUS == *"enable"* ]]; then
|
||||||
|
if [[ $IFACE == e* ]]; then
|
||||||
|
connected=""
|
||||||
|
else
|
||||||
|
connected=""
|
||||||
|
fi
|
||||||
|
active="-a 0"
|
||||||
|
SSID=" $(iwgetid -r)"
|
||||||
|
PIP="$(wget --timeout=30 http://ipinfo.io/ip -qO -)"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
urgent="-u 0"
|
||||||
|
SSID="Disconnected"
|
||||||
|
PIP="Not Available"
|
||||||
|
connected=""
|
||||||
|
fi
|
||||||
|
|
||||||
|
## Icons
|
||||||
|
bmon=""
|
||||||
|
launch_cli=""
|
||||||
|
launch=""
|
||||||
|
|
||||||
|
options="$connected\n$bmon\n$launch_cli\n$launch"
|
||||||
|
|
||||||
|
## Main
|
||||||
|
chosen="$(echo -e "$options" | $rofi_command -p "$SSID" -dmenu $active $urgent -selected-row 1)"
|
||||||
|
case $chosen in
|
||||||
|
$connected)
|
||||||
|
if [[ $STATUS == *"enable"* ]]; then
|
||||||
|
nmcli radio wifi off
|
||||||
|
else
|
||||||
|
nmcli radio wifi on
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
$bmon)
|
||||||
|
termite -e bmon
|
||||||
|
;;
|
||||||
|
$launch_cli)
|
||||||
|
termite -e nmtui
|
||||||
|
;;
|
||||||
|
$launch)
|
||||||
|
nm-connection-editor
|
||||||
|
;;
|
||||||
|
esac
|
94
.config/polybar/scripts/powermenu.sh
Executable file
94
.config/polybar/scripts/powermenu.sh
Executable file
@ -0,0 +1,94 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
## Author : Aditya Shakya
|
||||||
|
## Mail : adi1090x@gmail.com
|
||||||
|
## Github : @adi1090x
|
||||||
|
## Twitter : @adi1090x
|
||||||
|
|
||||||
|
dir="~/.config/polybar/rofi"
|
||||||
|
uptime=$(uptime -p | sed -e 's/up //g')
|
||||||
|
|
||||||
|
rofi_command="rofi -theme $dir/powermenu.rasi"
|
||||||
|
|
||||||
|
# Options
|
||||||
|
shutdown=" Shutdown"
|
||||||
|
reboot=" Restart"
|
||||||
|
lock=" Lock"
|
||||||
|
suspend=" Sleep"
|
||||||
|
logout=" Logout"
|
||||||
|
|
||||||
|
# Confirmation
|
||||||
|
confirm_exit() {
|
||||||
|
rofi -dmenu\
|
||||||
|
-i\
|
||||||
|
-no-fixed-num-lines\
|
||||||
|
-p "Are You Sure? : "\
|
||||||
|
-theme $dir/confirm.rasi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Message
|
||||||
|
msg() {
|
||||||
|
rofi -theme "$dir/message.rasi" -e "Available Options - yes / y / no / n"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Variable passed to rofi
|
||||||
|
options="$lock\n$suspend\n$logout\n$reboot\n$shutdown"
|
||||||
|
|
||||||
|
chosen="$(echo -e "$options" | $rofi_command -p "Uptime: $uptime" -dmenu -selected-row 0)"
|
||||||
|
case $chosen in
|
||||||
|
$shutdown)
|
||||||
|
ans=$(confirm_exit &)
|
||||||
|
if [[ $ans == "yes" || $ans == "ye" || $ans == "YE" || $ans == "yeah" || $ans == "yep" || $ans == "YEAH" || $ans == "YEP" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
|
||||||
|
systemctl poweroff
|
||||||
|
elif [[ $ans == "no" || $ans == "nope" || $ans == "NOPE" || $ans == "nah" || $ans == "NAH" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
msg
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
$reboot)
|
||||||
|
ans=$(confirm_exit &)
|
||||||
|
if [[ $ans == "yes" || $ans == "ye" || $ans == "YE" || $ans == "yeah" || $ans == "yep" || $ans == "YEAH" || $ans == "YEP" ||$ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
|
||||||
|
systemctl reboot
|
||||||
|
elif [[ $ans == "no" || $ans == "nope" || $ans == "NOPE" || $ans == "nah" || $ans == "NAH" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
msg
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
$lock)
|
||||||
|
if [[ -f /usr/bin/betterlockscreen ]]; then
|
||||||
|
betterlockscreen -l -b 0.5
|
||||||
|
elif [[ -f /usr/bin/betterlockscreen ]]; then
|
||||||
|
betterlockscreen -l
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
$suspend)
|
||||||
|
ans=$(confirm_exit &)
|
||||||
|
if [[ $ans == "yes" || $ans == "ye" || $ans == "YE" || $ans == "yeah" || $ans == "yep" || $ans == "YEAH" || $ans == "YEP" ||$ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
|
||||||
|
mpc -q pause
|
||||||
|
amixer set Master mute
|
||||||
|
systemctl suspend
|
||||||
|
elif [[ $ans == "no" || $ans == "nope" || $ans == "NOPE" || $ans == "nah" || $ans == "NAH" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
msg
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
$logout)
|
||||||
|
ans=$(confirm_exit &)
|
||||||
|
if [[ $ans == "yes" || $ans == "ye" || $ans == "YE" || $ans == "yeah" || $ans == "yep" || $ans == "YEAH" || $ans == "YEP" ||$ans == "YES" || $ans == "y" || $ans == "Y" ]]; then
|
||||||
|
if [[ "$DESKTOP_SESSION" == "Openbox" ]]; then
|
||||||
|
openbox --exit
|
||||||
|
elif [[ "$DESKTOP_SESSION" == "bspwm" ]]; then
|
||||||
|
bspc quit
|
||||||
|
elif [[ "$DESKTOP_SESSION" == "i3" ]]; then
|
||||||
|
i3-msg exit
|
||||||
|
fi
|
||||||
|
elif [[ $ans == "no" || $ans == "nope" || $ans == "NOPE" || $ans == "nah" || $ans == "NAH" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
msg
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
3
.config/polybar/scripts/uptime.sh
Executable file
3
.config/polybar/scripts/uptime.sh
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
notify-send -u low "$(awk '{print "Uptime: " int($1/3600)" Hours "int(($1%3600)/60)" minutes "int($1%60)" seconds"}' /proc/uptime)"
|
3
.config/polybar/scripts/weather.sh
Executable file
3
.config/polybar/scripts/weather.sh
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
exec notify-send "$(curl -s http://rss.accuweather.com/rss/liveweather_rss.asp\?metric\=${METRIC}\&locCode\=76692 \ | sed -n '/Currently:/ s/.*: \(.*\): \([0-9]*\)\([CF]\).*/\2°\3 \1/p')"
|
4
.config/polybar/scripts/wttr.sh
Executable file
4
.config/polybar/scripts/wttr.sh
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
curl wttr.in/76692
|
||||||
|
|
27
scripts/misc/battery-level.sh
Executable file
27
scripts/misc/battery-level.sh
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Set path for running in a cron job
|
||||||
|
PATH='/snap/bin:/home/sahin/.poetry/bin:/home/sahin/.pyenv/bin:/home/sahin/.pyenv/shims:/home/sahin/.pyenv/bin:/home/sahin/.cargo/bin:/home/sahin/.poetry/bin:/home/sahin/.local/bin:/home/sahin/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/home/sahin/Downloads/ArchiveFiles/idea-IU-211.7628.21/bin:/home/sahin/scripts:/home/sahin/.fzf/bin'
|
||||||
|
|
||||||
|
# Set limit to shell argument
|
||||||
|
batteryLimit=$1
|
||||||
|
|
||||||
|
export DISPLAY=:0
|
||||||
|
export XDG_RUNTIME_DIR=/run/user/$(id -u)
|
||||||
|
|
||||||
|
# Get the current battery level with acpi
|
||||||
|
batteryLevel=$(acpi | cut -d ' ' -f 4 | tr -d '%|,| ')
|
||||||
|
charging=$(acpi | cut -d ' ' -f 3 | tr -d ',| ')
|
||||||
|
|
||||||
|
# Must have the Xdus file to run in a cron job. If this is not
|
||||||
|
# necessary functionality, this can be ignored, otherwise one must
|
||||||
|
# run the /scripts/xdbus.sh script in this repository at startup,
|
||||||
|
# which is called by default from my i3/config file.
|
||||||
|
# if [ -r "$HOME/.dbus/Xdbus" ]; then
|
||||||
|
# . "$HOME/.dbus/Xdbus"
|
||||||
|
# fi
|
||||||
|
|
||||||
|
if [[ "$batteryLevel" -le "$batteryLimit" ]] && [[ "$charging" == "Discharging" ]]; then
|
||||||
|
/usr/bin/notify-send -a "Battery Warning" --urgency critical "Battery level at ${batteryLevel}%" -i abrt
|
||||||
|
/usr/bin/paplay /usr/share/sounds/Oxygen-K3B-Finish-Error.ogg
|
||||||
|
fi
|
11
scripts/rofi/launch.sh
Executable file
11
scripts/rofi/launch.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
menu="$1"
|
||||||
|
|
||||||
|
if [ "$menu" = "music" ]; then
|
||||||
|
rofi -modi 'Music:~/scripts/rofi/music.sh' -show Music -theme music-launcher
|
||||||
|
elif [ "$menu" = "appmenu" ]; then
|
||||||
|
rofi -show drun -theme clean
|
||||||
|
elif [ "$menu" = "powermenu" ]; then
|
||||||
|
rofi -modi 'Powermenu:~/scripts/rofi/powermenu.sh' -show Powermenu -theme powermenu -location 3 -xoffset -24 -yoffset 70
|
||||||
|
fi
|
24
scripts/rofi/music.sh
Executable file
24
scripts/rofi/music.sh
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
MUSIC="$HOME/music"
|
||||||
|
|
||||||
|
|
||||||
|
function get_music() {
|
||||||
|
IFS=$'\n'
|
||||||
|
for i in $(ls "$MUSIC" | grep -v 'thumbs'); do
|
||||||
|
name="${i%.*}"
|
||||||
|
echo -en "${i}\0icon\x1f${MUSIC}/thumbs/${name}.png\n"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if [ -z "$@" ]; then
|
||||||
|
echo -en "Shuffle\0icon\x1fmedia-playlist-shuffle\n"
|
||||||
|
get_music
|
||||||
|
else
|
||||||
|
if [ "$1" = "Shuffle" ]; then
|
||||||
|
$HOME/scripts/music/mpv-controller.sh start shuffle &
|
||||||
|
else
|
||||||
|
$HOME/scripts/music/mpv-controller.sh start "${MUSIC}/$1" &
|
||||||
|
fi
|
||||||
|
fi
|
19
scripts/rofi/powermenu.sh
Executable file
19
scripts/rofi/powermenu.sh
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
if [ -z "$@" ]; then
|
||||||
|
echo -en "Shutdown\0icon\x1fsystem-shutdown\n"
|
||||||
|
echo -en "Logout\0icon\x1fsystem-log-out\n"
|
||||||
|
echo -en "Suspend\0icon\x1fsystem-suspend\n"
|
||||||
|
echo -en "Reboot\0icon\x1fsystem-restart\n"
|
||||||
|
else
|
||||||
|
if [ "$1" = "Shutdown" ]; then
|
||||||
|
shutdown now
|
||||||
|
elif [ "$1" = "Logout" ]; then
|
||||||
|
i3-msg exit
|
||||||
|
elif [ "$1" = "Reboot" ]; then
|
||||||
|
reboot
|
||||||
|
elif [ "$1" = "Suspend" ]; then
|
||||||
|
systemctl suspend
|
||||||
|
fi
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user